feat: CMS-editable nav, categories taxonomy, site settings
- Move top nav from hugo.toml menus to data/nav.yml (CMS-editable) - Add categories taxonomy alongside tags - Add Decap CMS settings collection for nav management - Add categories field to articles and essays in CMS config Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
dd810f5a63
commit
8ab5787e68
4 changed files with 50 additions and 32 deletions
23
site/data/nav.yml
Normal file
23
site/data/nav.yml
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
- name: Home
|
||||||
|
url: /
|
||||||
|
weight: 1
|
||||||
|
|
||||||
|
- name: Docs
|
||||||
|
url: /docs/
|
||||||
|
weight: 2
|
||||||
|
|
||||||
|
- name: Notes
|
||||||
|
url: /notes/
|
||||||
|
weight: 3
|
||||||
|
|
||||||
|
- name: Essays
|
||||||
|
url: /essays/
|
||||||
|
weight: 4
|
||||||
|
|
||||||
|
- name: Articles
|
||||||
|
url: /articles/
|
||||||
|
weight: 5
|
||||||
|
|
||||||
|
- name: Tags
|
||||||
|
url: /tags/
|
||||||
|
weight: 6
|
||||||
|
|
@ -7,37 +7,11 @@ title = 'ASW — Agentic Semantic Web'
|
||||||
|
|
||||||
[taxonomies]
|
[taxonomies]
|
||||||
tag = "tags"
|
tag = "tags"
|
||||||
|
category = "categories"
|
||||||
|
|
||||||
# ── Navigation menus ──────────────────────────────────────────────────
|
# ── Navigation ──────────────────────────────────────────────────────
|
||||||
[[menus.main]]
|
# Top nav is driven by data/nav.yml (editable via Decap CMS).
|
||||||
name = "Home"
|
# Docs sidebar is auto-generated from content/docs/ subdirectories.
|
||||||
url = "/"
|
|
||||||
weight = 1
|
|
||||||
|
|
||||||
[[menus.main]]
|
|
||||||
name = "Docs"
|
|
||||||
url = "/docs/"
|
|
||||||
weight = 2
|
|
||||||
|
|
||||||
[[menus.main]]
|
|
||||||
name = "Notes"
|
|
||||||
url = "/notes/"
|
|
||||||
weight = 3
|
|
||||||
|
|
||||||
[[menus.main]]
|
|
||||||
name = "Essays"
|
|
||||||
url = "/essays/"
|
|
||||||
weight = 4
|
|
||||||
|
|
||||||
[[menus.main]]
|
|
||||||
name = "Articles"
|
|
||||||
url = "/articles/"
|
|
||||||
weight = 5
|
|
||||||
|
|
||||||
[[menus.main]]
|
|
||||||
name = "Tags"
|
|
||||||
url = "/tags/"
|
|
||||||
weight = 6
|
|
||||||
|
|
||||||
# ── Docs sidebar ─────────────────────────────────────────────────────
|
# ── Docs sidebar ─────────────────────────────────────────────────────
|
||||||
# Auto-generated from content/docs/ subdirectories.
|
# Auto-generated from content/docs/ subdirectories.
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<nav>
|
<nav>
|
||||||
<ul><li><a href="/"><strong>{{ .Site.Title }}</strong></a></li></ul>
|
<ul><li><a href="/"><strong>{{ .Site.Title }}</strong></a></li></ul>
|
||||||
<ul>
|
<ul>
|
||||||
{{- range .Site.Menus.main }}
|
{{- range sort .Site.Data.nav "weight" }}
|
||||||
<li><a href="{{ .URL }}"{{ if $.IsMenuCurrent "main" . }} aria-current="page"{{ end }}>{{ .Name }}</a></li>
|
<li><a href="{{ .url }}"{{ if eq (relURL .url) $.RelPermalink }} aria-current="page"{{ end }}>{{ .name }}</a></li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,26 @@ slug:
|
||||||
encoding: ascii
|
encoding: ascii
|
||||||
clean_accents: true
|
clean_accents: true
|
||||||
|
|
||||||
|
# ── Site settings (file-based collections) ───────────────────────────
|
||||||
|
|
||||||
collections:
|
collections:
|
||||||
|
- name: settings
|
||||||
|
label: Settings
|
||||||
|
files:
|
||||||
|
- name: nav
|
||||||
|
label: Navigation
|
||||||
|
file: data/nav.yml
|
||||||
|
fields:
|
||||||
|
- label: Navigation Links
|
||||||
|
name: items
|
||||||
|
widget: list
|
||||||
|
fields:
|
||||||
|
- { label: Name, name: name, widget: string }
|
||||||
|
- { label: URL, name: url, widget: string }
|
||||||
|
- { label: Weight, name: weight, widget: number, hint: "Sort order (lower = first)" }
|
||||||
|
|
||||||
|
# ── Content collections ──────────────────────────────────────────────
|
||||||
|
|
||||||
- name: docs-getting-started
|
- name: docs-getting-started
|
||||||
label: "Docs: Getting Started"
|
label: "Docs: Getting Started"
|
||||||
folder: content/docs/getting-started
|
folder: content/docs/getting-started
|
||||||
|
|
@ -66,6 +85,7 @@ collections:
|
||||||
- { label: Title, name: title, widget: string }
|
- { label: Title, name: title, widget: string }
|
||||||
- { label: Description, name: description, widget: string, required: false }
|
- { label: Description, name: description, widget: string, required: false }
|
||||||
- { label: Date, name: date, widget: datetime, format: "YYYY-MM-DD" }
|
- { label: Date, name: date, widget: datetime, format: "YYYY-MM-DD" }
|
||||||
|
- { label: Categories, name: categories, widget: list, required: false, hint: "e.g. framework, tutorial, deep-dive" }
|
||||||
- { label: Tags, name: tags, widget: list, required: false }
|
- { label: Tags, name: tags, widget: list, required: false }
|
||||||
- { label: AI Disclosure, name: ai-disclosure, widget: select, options: ["generated", "assisted", "none"], default: "assisted" }
|
- { label: AI Disclosure, name: ai-disclosure, widget: select, options: ["generated", "assisted", "none"], default: "assisted" }
|
||||||
- { label: AI Model, name: ai-model, widget: string, required: false }
|
- { label: AI Model, name: ai-model, widget: string, required: false }
|
||||||
|
|
@ -88,6 +108,7 @@ collections:
|
||||||
- { label: Date, name: date, widget: datetime, format: "YYYY-MM-DD" }
|
- { label: Date, name: date, widget: datetime, format: "YYYY-MM-DD" }
|
||||||
- { label: Tags, name: tags, widget: list, required: false }
|
- { label: Tags, name: tags, widget: list, required: false }
|
||||||
- { label: Draft, name: draft, widget: boolean, default: true }
|
- { label: Draft, name: draft, widget: boolean, default: true }
|
||||||
|
- { label: Categories, name: categories, widget: list, required: false }
|
||||||
- { label: AI Disclosure, name: ai-disclosure, widget: select, options: ["generated", "assisted", "none"], default: "assisted" }
|
- { label: AI Disclosure, name: ai-disclosure, widget: select, options: ["generated", "assisted", "none"], default: "assisted" }
|
||||||
- { label: AI Model, name: ai-model, widget: string, required: false }
|
- { label: AI Model, name: ai-model, widget: string, required: false }
|
||||||
- { label: AI Provider, name: ai-provider, widget: string, required: false, default: "Anthropic" }
|
- { label: AI Provider, name: ai-provider, widget: string, required: false, default: "Anthropic" }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue