0.7.4 gives the Ambient pack weather. A page names one feed URL on its own site, and the pack sets data-weather from it, uses its sunrise and sunset for dawn and dusk, and never shows a stale observation. Helpers for producing the feed from Open-Meteo are included. Ambient p…
Leave a heading, or every heading in a container, out of the page-toc table of contents and the heading-links anchor links.
Overview
data-toc-ignore keeps headings out of the generated table of contents. Put it on a heading to skip that heading, or on any ancestor to skip every heading inside it. Both <page-toc> (no ToC entry) and <heading-links> (no id, no anchor link) honour it.
The ToC is built from the flat list of headings, so ignoring a single h2 does not ignore the h3s after it: they are listed under the previous h2. To leave a whole section out, put the attribute on the <section>.
Skipped without the attribute
Both components also skip headings inside a <dialog> or a <browser-window> (demo frames). <page-toc> additionally skips headings that are not rendered (hidden, or a data-visible variant hidden at this width, checked when the ToC is built) and headings without an id; <heading-links> is what gives headings ids. Headings inside a closed <details> are kept, because following the link opens it.
Live updates
Adding, removing or moving data-toc-ignore takes effect immediately: <heading-links> adds or removes the anchor, and an auto-generated <page-toc> rebuilds when its heading list changes (it watches its scope for added and removed headings and for data-toc-ignore, id and hidden changes). A <page-toc> with hand-written links is not rebuilt; call refresh() after changing it.
Events
None.
Styling
None: the attribute changes which headings are listed, not how anything looks.
Accessibility
Ignored headings stay real headings: screen-reader heading navigation still finds them. Use the attribute for headings that belong to an example or an aside, not to hide structure.
Ignored headings get no anchor link from <heading-links>, so they cannot be shared as a deep link unless you give them an id yourself.
Related
<page-toc> — the table of contents and its levels / scope attributes (use scope to limit the ToC to one region instead of ignoring everything else).