Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
@anywhichway/autohelm
Advanced tools
A library to support standardized table of contents and footnote navigation in HTML files
A library to support standardized table of contents and footnote navigation in HTML files.
Early version of documentation ...
npm install --save @anywhichwya autohelm
Add a heading in your HTML file with the class "autohelm-toc" at the location you want the TOC.
<h1>Introduction</h1>
Some intro text
<h1 class="autohelm-toc">Table of Contents</h1>
<h1>Section One</h1>
Some content with a footnote.<span class="autohelm-footnote">a footnote</span>
<h1>Section Two</h1>
Add JavaScript something like this:
import {buildFootnotes,buildTOC,engage} from "autohelm";
document.addEventListener((DOMContentLoaded) => {
buildFootnotes(); // if your doc has footnotes, i.e. elements with the class autohelm-footnote (usually spans)
buildTOC();
engage();
})
See the site https://secst.org for an example of heavy use of Autohelm.
2023-12-17 v0.0.34 Remove TOC from the TOC itself.
2023-12-17 v0.0.33 Fixed issue with previous and next arrows navigating to wrong place.
2023-12-17 v0.0.32 Further improvements to section heading selection.
2023-12-17 v0.0.31 Improved useSections to only select headers that are the first child of a section.
2023-12-16 v0.0.30 Removed some secondary heading filtering.
2023-12-16 v0.0.29 Added option 'useSections' which will only use headings that are the first child of a section element.
2023-12-08 v0.0.28 Added option 'directChildren' to init in addition the buildTOC.
2023-12-08 v0.0.27 Added option 'directChildren' to restrict headings to only those that are direct children of the node being searched for headings.
2023-12-04 v0.0.25 Reduce size of open/close caret
2023-12-04 v0.0.24 First documented public version
FAQs
A library to support standardized table of contents and footnote navigation in HTML files
The npm package @anywhichway/autohelm receives a total of 5 weekly downloads. As such, @anywhichway/autohelm popularity was classified as not popular.
We found that @anywhichway/autohelm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.