I'm new to docpad and a lot of the things which it's based upon, therefore sorry if this question might seem a bit dumb. So far docpad is the most designer-friendly one of the recent static site builder out there, that's why I even made it until here :) Thanks for the amazing documentation!
What I'd like to achieve is the following:
The metadata section sounded good for that, but it does not allow any markup languages in there, right? So where can I define those different "paragraphs" and how can I access them via the template?
Thanks, Philipp
So you could do the following:
--- cson
someContent: """
# h1
p1
"""
---
<%- @document.someContent %>
And name the file blah.html.md.eco
so render the eco first which wil inject someContent, then it will render with markdown, rendering someContent.
We also had --- cson
to say use CSON to parse the meta data rather than the standard YAML parser. I find CSON easier to write for more advanced things and multi-line inputs.
Alternatively for the rendering aspect, you can use the text plugin to specify how pieces of content should be rendered like so:
--- cson
someContent: """
<t render="md">
# h1
p1
</t>
"""
---
<%- @document.someContent %>