diff --git a/exampleSite/hugo.toml b/exampleSite/hugo.toml index f4b1358..a5aa8cb 100644 --- a/exampleSite/hugo.toml +++ b/exampleSite/hugo.toml @@ -81,10 +81,10 @@ enableGitInfo = true # Theme 'auto' switches between dark and light modes based on browser/os preferences BookTheme = 'light' - # (Optional, default true) Controls table of contents visibility on right side of pages. + # (Optional, default none) Controls table of contents visibility on right side of pages. # Start and end levels can be controlled with markup.tableOfContents setting. # You can also specify this parameter per page in front matter. - BookToC = true + # BookToC = true # (Optional, default favicon.png) Set the path to a favicon file. # If the favicon is /static/favicon.png then the path would be favicon.png diff --git a/exampleSite/hugo.yaml b/exampleSite/hugo.yaml index 62b2d49..d404579 100644 --- a/exampleSite/hugo.yaml +++ b/exampleSite/hugo.yaml @@ -69,10 +69,10 @@ params: # Theme 'auto' switches between dark and light modes based on browser/os preferences BookTheme: "light" - # (Optional, default true) Controls table of contents visibility on right side of pages. + # (Optional, default none) Controls table of contents visibility on right side of pages. # Start and end levels can be controlled with markup.tableOfContents setting. # You can also specify this parameter per page in front matter. - BookToC: true + # BookToC: true # (Optional, default favicon.png) Set the path to a favicon file. # If the favicon is /static/favicon.png then the path would be favicon.png diff --git a/layouts/_partials/docs/toc-show.html b/layouts/_partials/docs/toc-show.html index 0b9f932..5115c84 100644 --- a/layouts/_partials/docs/toc-show.html +++ b/layouts/_partials/docs/toc-show.html @@ -1,4 +1,4 @@ -{{ return and - (default .Site.Params.BookToC .Params.BookToC | default true) - (not (eq .TableOfContents "")) +{{ return default + (not (eq .TableOfContents "")) + (default .Site.Params.BookToC .Params.BookToC) }} \ No newline at end of file diff --git a/layouts/posts/list.html b/layouts/posts/list.html index dd0d76d..f2b660a 100644 --- a/layouts/posts/list.html +++ b/layouts/posts/list.html @@ -14,6 +14,14 @@ {{ template "_internal/pagination.html" . }} {{ end }} +{{ define "toc-container" }} + +{{ end }} + {{ define "toc" }} {{ partial "docs/taxonomy" . }} {{ end }} diff --git a/layouts/taxonomy.html b/layouts/taxonomy.html deleted file mode 100644 index 1d3e763..0000000 --- a/layouts/taxonomy.html +++ /dev/null @@ -1,13 +0,0 @@ -{{ define "main" }} -
-

{{ .Title | title }}

- {{ $taxonomies := index .Site.Taxonomies .Page.Type }} - {{ range $taxonomies }} -
{{ .Page.Title }} {{ .Count }}
- {{ end }} -
-{{ end }} - -{{ define "toc" }} - {{ partial "docs/taxonomy" . }} -{{ end }} diff --git a/layouts/term.html b/layouts/term.html index 9800f62..f2b660a 100644 --- a/layouts/term.html +++ b/layouts/term.html @@ -5,15 +5,23 @@ {{ partial "docs/title.html" . }} {{ partial "docs/post-meta" . }} -

+

{{- .Summary -}} -

+
{{ end }} {{ template "_internal/pagination.html" . }} {{ end }} +{{ define "toc-container" }} + +{{ end }} + {{ define "toc" }} {{ partial "docs/taxonomy" . }} {{ end }}