I'm playing around with the Harp static site generator and there is this blog example around everywhere, see for instance: http://kennethormandy.com/journal/start-a-blog-with-harp
I was asking if there is a way to set a default jade template/partial for all articles instead of defining one for each article which seems rather inconvenient to me?
E.g. outline of my app
/public
/articles
_data.json <--- json with my articles
article.jade <--- I would like to have one template for all articles
instead of having to add files:
article1.jade,
article2.jade, ...
/index.jade
/articles/_data.json
{
"article1": {
"title": "Some article"
},
"article2": {
"title": "Another one"
}
// eventually some more articles ...
}
/index.jade
...
ul
each article, slug in public.articles._data
li
a(href="/articles/#{ slug }") #{ article.name } // generated link only works when for each slug (e.g. "article1") a jade file exists
...
Is there a simple way to do that?