I am maintaining a long-lived project based on mdbook (Bevy Cheatbook) that I am regularly updating and reorganizing. This often means deleting outdated content. Some of my pages include/embed other markdown files in their body.
Currently, I found no easy way to make sure I don't have any stale files left in the repo. If I delete a page from SUMMARY.md, but forget to remove the file, or if one of the included files is no longer used anywhere, there is nothing that can detect that.
Would be nice to have some way to detect and remove (garbage collect) files in src that are unnecessary / no longer used anywhere.
This seems a bit difficult to do, considering that other custom plugins may use such files. Couldn't you write a custom preproc that decides which files are in use, and thus which aren't?
I am maintaining a long-lived project based on
mdbook
(Bevy Cheatbook) that I am regularly updating and reorganizing. This often means deleting outdated content. Some of my pages include/embed other markdown files in their body.Currently, I found no easy way to make sure I don't have any stale files left in the repo. If I delete a page from
SUMMARY.md
, but forget to remove the file, or if one of the included files is no longer used anywhere, there is nothing that can detect that.Would be nice to have some way to detect and remove (garbage collect) files in
src
that are unnecessary / no longer used anywhere.