1

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!

igr
  • 10,199
  • 13
  • 65
  • 111

1 Answers1

0

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
Connor Shea
  • 795
  • 7
  • 22