mirror of
https://github.com/LukasJoswiak/etch.git
synced 2024-05-02 08:08:32 -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"
|
||||
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]
|
||||
posts = "/:title/"
|
||||
|
||||
|
|
|
@ -2,10 +2,9 @@
|
|||
<h2><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h2>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="{{ .Site.BaseURL }}">posts</a></li>
|
||||
{{ range where .Site.Home.Pages "Title" "!=" "Posts" }}
|
||||
{{ range .Site.Menus.main.ByWeight }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
{{ .Pre }}<a href="{{ .URL }}" title="{{ .Title }}">{{- .Name -}}</a>{{ .Post }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
|
Loading…
Reference in a new issue