Closed kit1980 closed 2 years ago
Yeah, this is because parameters date
and tag-links
are not exported to other templates except footer.mustache.
However, it is easy to export them to other templates, let's say, you want to export them to nav.mustache, then just compare the two functions op/render-navigation-bar
op/render-footer
, copy the missing parameters from the latter to the former.
This is a temporary solution, I will consider solving this by a more generic one.
a very generic solution, so any sort of variables can be use on any custom/standard mustache template.
I wonder if it is possible to define any variable in org as #+CUSTOM_VARIABLE
, I could use certain custom variables to modify the template and/or add extra information to the generated posts, i.e.: setting a variable as #+COVER_IMG: https://i.imgur.com/example.png
and then using {{cover_img}}
as <meta property="og:image" content="{{cover_img}}" />
on header.mustache
template, setting your posts ready for social media! This would be a very useful and killer feature on org-page!!
Yeah, I will do some evaluations on this, thanks for the advice!
Yes! This would be awesome! :+1:
In my custom theme I copied code for date and tags from footer.mustache to post.mustache (I've also tried header and nav template just to test) - and the code works in footer.mustache only. I think it's because {{date}} and {{tag-links}} are empty for other templates.
Is it possible to make custom theme to show date and tags after post title, not it footer?