Did you change nanoc.yaml
after nanoc create-site
? Because I recall that by default, identifiers in nanoc
don't contain the last index
part of source file name.
Say, file content/dirA/index.markdown
will have identifier /dirA/
or something, and compile to content/dirA/index.html
. This may be the reason why your index
regex didn't hit.
Yes, a little tricky, but nanoc is great.
update
I found a way to tell the content filename: item.raw_filename
.
This document says it is only for binary files, while it also work on text files in my experiment.
# in compile block of Rules
item.identifier
# => "/aaa/"
item.raw_filename
# => "content/aaa.markdown"