On 20/04/2012, at 7:55 AM, Dave Everitt wrote:
> I have a contact form (contact/index.html) with a script that returns
> one of three static html pages according to input. I usually use the
> following structure:
> I've looked through the manual but can't see a way to compile the
> above structure with nanoc? I'd rather not have it generate contact/
> contact-thanks/index.html etc.
That's what we needed for our sites too.
You can probably (pretty much) cut-n-paste our Rules file, into your own:
Look specifically at lines 51 + 52:
# Write out haml files with a flat dir structure
item.identifier.chop + '.' + 'html'
That's what gives it the flat structure. Note that I had to surround that
with a sanity check (line 48), so nanoc doesn't barf if it comes across an
index.haml file in a subdir. You may or may not need that bit. :)
Hope that helps.
Regards and best wishes,