fix: wrap nav data in items key for Decap CMS compatibility
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
219cc91dc2
commit
c0426ea746
2 changed files with 20 additions and 19 deletions
|
|
@ -1,23 +1,24 @@
|
|||
- name: Home
|
||||
url: /
|
||||
weight: 1
|
||||
items:
|
||||
- name: Home
|
||||
url: /
|
||||
weight: 1
|
||||
|
||||
- name: Docs
|
||||
url: /docs/
|
||||
weight: 2
|
||||
- name: Docs
|
||||
url: /docs/
|
||||
weight: 2
|
||||
|
||||
- name: Notes
|
||||
url: /notes/
|
||||
weight: 3
|
||||
- name: Notes
|
||||
url: /notes/
|
||||
weight: 3
|
||||
|
||||
- name: Essays
|
||||
url: /essays/
|
||||
weight: 4
|
||||
- name: Essays
|
||||
url: /essays/
|
||||
weight: 4
|
||||
|
||||
- name: Articles
|
||||
url: /articles/
|
||||
weight: 5
|
||||
- name: Articles
|
||||
url: /articles/
|
||||
weight: 5
|
||||
|
||||
- name: Tags
|
||||
url: /tags/
|
||||
weight: 6
|
||||
- name: Tags
|
||||
url: /tags/
|
||||
weight: 6
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<nav>
|
||||
<ul><li><a href="/"><strong>{{ .Site.Title }}</strong></a></li></ul>
|
||||
<ul>
|
||||
{{- range sort hugo.Data.nav "weight" }}
|
||||
{{- range sort hugo.Data.nav.items "weight" }}
|
||||
<li><a href="{{ .url }}"{{ if eq (relURL .url) $.RelPermalink }} aria-current="page"{{ end }}>{{ .name }}</a></li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue