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

Fixed indenting in ToC when heading levels are skipped #13

Closed
wants to merge 2 commits into from

Conversation

malikashish8
Copy link

@malikashish8 malikashish8 commented Sep 2, 2018

Fixed ToC for cases such as:
# header 1
#### next header

Fixed ToC for cases such as:
# header 1
#### next header
@allejo
Copy link
Owner

allejo commented Sep 2, 2018

So, I consider this to be expected behavior as a way to encourage people to use semantically correct headings while writing content. Is there a reason your content is skipping headers?

I'm entirely open to reconsidering my stance on this if there's a valid use case for it.

Fixed issue:
\# h1
\### h3
\### h3

would become in ToC:
\#
\##
\##
@allejo
Copy link
Owner

allejo commented Sep 2, 2018

Hmm not quite what I meant. What I mean is, what type of content are you writing where skipping headings makes sense? Headings are typically used to denote new sections of related text.

As an example,

## Installation

### Installing Manually

### Installing from the App Store

If you're using different heading levels simply to change the size of the font, that's an issue to fix with CSS not with a different HTML tag. Using different HTML tags can pose accessibility issues.

@stale
Copy link

stale bot commented Sep 16, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Sep 16, 2018
@allejo
Copy link
Owner

allejo commented Sep 16, 2018

Thanks for your work here, @malikashish8! Since I haven't heard a compelling argument as to why headings would be placed out of order, I'm going to close this PR.

I'm open to revisiting this again if there's an argument for it. Otherwise, the benefit of this being written in Liquid is that anyone can always keep/make the changes in their own copy of the snippet in their own Jekyll site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants