Reputation: 393
I'm building a site with Nanoc and have one file (with it's own layout file) that reads all other files metadata, does some magic and saves the file. Unfortunately, this process takes a long time and developing other views with autocompile is taking ages. Is it possible to add some files to ignore list that won't be enqueued to compilation (and during compilation to production remove them from ignores)? Or are there other methods to achieve this?
Upvotes: 1
Views: 581
Reputation: 826
Did you tried the Nanoc Doc recommendation:
ignore '/assets/layouts/your_files/*/'
Upvotes: 0
Reputation: 1010
To the best of my knowledge, nanoc will always read all data from your contents directory. You can remove files from further processing by implementing a preprocess
method which removes some generated items
entries... e.g. in Rules
:
preprocess do
skip_unimportant_items
end
In a .rb file in lib/:
def skip_unimportant_items
@items.delete_if { |i| !i[:important] }
end
This will remove all items which have no important
element (or the element set to false) in their respective metadata.
Upvotes: 1