My nanoc site has footers with something like:
<div>© MyCompany <%= $current_year %></div>
where $current_year = Time.now.year
When the year changes the site needs to be recompiled, but nanoc will use the cached value until the cache is invalidated by removing the tmp folder.
My current solution is to store the current year in a txt file in the tmp folder and then hook a script in some where that checks if the year changed and it then deletes the tmp folder and aborts with a message that says to run "nanoc compile" once more. It works but is very hacky. Any ideas how to do this cleaner? Does nanoc expose a way to tell it to mark its caches as outdated?