Dynamic categories with docpad -


i have following posts in blog :

src/documents/posts/foo.html.md

--- category: cooking --- 

src/documents/posts/bar.html.md

--- category: programmation --- 

i generate following routes :

http://example.org/cooking/ http://example.org/programmation/ 

where each route have collection posts in selected category. posts still in standard place :

http://example.org/posts/foo.html http://example.org/posts/bar.html 

bonus point : able list categories in layout. :

<% cat in @getcategories() %>     <a href="<%= cat.route %>"><%= cat.name %></a> <% endfor %> 

is there plugin existing give these kind of functionalities ? if not, what's best way starting implementing ?

i have seen setfilter method in this answer, i'm still struggling find out how generate new pages after parsing every posts fetch categories.

if dynamic page generation cannot achieved (which understand, since require parse pages in specific order), having static array in configuration make easier ?

have @ related plugin :

https://github.com/docpad/docpad-plugin-related

as far know doesn't generate tags pages automatically you, that's start.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -