Re:Start a blog with Harp
by krrishd on Tuesday October 15, 2013 @05:36PM
(#6556535)
What do you suggest to be able to have the <title> element on a blog post while using a layout?
[ Parent
| on HN ]
Re:Start a blog with Harp
by kennethormandy on Tuesday October 15, 2013 @05:39PM
(#6556549)
Hey krrishd, if you’re using a variable as your title, Harp will use the correct one in the correct context: https://gist.github.com/kennethormandy/6834709
Thanks :) Makes much more sense now. Also, is there any way to pass metadata to a markdown file?
Re:Start a blog with Harp
by kennethormandy on Tuesday October 15, 2013 @08:30PM
(#6557299)
You’re welcome! It’s not directly possible, as technically Markdown isn’t a templating language. It’s explained a little here: http://harpjs.com/docs/development/partial#markdown
Depending on what you are trying to do, you could have your Markdown files “wrapped” in a partial, and do whatever you need to with the metadata there.