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

Add id attributes to heading elements #55

Merged
merged 1 commit into from
Aug 20, 2024
Merged

Add id attributes to heading elements #55

merged 1 commit into from
Aug 20, 2024

Commits on Aug 17, 2024

  1. Add id attributes to heading elements

    This changes the generated HTML to include `id` attributes on any heading (e.g. `h3`) elements.
    
    Currently, `bit-docs-html-toc` will add `id` attributes when it parses the content and creates the TOC links. This means that JS has to be downloaded, parsed, and run before `bit-docs-html-toc` runs its code, and _then_ there has to be more JS to scroll down to the right fragment.
    
    This takes JS completely out of the equation by including the `id` attributes in the source HTML, so JS doesn’t need to load and `bit-docs-html-toc` isn’t required to make fragment URLs work either.
    
    Part of https://bitovi.atlassian.net/browse/LD-203
    chasenlehara committed Aug 17, 2024
    Configuration menu
    Copy the full SHA
    3a5654a View commit details
    Browse the repository at this point in the history