mirror of
https://github.com/LukasJoswiak/etch.git
synced 2024-05-16 21:28:31 -04:00
Add support for standard main menu (#6)
This commit is contained in:
parent
17af6e51ae
commit
0e080d23bf
|
@ -12,6 +12,21 @@ pygmentsUseClasses = true
|
||||||
dark = "auto"
|
dark = "auto"
|
||||||
highlight = true
|
highlight = true
|
||||||
|
|
||||||
|
[menu]
|
||||||
|
[[menu.main]]
|
||||||
|
identifier = "posts"
|
||||||
|
name = "posts"
|
||||||
|
title = "posts"
|
||||||
|
url = "/"
|
||||||
|
weight = 10
|
||||||
|
|
||||||
|
[[menu.main]]
|
||||||
|
identifier = "about"
|
||||||
|
name = "about"
|
||||||
|
title = "about"
|
||||||
|
url = "/about/"
|
||||||
|
weight = 20
|
||||||
|
|
||||||
[permalinks]
|
[permalinks]
|
||||||
posts = "/:title/"
|
posts = "/:title/"
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,9 @@
|
||||||
<h2><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h2>
|
<h2><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h2>
|
||||||
<nav>
|
<nav>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="{{ .Site.BaseURL }}">posts</a></li>
|
{{ range .Site.Menus.main.ByWeight }}
|
||||||
{{ range where .Site.Home.Pages "Title" "!=" "Posts" }}
|
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
{{ .Pre }}<a href="{{ .URL }}" title="{{ .Title }}">{{- .Name -}}</a>{{ .Post }}
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in a new issue