mkdocs-argref-plugin
This mkdocs plugin
allows users to convert text such as GHI-123 in their documentation to a
corresponding URL, e.g. https://github.com/myproject/issues/123. Unlike similar
plugins, argref takes an argument for each reference that can be utilized
in the URL.
Getting started
To install it, using pip:
pip install mkdocs-argref-plugin
Edit your mkdocs.yml file and add these few lines of code:
plugins:
- argref:
filter_links: False #default
autolinks:
- reference_prefix: GH-<num>
target_url: https://github.com/myname/myproject/issues/<num>
- reference_prefix: JIRA-<num>-<ver>
target_url: https://jiracloud.com/myproject-<num>?ver=<ver>
- filter_links: When
True, will not make replacements within existing markdown links. Caution: This may impact performance in large environments. Defaults toFalse. - reference_prefix: This prefix appended by a number will generate a link any time it is found in a page. When no variable is present, will append
<num>as the variable. - target_url: The URL must contain all variables from
reference_prefix.
An example
For example, you could edit the docs/index.md file and insert the ticket references like this:
Changelog:
- GHI-100: Add new feature.
- JIRA-231-XYZ: Fix bug.
This will be converted to:
Changelog:
- [GHI-100](https://github.com/myname/myproject/issues/100): Add new feature.
- [JIRA-231-XYZ](https://jiracloud.com/myproject-231?ver=XYZ): Fix bug.
Changelog
0.5.0 (2024-08-25)
- Fix bug when
filter_links=Trueand multiple autolinks are specified.
0.4.0 (2024-08-13)
- Added ability to use multiple references for each link and skip replacements within links.
0.3.0 (2024-06-07)
- Fixed bug where only one replacement would be made per page.
0.2.2 (2023-12-28)
- Allow extended set for and ignore ref style links, already linked items, and attr_list cases with '#' before the ref
0.2.0
- Ignore already linked references.
- Converts text
[AF-100]to a linked version and removes the bracketsAF-100
License
MIT
Originally built with ❤️ by Saurabh Kumar
Metadata
Release files for mkdocs-argref-plugin 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mkdocs_argref_plugin-0.5.0.tar.gz | 7.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mkdocs_argref_plugin-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.8 kB
Release files / mkdocs_argref_plugin-0.5.0.tar.gz
| Download URL | mkdocs_argref_plugin-0.5.0.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b2982f9670419911f671ddff3f773b27fdc9184762ecd1e00c42aaab3e905e70
|
|
BLAKE2b-256 checksum How to use checksums |
267cfea9d842705ca8c9e7dd21da2d0b7b61dbdd8b6e58ca3c7c85b5604914e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.5
|
Release files / mkdocs_argref_plugin-0.5.0-py3-none-any.whl
| Download URL | mkdocs_argref_plugin-0.5.0-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ec4be422bfb5654c38f96785b0093078c3ca3e16774162be607d6f8d483ceb9
|
|
BLAKE2b-256 checksum How to use checksums |
1eebe7e7ea2f7e374e52fc8425d5cf67890be8278a6e620aa74775da2f1039f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.5
|