Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
mkdocs-nav-enhancements
Advanced tools
This is a small plugin for the excellent MkDocs project which makes some enhancements to the navigation.
This is a small plugin for the excellent MkDocs project which makes some enhancements to the navigation.
By default, MkDocs looks for a level 1 atx-style header found at the top of the document and uses that for the page title.
If you are dealing with documentation from third-party sources you may find that some of them start their titles at level 2 (possibly for aesthetic reasons), or use setext-style headers instead.
This plugin will try to help by looking through each Markdown document and using the following rules to detect a page title instead:
Use the first atx-style header found in the document at any level between 1 to 6, which is any line beginning with between 1 to 6 '#' characters.
Or use the first setext-style header, which is any line where the line immediately after contains only '=' or '-' characters, effectively 'underlining' the line.
It will also remove any additional markup that is found in the title, such as image or link tags, which would otherwise be rendered as string literals in the generated HTML.
In order to de-clutter the navigation, the plugin looks for any sections containing only one page, and tries to collapse that page up a level into its parent. This helps deal with navigation bars filled with single-page folders to keep things looking tidy.
Install the plugin:
pip install mkdocs-nav-enhancements
Add the plugin to your mkdocs.yml
MkDocs configuration file:
plugins:
- mkdocs-nav-enhancements
When changing the page title, or collapsing single-page folders, this can sometimes result in the effective page title being quite different. Currently this plugin does not re-sort the nav bar alphabetically when this happens.
A second issue is that these options are not independently controllable, at least not in the first version; it's all or nothing for now!
Source code is hosted at GitHub.
Please report issues and feature requests on GitHub Issues.
Pull Requests are also welcome!
FAQs
This is a small plugin for the excellent MkDocs project which makes some enhancements to the navigation.
We found that mkdocs-nav-enhancements demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.