Skip to content

Util: Move toc ID in parseMarkdown from icon to heading #90

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

Merged
merged 1 commit into from
Oct 30, 2023
Merged

Conversation

Krinkle
Copy link
Member

@Krinkle Krinkle commented Oct 12, 2023

Currently, the heading IDs are not actually on the heading elements. This means that scrapers such as Algolia and Typesense often link text excerpts under a heading to something far away like #content instead of the nearest preceeding heading.

For semantics, and to benefit search suggestions, I think the heading IDs are better suited on headings.

Screenshot

Ref jquery/infrastructure-puppet#33.

Currently, the heading IDs are not actually on the heading
elements. This means that scrapers such as Algolia and
Typesense often link text excerpts under a heading to
something far away like `#content` instead of the nearest
preceeding heading.

For semantics, and to benefit search suggestions, I think the
heading IDs are better suited on headings.

Ref jquery/infrastructure-puppet#33.
@mgol mgol merged commit 06106bb into main Oct 30, 2023
@mgol mgol deleted the md-heading-id branch October 30, 2023 08:51
Krinkle added a commit to jquery/jquerymobile.com that referenced this pull request Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants