You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expose post content rendering helper in PostExtension #175
I've got a couple of extensions, TableauExcerptExtension and an as-yet-unpublished revisions tracking extension where I've got meta-content in frontmatter that should be written in the same format as the main content.
Right now, that only works reasonably well for markdown posts because Tableau.markdown/2 exists. However, if each post has a render_content/1 function included (similar to the renderer function attribute), this could be handled for extended content types without special handling‡.
Tableau.PostExtension.post() would need to be updated to include a render_content, function, and Tableau.Page.t() would need to be updated so the same function is exposed for use just like page.template.
This would allow post rendering to do something like this (Temple example in a index page):
divdopost.render_content.(post.excerpt)end
‡ There is special handling in an upcoming version of TableauExcerptExtension because it has to do some processing of the content, but that's something separate.
This feature definitely affects TableauExcerptExtension, which grabs text from the post and puts it into the excerpt key of post frontmatter — it's going to be the same format as the post is written in.
In my site, I also have a revisions block in my frontmatter, which looks something like:
revisions:
- rev: | description of the change date: '2026-03-12T22:02:23Z'
It's assumed that any text written in the rev entry of the frontmatter is using the same content format, so if you've written it with a Djot converter, you should also use the Djot converter for this text.
It introduces a Tableau.Converter.convert/2 function that Post and Page extension use internally to render content. You can do Tableau.Converter.convert(content, ext: :md) (substitute :md for the extension configured for the converter you want to use.)
Activity
halostatue commentedon Feb 9, 2026
Similarly -- and I've needed this in a couple of extensions -- adding
extto the post and/or page type would reduce instances of:or anything similar.
evantravers commentedon Mar 8, 2026
I'm wondering… would this strategy mitigate the problem I'm seeing in #176? (escaping issues when using heex)
halostatue commentedon Mar 13, 2026
@evantravers probably not directly.
This feature definitely affects TableauExcerptExtension, which grabs text from the post and puts it into the
excerptkey of post frontmatter — it's going to be the same format as the post is written in.In my site, I also have a
revisionsblock in my frontmatter, which looks something like:It's assumed that any text written in the
reventry of the frontmatter is using the same content format, so if you've written it with a Djot converter, you should also use the Djot converter for this text.mhanberg commentedon Oct 11, 2026
I think #193 will close this.
It introduces a
Tableau.Converter.convert/2function that Post and Page extension use internally to render content. You can doTableau.Converter.convert(content, ext: :md)(substitute:mdfor the extension configured for the converter you want to use.)