
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
@tradegecko/static-site-toc-generator
Advanced tools
Adds a ToC array to broccoli-static-site-json ouput
This is addon is intended to be used with broccoli-static-site-json
The JSON should have the following shape
{
data: {
attributes: {
html: ''
}
}
}
The output JSON will be
{
data: {
attributes: {
html: ''
toc: [
{
level: //what h tag was it [1,2,3,4]?
id: //the id of the htag
label: //the innerText of the htag
}
]
}
}
}
The ToC array is flat and the order of the tags in the order that they were found in the HTML.
npm install @tradegecko/static-site-toc-generator
const jsonTree = new StaticSiteJson(folder, staticSiteConfig);
const jsonTreeWithToc = new MarkDownTableOfContents(jsonTree, {depth: siteGeneratorOptions.markdownTocDepth});
Now you should use jsonTreeWithToc for the rest of your pipeline since the original output of StaticSiteJson does not contain the toc attribute.
Below is an example ember component consuming the array.
<nav class="navigation">
<ul class="list">
{{#each @toc as |toc|}}
<li class="list-item">
<a class="link" href="#{{toc.id}}">{{toc.label}}</a>
</li>
{{/each}}
</ul>
</nav>
FAQs
Adds a ToC array to broccoli-static-site-json ouput
The npm package @tradegecko/static-site-toc-generator receives a total of 0 weekly downloads. As such, @tradegecko/static-site-toc-generator popularity was classified as not popular.
We found that @tradegecko/static-site-toc-generator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.