Skip to main content

Docums Nav Enhancements

This is a small plugin for the excellent Docums project which makes some enhancements to the navigation.

Features

Enhanced titles

By default, Docums 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.

Reduced folders

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.

Usage

Install the plugin:

pip install docums-nav-enhancements

Add the plugin to your docums.yml Docums configuration file:

plugins:
  - docums-nav-enhancements

Known issues

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!

Metadata

Release files for docums-nav-enhancements 0.9.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for docums-nav-enhancements 0.9.1
File Size Uploaded Provenance
docums-nav-enhancements-0.9.1.tar.gz 4.3 kB Without provenance Details

Release files / docums-nav-enhancements-0.9.1.tar.gz

Download URL docums-nav-enhancements-0.9.1.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2fc2bfe9c6efa53891db7f9e1284e9a376f47c53cb7c49712d8e19e00247c6df
BLAKE2b-256 checksum
How to use checksums
05cebf2842dc3622e1f94743a043eba4e687b823ea09cc8cacba38f3e233b408
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.4

Security for docums-nav-enhancements 0.9.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.9.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page