docums-autorefs
Automatically link across pages in Docums.
Installation
With pip:
python3 -m pip install docums-autorefs
Usage
# docums.yml
plugins:
- search
- autorefs
In one of your Markdown files (e.g. doc1.md) create some headings:
## Hello, world!
## Another heading
Link to [Hello, World!](#hello-world) on the same page.
This is a normal link to an anchor. Docums generates anchors for each heading, and they can always be used to link to something, either within the same page (as shown here) or by specifying the path of the other page.
But with this plugin, you can link to a heading from any other page on the site without needing to know the path of either of the pages, just the heading title itself.
Let's create another Markdown page to try this, subdir/doc2.md:
We can [link to that heading][hello-world] from another page too.
This works the same as [a normal link to that heading](../doc1.md#hello-world).
Linking to a heading without needing to know the destination page can be useful if specifying that path is cumbersome, e.g. when the pages have deeply nested paths, are far apart, or are moved around frequently. And the issue is somewhat exacerbated by the fact that Docums supports only relative links between pages.
Note that this plugin's behavior is undefined when trying to link to a heading title that appears several times throughout the site. Currently it arbitrarily chooses one of the pages.
Requirements
docums-autorefs requires Python 3.6 or above.
To install Python 3.6, I recommend using pyenv.
# install pyenv
git clone https://github.com/pyenv/pyenv ~/.pyenv
# setup pyenv (you should also put these three lines in .bashrc or similar)
export PATH="${HOME}/.pyenv/bin:${PATH}"
export PYENV_ROOT="${HOME}/.pyenv"
eval "$(pyenv init -)"
# install Python 3.6
pyenv install 3.6.12
# make it available globally
pyenv global system 3.6.12
Metadata
Release files for docums-autorefs 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| docums_autorefs-0.3.1.tar.gz | 8.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| docums_autorefs-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.7 kB
Release files / docums_autorefs-0.3.1.tar.gz
| Download URL | docums_autorefs-0.3.1.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a2bd20fc8f8dfbd29a85d91413c71ccd9e38656c59e0b3ec225ca7d56d3e6f16
|
|
BLAKE2b-256 checksum How to use checksums |
b9ce95f18ca3ed3257dd876358fcf72ec889bfffbe8f316d486756fa937cbc77
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.9
|
Release files / docums_autorefs-0.3.1-py3-none-any.whl
| Download URL | docums_autorefs-0.3.1-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
477187bcbc06d2c223fb2c67dc904f6eb6447e4ef0e5999c12f785abcee0cf36
|
|
BLAKE2b-256 checksum How to use checksums |
e8e28caad4edd96b159daff15ef26816243b87b795cf37b071bc73ec94e0b35d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.9
|
Security for docums-autorefs 0.3.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.