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!

4

1 回答 1

0

Rules您可以在以下方法中使用 Ruby 代码postprocess

postprocess do
  items.each do |item|
    if item.identifier.to_s.end_with?(".js")
      # Do stuff
    end 
  end
end
于 2016-11-10T23:59:23.420 回答