Documentation Guides

clean #

Over time, your source directory can accumulate orphaned files — markdown pages removed from SUMMARY.md, old images, unused code samples, etc. The clean command identifies all files in the source directory that are not referenced and lets you delete them.

$> romero clean

romero will parse the SUMMARY.md file and scan all referenced markdown pages for includes and images. Any file in the source directory that is not referenced by any of these is considered orphaned and listed for review:

$> romero clean
The following 3 file(s) are not referenced by SUMMARY.md or any include/image directive:

  src/images/unused.png
  src/old-page.md
  src/orphan-dir/stale.txt

Delete these files? [y/N]

After confirming, romero will delete the orphaned files and remove any directories left empty as a result.

The following references are tracked:

Note

External URLs (starting with http:// or https://) are ignored — only local file references are tracked.