feat: auto-generated docs sidebar, Decap CMS, content migration infra

Docs restructure:
- Move flat docs into section subdirs (getting-started/, core/,
  components/, reference/) with _index.md for each
- Sidebar auto-generates from content structure — no manual menu entries
- New doc pages appear automatically when created in a section

Decap CMS:
- admin/index.html + config.yml for browser-based editing
- Local mode (npx decap-server) — no OAuth needed
- Collections for all content types: docs, articles, essays, notes, pages

Hugo head.html updated for new CSS layer filenames.
decap-server added as devDependency.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ludo 2026-04-11 18:02:34 +02:00
parent 86464f3e21
commit dd810f5a63
Signed by: ludo
GPG key ID: F6E479DEFAB84D6E
22 changed files with 1624 additions and 140 deletions

View file

@ -15,46 +15,19 @@
<section data-layout="docs">
<nav aria-label="Documentation" data-nav="sidebar">
{{- $menu := index .Site.Menus "docs" -}}
{{- if $menu -}}
{{- range $menu -}}
{{- if .HasChildren -}}
<h3>{{ .Name }}</h3>
<ul>
{{- range .Children -}}
<li>
<a href="{{ .URL }}"
{{- if eq (relURL .URL) $.RelPermalink }} aria-current="page"{{ end -}}>
{{- .Name -}}
</a>
</li>
{{- end -}}
</ul>
{{- else -}}
<ul>
<li>
<a href="{{ .URL }}"
{{- if eq (relURL .URL) $.RelPermalink }} aria-current="page"{{ end -}}>
{{- .Name -}}
</a>
</li>
</ul>
{{- end -}}
{{- end -}}
{{- else -}}
{{- with .CurrentSection -}}
<h3>{{ .Title }}</h3>
<ul>
{{- range .RegularPages -}}
<li>
<a href="{{ .RelPermalink }}"
{{- if eq .RelPermalink $.RelPermalink }} aria-current="page"{{ end -}}>
{{- .LinkTitle -}}
</a>
</li>
{{- end -}}
</ul>
{{- $top := .FirstSection -}}
{{- range $top.Sections.ByWeight -}}
<h3>{{ .Title }}</h3>
<ul>
{{- range .RegularPages.ByWeight -}}
<li>
<a href="{{ .RelPermalink }}"
{{- if eq .RelPermalink $.RelPermalink }} aria-current="page"{{ end -}}>
{{- .LinkTitle -}}
</a>
</li>
{{- end -}}
</ul>
{{- end -}}
</nav>

View file

@ -22,16 +22,18 @@
<link rel="stylesheet" href="/vendor/open-props.min.css">
<link rel="stylesheet" href="/vendor/media.min.css">
<link rel="stylesheet" href="/css/layers/00-reset.css">
<link rel="stylesheet" href="/css/layers/01-asw.css">
<link rel="stylesheet" href="/css/layers/02-semantic.css">
<link rel="stylesheet" href="/css/layers/03-components.css">
<link rel="stylesheet" href="/css/layers/04-data-attrs.css">
<link rel="stylesheet" href="/css/layers/05-utilities.css">
<link rel="stylesheet" href="/css/layers/06-charts.css">
<link rel="stylesheet" href="/css/layers/07-chroma.css">
<link rel="stylesheet" href="/css/layers/08-layout.css">
<link rel="stylesheet" href="/css/layers/08a-paper.css">
<link rel="stylesheet" href="/css/layers/09-landing.css">
<link rel="stylesheet" href="/css/layers/01-tokens.css">
<link rel="stylesheet" href="/css/layers/02-typography.css">
<link rel="stylesheet" href="/css/layers/03-landmarks.css">
<link rel="stylesheet" href="/css/layers/04-forms.css">
<link rel="stylesheet" href="/css/layers/05-components.css">
<link rel="stylesheet" href="/css/layers/06-navigation.css">
<link rel="stylesheet" href="/css/layers/07-data-attrs.css">
<link rel="stylesheet" href="/css/layers/08-utilities.css">
<link rel="stylesheet" href="/css/layers/09-charts.css">
<link rel="stylesheet" href="/css/layers/10-chroma.css">
<link rel="stylesheet" href="/css/layers/11-layout.css">
<link rel="stylesheet" href="/css/layers/12-landing.css">
{{- else }}
<link rel="stylesheet" href="/asw.css">
{{- end }}