The first thing that came to mind would be to set up a bash alias (e.g. `
compileall` that runs `
touch toc.md.erb; nanoc compile`, if just changing the date and not the contents of a file will trigger Nanoc to recompile that file. If that doesn't do it:
Set up `compileall` like before as an alias, but use find and mv to change the filename to a unique timestamp with seconds before the `nanoc complile` command, which would make nanoc recompile:
find ./ -name ./toc-*.erb -exec mv {} ./"toc-$(date +"%F-%H-%M-%S").erb" \;
"./" can be replaced with whatever path is needed
A test:
Filename before: toc-2021-08-25-14-09-23.erb
Filename after: toc-2021-08-25-14-15-35.erb
If neither approach appeals, perhaps add a commented-out version number or date at the top of "toc.md.erb" that you change with awk, then run as an alias as before (sorry, no examples for this one!)