Output in individual files, not folders

2 views
Skip to first unread message

Satheesh Babu Vattekkat

unread,
Nov 11, 2009, 7:07:38 AM11/11/09
to nanoc
I discovered nanoc recently and have started playing with it for a
day. One issue I've is that the output is usually in /path/index.html.
I'd like it to be rather on /path.html. No particular reason, I just
like it that way - thats all.

Is this easily possible to do this?

- thanks

Denis Defreyne

unread,
Nov 11, 2009, 7:10:24 AM11/11/09
to na...@googlegroups.com

Hi,

Yup, you can customize the routing rules to get the behaviour you
want. You probably have a rule
route '*' do ; item.identifier + 'index.html' ; end
in your Rules file. An item identifier is something like "/path/", so
this rule will result in a file being written to "/path/index.html".
If you want to output to "/path.html" instead, you can use this:
route '*' do ; item.identifier.chop + '.html' ; end

Hope this helps,

Denis

--
Denis Defreyne
denis.d...@stoneship.org

Reply all
Reply to author
Forward
0 new messages