Align topdata wiki canonical paths (#11)
Reviewed-on: https://gitea.westgate.pw/ShadowsOverWestgate/sow-tools/pulls/11 Co-authored-by: Michał Piasecki <mpiasecki720@protonmail.com> Co-committed-by: Michał Piasecki <mpiasecki720@protonmail.com>
This commit is contained in:
@@ -412,16 +412,24 @@ use `namespace=cid`, for example:
|
||||
sow-toolkit deploy-wiki --dry-run --namespace spells --category spells=42
|
||||
```
|
||||
|
||||
Namespace declarations in `topdata/wiki/namespaces.yaml` may set
|
||||
`canonical_path` when a generated namespace lives below a fuller NodeBB category
|
||||
path, for example `canonical_path: Wiki/Feats`. The `title` remains the display
|
||||
label, while `canonical_path` drives generated `public_path` metadata, wiki
|
||||
links, page-index entries, and deploy adoption matching.
|
||||
|
||||
When a deploy manifest is missing but matching wiki pages already exist in
|
||||
NodeBB, `deploy-wiki` checks the Westgate Wiki namespace directory API and
|
||||
adopts those topic/post mappings before planning updates. It does the same when
|
||||
a cached manifest mapping points to a post NodeBB no longer has. Generated
|
||||
public slugs are preferred during adoption before title-based compatibility
|
||||
matching. `--create` is still required for genuinely new pages that have no
|
||||
existing remote topic. If NodeBB rejects a create because the clean wiki URL
|
||||
already exists, `deploy-wiki` re-queries the namespace by page leaf, adopts the
|
||||
matching topic, and updates it instead. Updates and stale-page archives acquire
|
||||
a Westgate Wiki edit lock before saving, then send the returned
|
||||
a cached manifest mapping points to a post NodeBB no longer has. Canonical
|
||||
`wikiPath`/`canonicalPath` data is preferred during adoption. Nested generated
|
||||
paths require that exact canonical path data; leaf/title compatibility matching
|
||||
is only used where it cannot cross a canonical parent path. `--create` is still
|
||||
required for genuinely new pages that have no existing remote topic. If NodeBB
|
||||
rejects a create because the clean wiki URL already exists, `deploy-wiki`
|
||||
re-queries the namespace by page leaf, adopts the matching topic, and updates it
|
||||
instead. Updates and stale-page archives acquire a Westgate Wiki edit lock
|
||||
before saving, then send the returned
|
||||
`wikiEditLockToken` with the NodeBB post edit request. Stale generated pages are
|
||||
reported by default.
|
||||
`--stale-policy archive` rewrites stale generated pages in place as archived
|
||||
|
||||
Reference in New Issue
Block a user