mirror of
https://github.com/thegeeklab/hugo-geekdoc.git
synced 2024-11-21 20:30:39 +00:00
Merge pull request #15 from atorrescogollo/master
Allow description text in toc-tree items
This commit is contained in:
commit
92254349c4
@ -170,6 +170,9 @@ weight = 10
|
|||||||
# Set how many table of contents levels to be showed on page.
|
# Set how many table of contents levels to be showed on page.
|
||||||
geekdocToC = 3
|
geekdocToC = 3
|
||||||
|
|
||||||
|
# Set a description for the current page. This will be shown in toc-trees objects
|
||||||
|
GeekdocDescription =
|
||||||
|
|
||||||
# Show a breadcrumb navigation bar at the top of each docs page.
|
# Show a breadcrumb navigation bar at the top of each docs page.
|
||||||
geekdocBreadcrumb = false
|
geekdocBreadcrumb = false
|
||||||
|
|
||||||
@ -207,6 +210,9 @@ weight: 10
|
|||||||
# Set how many table of contents levels to be showed on page.
|
# Set how many table of contents levels to be showed on page.
|
||||||
geekdocToC: 3
|
geekdocToC: 3
|
||||||
|
|
||||||
|
# Set a description for the current page. This will be shown in toc-trees objects
|
||||||
|
GeekdocDescription:
|
||||||
|
|
||||||
# Show a breadcrumb navigation bar at the top of each docs page.
|
# Show a breadcrumb navigation bar at the top of each docs page.
|
||||||
geekdocBreadcrumb: false
|
geekdocBreadcrumb: false
|
||||||
|
|
||||||
|
@ -15,10 +15,10 @@
|
|||||||
<li>
|
<li>
|
||||||
{{ if or .Content .Params.geekdocFlatSection }}
|
{{ if or .Content .Params.geekdocFlatSection }}
|
||||||
<span>
|
<span>
|
||||||
<a href="{{ .RelPermalink }}" class="gdoc-toc__entry">{{ partial "title" . }}</a>
|
<a href="{{ .RelPermalink }}" class="gdoc-toc__entry">{{ partial "title" . }}{{ with .Params.GeekdocDescription }}:</a> {{ . }}{{ else }}</a>{{ end }}
|
||||||
</span>
|
</span>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<span>{{ partial "title" . }}</span>
|
<span>{{ partial "title" . }}{{ with .Params.GeekdocDescription }}: {{ . }}{{ end }}</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
|
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
|
||||||
|
Loading…
Reference in New Issue
Block a user