cyberneticlibrary

Move and reorganize documentation

move-pagecommandsetup L11
axoflow/docsy-axoflow
What it does

Move documentation page or directory with link rewriting

Best for

Documentation sites where URL stability matters (SEO, existing links) and bulk link maintenance is manual burden.

Inputs
  • · Source path (relative, e.g., content/docs/old-section/page.md)
  • · Destination path (relative)
Outputs
  • · File moved via git mv (preserves history)
  • · Old URL in moved file's front matter as alias
  • · All xref/relref/ref: links rewritten across content/
  • · Hugo build verification
Requires
  • · git
  • · Python script (move_hugo_files.py)
  • · Hugo
Preconditions
  • · Docsy Hugo theme installed
  • · content/ directory structure initialized
  • · Hugo configured
Failure modes
  • · Broken links in build output — rewrite pattern misses a reference type
  • · File not found on move — script silently skips (user must verify)
  • · Hugo build errors after move — old alias or xref syntax invalid
Trust signals
  • · Preserves git history via git mv (not copy-delete)
  • · Automatic alias injection (old URL still works)
  • · Hugo build verification prevents silent breakage