File tree Expand file tree Collapse file tree 2 files changed +23
-13
lines changed Expand file tree Collapse file tree 2 files changed +23
-13
lines changed Original file line number Diff line number Diff line change
1
+ {{/* Parse param from front matter */}}
2
+ {{ $dataPath := split .Params.catalogType "." }}
3
+ {{ $data := .Site.Data }}
4
+ {{range $dataPath}}
5
+ {{ $data = index $data . }}
6
+ {{ end }}
7
+ < nav id ="TableOfContents ">
8
+ < ul >
9
+ {{ range $data }}
10
+ {{/* Render catalog toc list */}}
11
+ < li >
12
+ < a href ="#{{.name}} "> {{.name}}</ a >
13
+ </ li >
14
+ {{ end }}
15
+ </ ul >
16
+ </ nav >
Original file line number Diff line number Diff line change 1
1
< nav class ="bd-links " aria-label ="Main navigation ">
2
-
3
2
< div class ="bd-toc-item active ">
4
-
5
3
< h3 class ="bd-toc-link "> What's on This Page</ h3 >
6
-
7
- {{ with .TableOfContents }}
8
-
9
- {{ . }}
10
-
4
+ {{ if .Params.catalogType }}
5
+ {{ partial "catalog-toc" . }}
6
+ {{ else }}
7
+ {{ with .TableOfContents }}
8
+ {{ . }}
9
+ {{ end }}
11
10
{{ end }}
12
-
13
11
</ div >
14
- </ nav >
15
-
16
-
17
-
18
-
12
+ </ nav >
You can’t perform that action at this time.
0 commit comments