Closed holtzermann17 closed 2 years ago
It should still be possible to have multiple h1 tags provided that your layouts/*.clj files render entire documents (ie, you are not rendering a specific h1 headline). However, perhaps it could be made possible to render the headline size relatively (so, if you (render "my-headline") and my headline
is "3 stars deep" in your org tree, the first headline would still be an h1, and so forth. With that said, this is an area where the domain of org does not map perfectly to the web (ie. infinite levels of org bullets and only 6 heading tags). Not sure what to do here, so I'm going to say we should stick with what we have until a clear solution pops up. I'm also partial to the idea that each document should have only one h1 - the title of the doc.
This is possible with 0.16 onward in the render function:
<div>
{{render(update_level=1)}}
</div>
Where update_level will bump all headlines up one level (and update_level=-1
) will bump all headlines down a level.
This change in
title->html
will achieve it, and probably wouldn't negatively affect things like table of contents?— Compare: https://github.com/theiceshelf/firn/blob/master/clojure/src/firn/markup.clj#L573-L579
Maybe the remapping should be an option, for people who prefer to have multiple
h1
tags? To my mind it seems better to have only one, but I understand that there's a debate about this.