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:
> contact/
> index.html
> contact-thanks.html
> contact-blank.html
> contact-spam.html
> 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.
Hi Dave,
That's what we needed for our sites too.
You can probably (pretty much) cut-n-paste our Rules file, into your own:
https://github.com/aeolusproject/aeolus-website/blob/master/nanocsite...
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,
Justin Clift