Skip to content

Commit

Permalink
[BREAKING] Rename menu.nav to menu.main
Browse files Browse the repository at this point in the history
  • Loading branch information
ldeso committed Dec 21, 2023
1 parent 5bde71b commit 3b4b023
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions README.md
Expand Up @@ -104,21 +104,21 @@ params:
# - bar.js

menu:
nav:
main:
- name: About
url: about/
pageRef: /about
weight: 1
- name: Posts
url: post/
pageRef: /post
weight: 2
- name: Tags
url: tags/
pageRef: /tags
weight: 3
- name: Categories
url: categories/
pageRef: /categories
weight: 4
- name: RSS
url: index.xml
url: /index.xml
weight: 5

mediaTypes:
Expand Down
2 changes: 1 addition & 1 deletion assets/css/base.tpl.css
Expand Up @@ -57,7 +57,7 @@ kbd:has(kbd) {
padding: 0;
}

{{ $len := len site.Menus.nav }}
{{ $len := len site.Menus.main }}
{{ range seq $len }}

.Banner-item:nth-child({{ . }}) {
Expand Down
2 changes: 1 addition & 1 deletion assets/xml/base.tpl.xml
Expand Up @@ -22,7 +22,7 @@
<a class="Banner-link u-clickable" href="{{ absLangURL nil }}">{{ site.Title }}</a>
</h1>
</li>
{{ range site.Menus.nav }}
{{ range site.Menus.main }}
<li class="Banner-item">
<a class="Banner-link u-clickable" href="{{ absLangURL .URL }}">{{ .Name }}</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion config.yaml
Expand Up @@ -32,7 +32,7 @@ params:
# - bar.js

menu:
nav:
main:
- name: About
pageRef: /about
weight: 1
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/banner.html
Expand Up @@ -6,7 +6,7 @@ <h1 class="Banner-heading">
<a class="Banner-link u-clickable" href="{{ relLangURL nil }}">{{ site.Title }}</a>
</h1>
</li>
{{ range site.Menus.nav }}
{{ range site.Menus.main }}
<li class="Banner-item">
<a class="Banner-link u-clickable" href="{{ relLangURL .URL }}">{{ .Name }}</a>
</li>
Expand Down

0 comments on commit 3b4b023

Please sign in to comment.