Reputation: 10604
I have some additional processing, and would like to generate some javascript files based on existing content.
Therefore, I need my code to be called after the site compilation and generation, so I can create new files in the output.
How to do that in nanoc? Thank you!
Upvotes: 1
Views: 40
Reputation: 870
You can use Ruby code in Rules
with the postprocess
method:
postprocess do
items.each do |item|
if item.identifier.to_s.end_with?(".js")
# Do stuff
end
end
end
Upvotes: 0