Nest exported wiki docs under collection/parent folders

Outline docs with the same title under different parents (e.g. Peer Support
Playbook > Session Guides > Session 0 vs Manual > Session Content > Session 0)
were silently overwriting each other under the flat {collection}--{title}.md
naming, dropping 9 of 99 docs on every export. Use the full slugified doc
path instead, and have orphan cleanup scope to known collection-slug roots
(sweeping legacy flat files too) so sibling dirs like hub/, _local/, .claude/
stay untouched.

Also switch the cron's git add to -A so doc deletions and renames in Outline
actually propagate.
This commit is contained in:
Jennie Robinson Faber 2026-04-21 13:12:19 +01:00
parent bac3fc6dd2
commit 16aef35682
2 changed files with 58 additions and 15 deletions

View file

@ -30,8 +30,9 @@ fi
# Run export
node scripts/export-content.js
# Commit and push if there are changes
git add content/wiki/
# Commit and push if there are changes. -A stages deletions and renames too,
# so docs removed or renamed in Outline actually propagate to git.
git add -A content/wiki/
if ! git diff --cached --quiet; then
git commit -m "wiki content export $(date +%Y-%m-%d)"
git push