> In your rules file, you'll need to make a route for those items under
> the category path.
>
> route '/category/*' do
> item.identifier.sub(/^\/category\//,'') + "index.html"
> end
>
> This route would remove the category folder at the beginning of the
> item's identifier and append the index.html to the end. The good thing
> about doing it as a route is that it becomes part of the item and you
> can call the item's path to get the corrected output location.
>
> Nanoc is really flexible in letting you put your files wherever you
> want, you just have to update the routing to tell it where.
Hi,
That's a good answer, except that nanoc is spelled nanoc, not Nanoc. :)
A more general route could be this:
route '*' do
item.identifier =~ %r{/([^/]+)/$}
last_part = $1
"/#{last_part}/index.html"
end
I guess you get the idea. :)
Regards,
Denis
--
Denis Defreyne
denis.d...@stoneship.org