fermyon/bartholomew

Create dynamic template feature

Opened this issue · 4 comments

At present, each .md file can only have one static .hbs file referenced in the frontmatter.

It would be great to have dynamic templates instead of hard-coded templates, per .md file.

See this link in developer docs for more information.

How would the template be specified dynamically? One of the ways I can imagine is through request parameters.

That is what I was also thinking; if a user clicks on a link from a page in the site that uses a specific template i.e. after clicking they arrive at a new page (from template_1.hbs). No matter what page they have just landed on, the arrival at the new page is rendered using that same template_1.hbs (and not the .hbs that is typed into the frontmatter).

If leaving the original hard-coded .hbs template name in the frontmatter is possible (as part of this upgrade) then this would be a really quick update for the developer documentation (would not have to update every .md files frontmatter). But I understand if each .md needs to have a dynamic value in place of that original hard-coded value. Still thinking at this stage so any ideas are welcome :)

This has been resolved via PR #616