Add page management to the structured editor

Pages can now be reordered, renamed, and have their metadata edited
without touching YAML.

- Up/down arrows next to each page in the /edit list to reorder.
- "Settings" button per page opens /edit/pages/{slug}/settings — a
  form covering name, slug, page width, desktop nav width, mobile
  header, hide desktop nav, center vertically.
- POST /edit/api/pages/{slug}/fields applies metadata changes
  surgically via the existing yaml.Node + atomic-save flow so
  columns/widgets/comments stay untouched.
- POST /edit/api/pages/{slug}/move?dir=up|down swaps adjacent pages.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
uhlwoogi
2026-04-30 17:18:52 +00:00
co-authored by Claude Opus 4.7
parent 8ba6dcb704
commit 7f36f30dad
6 changed files with 270 additions and 4 deletions
+6 -1
View File
@@ -8,7 +8,12 @@
<div class="margin-bottom-15">
<a class="color-subdue" href="{{ .App.Config.Server.BaseURL }}/edit">← Edit</a>
</div>
<h1 class="size-h1">{{ .Page.Title }}</h1>
<div class="flex items-center gap-10">
<h1 class="size-h1 grow">{{ .Page.Title }}</h1>
<a href="{{ .App.Config.Server.BaseURL }}/edit/pages/{{ .Page.Slug }}/settings">
<button type="button">Page settings</button>
</a>
</div>
<p class="color-subdue margin-bottom-25">/{{ .Page.Slug }}</p>
{{- if .Page.HeadWidgets }}