Clean doesn't clean non-post pages
I'm moving my website to Frog. I've added several pages as scribble
files in src/, e.g., src/index.scrbl, src/papers.scrbl. I've
changed the blog indexes and posts to be under /blog, and left the
output-dir as .
When I run raco frog -c everything under /blog, /feeds, and
/tags is removed, but none of the html files generated from the
scribble pages are removed. For example, index.html is generated from
index.scrbl but is not removed by clean.
You're right, it's not attempting to delete those non-post pages. The comment in the source acknowledges this, but the -h help implies --clean would do more, and common-sense might imply that, too.
I didn't tackle this yet because (a) I assumed users -- i.e. just me at the time :) -- would have few such files and deleting them manually wouldn't be a PITA. And because (b) anything that deletes files, I'm cautious. So low-benefit / high-risk = postpone.
However either I should fix the help message, or add the feature. Would you find it useful, now?
I would find it useful, but you're right to be cautious. I was worried about using it at first because I have a manually written HTML page.
This is something I found surprising as well. Since my site doesn't end up having any manually written pages, for me having it delete non-post pages is desirable and I ended up writing a clean shell script so that I can go ./clean scrub to remove index.html, about.html and so on.
Perhaps a solution would be to leave the existing clean option as it is, update the help message to state that -c doesn't remove non-post pages, and added a second option (maybe -C) that cleans up all the generated non-post html files.
For my clean script I couldn't think of a better way to find non-post pages than just assuming that all non-page posts are generated, making ./clean scrub just delete all the html files (deleting only non-post pages that have an equivalent markdown or scribble file would leave you in the undesirable state where pages that have been deleted or renamed don't get removed). If however, someone does have manually written html, perhaps add an entry in the .frogrc that specifies paths to html files that frog -C should skip over?
hm, that was a bit more rambleish than I anticipated.
For what it's worth, I too was a bit confuzzled that "raco frog -c" didn't clean up everything generated by "raco frog -b"