feat: add tags to post pages (#193)
This commit is contained in:
parent
95417625bb
commit
3f296625fb
13 changed files with 203 additions and 29 deletions
|
@ -10,6 +10,22 @@
|
|||
{{ end }}
|
||||
</section>
|
||||
|
||||
{{ if and (in (slice "posts" "tags") .Section) (default false .Site.Params.GeekdocTagsToMenu) }}
|
||||
<section class="gdoc-nav--tags">
|
||||
<h2>Tags</h2>
|
||||
<ul class="gdoc-nav__list">
|
||||
{{ $currentPage := .RelPermalink }}
|
||||
{{ range $name, $taxonomy := .Site.Taxonomies.tags }}
|
||||
{{ with $.Site.GetPage (printf "/tags/%s" $name) }}
|
||||
<li>
|
||||
<a class="gdoc-nav__entry {{ if eq $currentPage .RelPermalink }} is-active {{ end }}" href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
<section class="gdoc-nav--more">
|
||||
{{ if .Site.Data.menu.more.more }}
|
||||
<h2>More</h2>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue