Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Posts title levels should be shifted at rendering time #49

Open
gasche opened this issue Feb 23, 2017 · 2 comments
Open

Posts title levels should be shifted at rendering time #49

gasche opened this issue Feb 23, 2017 · 2 comments

Comments

@gasche
Copy link
Contributor

gasche commented Feb 23, 2017

If you use # to mark sections in your blog posts and ## for subsections, they get translated literally to <h1> and <h2>, which is bad as the sections then conflict with the level of the blog post title. Currently the workaround is to manually increment the headings in the blog post, but I think that it would be nicer if the blog engine shifted the headings level accordingly (when I write a post, I think of the headings level locally for the post, I don't have the whole site architecture in mind).

In fact, I realize now that using <h1> for the post title also conflicts with the "Inside PRL" header that is, as it should, a <h1> heading itself. So the post title should be <h2>, and the sections <h3>. This supports the argument that post authors cannot know in advance how much to shift their headings, so it should be done at post rendering time.

Having this feature would require modifying Frog itself. If we do modify Frog, we have to think of a transition strategy for old posts (are there shifted, and they should be de-shifted, or do they suffer from the same issue?). Or we could make it an option at the Frog level, so that blog posts could opt in or out of heading translation.

@gasche gasche changed the title Posts title levels should be increased by one Posts title levels should be shifted at rendering time Feb 23, 2017
@bennn
Copy link
Member

bennn commented Feb 23, 2017

We can change _src/post-template.html to make the post title an <h2>.

I think post authors should do the shifting (if we modify Frog, we'll need to change how it renders Scribble documents [like Asumu's blog post[)

@gasche
Copy link
Contributor Author

gasche commented Feb 23, 2017

We can change _src/post-template.html to make the post title an <h2>.

But if we do this we may have to adapt the CSS to keep the rendering intact. Nice in theory, in practice I'm not sure it's the best use of anyone's time. (The heading-in-posts issue will keep repeating, but it sounds harder to fix.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants