Skip to main content

This plugin allows to configure your own autolink references for non-GitHub URLs.

Project description

mkdocs-argref-plugin

PyPI - Version

This mkdocs plugin look in each MkDocs article for the presence of a reference to tickets from issues trackers like Jira, Linear, etc and convert them to links that point to respective platforms. Unlike similar plugins, argref takes an argument 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:
        autolinks:
            - reference_prefix: AF-
              target_url: https://linear.com/AF-<num>
            - reference_prefix: PROJ-
              target_url: https://jiracloud.com/PROJ-<num>
  • reference_prefix: This prefix appended by a number will generate a link any time it is found in a page.
  • target_url: The URL must contain <num> for the reference number.

An example

For example, you could edit the docs/index.md file and insert the ticket references like this:

Changelog:

- AF-100: add new feature.

This will generate pre-processed to:

Changelog:

- [AF-100](https://linear.com/AF-100): add new feature.

Changelog

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 brackets AF-100

License

MIT

Originally built with ❤️ by Saurabh Kumar

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkdocs_argref_plugin-0.3.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

mkdocs_argref_plugin-0.3.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_argref_plugin-0.3.0.tar.gz.

File metadata

  • Download URL: mkdocs_argref_plugin-0.3.0.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.4

File hashes

Hashes for mkdocs_argref_plugin-0.3.0.tar.gz
Algorithm Hash digest
SHA256 12faf1b7103bcb78f7e98cbfec2d240e14d83d39fa7168d4ff3cf3032dcd53a8
MD5 57867790386ea3654b0bc97242e96fd1
BLAKE2b-256 bbce6988b464abe70c5ef31b0740de110b53d24d771923c124167095e4d6bd29

See more details on using hashes here.

File details

Details for the file mkdocs_argref_plugin-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_argref_plugin-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2fc76abe6a87d196f7143b3434478d3435a649c8e352e796832d1fc32a08c168
MD5 e681fc241e90a183713ae88330c57f9b
BLAKE2b-256 668ff264f28f9bb21256040b6f43d165a669fd5b2d52af9353a69d5e9d25639b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page