Add support for single page menu

This commit is contained in:
Dmitry Kolosov 2020-06-24 22:21:59 +03:00
parent 6e0b0b6fc7
commit 193fbeca7c
4 changed files with 91 additions and 12 deletions

View file

@ -1,5 +1,12 @@
{{ define "main" }}
{{ if .Menus }}
<nav class="post-navigation">
{{ range .Menus }}
<a href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a>
{{ end }}
</nav>
{{ end }}
<article class="post">
<header>
<h1 class="post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}">{{ trim .Title " " }}</h1>
@ -10,7 +17,7 @@
{{ partial "postInfo.html" . }}
</article>
{{ if .Site.Params.paginationSinglePost}}
{{ if and (.Site.Params.paginationSinglePost) (ne .Type "page") }}
{{ partial "paginationPost.html" . }}
{{ end }}