emacsorphanage / org-page

[INACTIVE] A static site generator based on Emacs and org mode.
674 stars 99 forks source link

Date and tags after post title, not in footer #92

Closed kit1980 closed 2 years ago

kit1980 commented 9 years ago

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?

sillykelvin commented 9 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.

shackra commented 9 years ago

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!!

sillykelvin commented 9 years ago

Yeah, I will do some evaluations on this, thanks for the advice!

Linuus commented 8 years ago

Yes! This would be awesome! :+1: