feat: journal:fix-headings and the settings API

- classes.FixStoredHeadings converts stored H1 in post content (every
  locale) and category pillar text, in one transaction with a RecordSaved
  and a site cache purge per changed record
- journal:fix-headings, a dry run unless --apply, refuses with exit code 1
  while the H1 setting is off
- GET/PUT /_journal/api/v1/settings and POST /fix-headings {dry_run} for
  golem15.journal.manage_settings; 409 with the refusal while the setting
  is off
This commit is contained in:
Jakub Zych
2026-11-04 10:04:27 +01:00
parent faaa9b0f55
commit 5210b64e0f
8 changed files with 746 additions and 0 deletions

View File

@@ -30,6 +30,9 @@ const (
// PermissionAccessImportExport gates journal:export-posts / import-posts
// toolbar actions (D-13).
PermissionAccessImportExport = "golem15.journal.access_import_export"
// PermissionManageSettings is the Journal settings permission; the
// /_journal/api/v1 settings and fix-headings routes require it.
PermissionManageSettings = "golem15.journal.manage_settings"
)
type postsAdminController struct {