-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
One-off no-content templates in content directory #693
Comments
I think simply put, we need to be able to have template files parsed and rendered wherever they're found. |
Gotcha, need to work out how this fits into the pipeline (does this file get added to the content store as a piece of "content", does it actually need the metadata header etc.). Should have a better idea of the scope of work required then. |
It should be able to access the same information as a template. Is it a piece of content? I would say yes. |
@jonbullock Any progress on this issue? It's the number one issue for us. Any clues on where to start if we want to fix this ourselves? |
@ge0ffrey No progress yet, all I can say is that it's still on my to do list. |
* Option jbake-org/jbake#693 * Option using interpret * wire talks.html from index
Hi, if this helps I've experimented with an alternative approach which works (with limitation of file-extension, below) but does not require the workaround to define a single template instance file per each one-offs. You can see it in action here:
The downside: in In other words I edit the |
I have a team.html page which list all our contributors.
That needs to get generated through an
ftl
template that reads fromdata/users.yml
. There is no other html page like it, that would reuse this layout. It's a one-off template.I have several other pages (download.html, documentation.html) that require a one-off template.
In fact, index.html is a natural one-off template. So is
feed
andarchive
(butpost
andtag
are not because they create multiple output pages).What I need to do now (workaround):
content/community/team.html
:jbake.properties
add:templates/community_team.ftl
:Proposal A) What I want to do:
content/community/team.html.ftl
:The output filename is the template name without the ".ftl" suffix.
Similarly,
content/blog/feed.atom.ftl
andcontent/blog/feed.rss.ftl
can create an Atom and RSS feed for a single website.Requirements:
<#import "../../templates/normalBase.ftl"
should work.content.body
should not resolve to null, so these one-off templates can easily extend layout templates.The text was updated successfully, but these errors were encountered: