mkdocs-argref-plugin


Namemkdocs-argref-plugin JSON
Version 0.5.0 PyPI version JSON
download
home_pageNone
SummaryMkDocs plugin to replace argumented refrences with markdown links.
upload_time2024-08-25 12:50:09
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License Copyright for portions of project mkdocs-argref-plugin are held by [Saurabh Kumar, 2020] as part of project Autolink References. All other copyright for project mkdocs-argref-plugin are held by [Richard Shadrach, 2024]. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords autolinks mkdocs github
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # mkdocs-argref-plugin

[![PyPI - Version](https://img.shields.io/pypi/v/mkdocs-argref-plugin)](https://pypi.org/project/mkdocs-argref-plugin/)

This [mkdocs plugin](http://www.mkdocs.org/user-guide/plugins/)
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:

```yaml
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 to `False`.
- __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:

````markdown

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=True` and 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 <num> 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](https://saurabh-kumar.com?ref=autolink-references-mkdocs-plugin)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mkdocs-argref-plugin",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "autolinks, mkdocs, github",
    "author": null,
    "author_email": "Saurabh Kumar <autolink-references-mkdocs-plugin@saurabh-kumar.com>, Richard Shadrach <rhshadrach@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/26/7c/fea9d842705ca8c9e7dd21da2d0b7b61dbdd8b6e58ca3c7c85b5604914e9/mkdocs_argref_plugin-0.5.0.tar.gz",
    "platform": null,
    "description": "# mkdocs-argref-plugin\n\n[![PyPI - Version](https://img.shields.io/pypi/v/mkdocs-argref-plugin)](https://pypi.org/project/mkdocs-argref-plugin/)\n\nThis [mkdocs plugin](http://www.mkdocs.org/user-guide/plugins/)\nallows users to convert text such as `GHI-123` in their documentation to a\ncorresponding URL, e.g. `https://github.com/myproject/issues/123`. Unlike similar\nplugins, `argref` takes an argument for each reference that can be utilized\nin the URL.\n\n\n## Getting started\nTo install it, using `pip`:\n\n```\npip install mkdocs-argref-plugin\n```\n\nEdit your `mkdocs.yml` file and add these few lines of code:\n\n```yaml\nplugins:\n   - argref:\n        filter_links: False  #default\n        autolinks:\n            - reference_prefix: GH-<num>\n              target_url: https://github.com/myname/myproject/issues/<num>\n            - reference_prefix: JIRA-<num>-<ver>\n              target_url: https://jiracloud.com/myproject-<num>?ver=<ver>\n```\n\n- __filter_links__: When `True`, will not make replacements within existing markdown links. Caution: This may impact performance in large environments. Defaults to `False`.\n- __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.\n- __target_url__: The URL must contain all variables from `reference_prefix`.\n\n### An example\n\nFor example, you could edit the `docs/index.md` file and insert the ticket references like this:\n\n````markdown\n\nChangelog:\n\n- GHI-100: Add new feature.\n- JIRA-231-XYZ: Fix bug.\n\n````\n\nThis will be converted to:\n\n```\nChangelog:\n\n- [GHI-100](https://github.com/myname/myproject/issues/100): Add new feature.\n- [JIRA-231-XYZ](https://jiracloud.com/myproject-231?ver=XYZ): Fix bug.\n\n```\n\n## Changelog\n\n### 0.5.0 (2024-08-25)\n\n- Fix bug when `filter_links=True` and multiple autolinks are specified.\n\n### 0.4.0 (2024-08-13)\n\n- Added ability to use multiple references for each link and skip replacements within links.\n\n### 0.3.0 (2024-06-07)\n\n- Fixed bug where only one replacement would be made per page.\n\n### 0.2.2 (2023-12-28)\n\n- Allow extended set for <num> and ignore ref style links, already linked items, and attr_list cases with '#' before the ref\n\n### 0.2.0\n- Ignore already linked references.\n- Converts text `[AF-100]` to a linked version and removes the brackets `AF-100`\n\n## License\n\nMIT\n\nOriginally built with \u2764\ufe0f by [Saurabh Kumar](https://saurabh-kumar.com?ref=autolink-references-mkdocs-plugin)\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright for portions of project mkdocs-argref-plugin are held by [Saurabh Kumar, 2020] as part of project Autolink References. All other copyright for project mkdocs-argref-plugin are held by [Richard Shadrach, 2024].  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "MkDocs plugin to replace argumented refrences with markdown links.",
    "version": "0.5.0",
    "project_urls": {
        "Documentation": "https://github.com/rhshadrach/mkdocs-argref-plugin/tree/main#readme",
        "Source": "https://github.com/rhshadrach/mkdocs-argref-plugin",
        "Tracker": "https://github.com/rhshadrach/mkdocs-argref-plugin/issues"
    },
    "split_keywords": [
        "autolinks",
        " mkdocs",
        " github"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1eebe7e7ea2f7e374e52fc8425d5cf67890be8278a6e620aa74775da2f1039f7",
                "md5": "16223175066032a8652d651a3051e9f8",
                "sha256": "6ec4be422bfb5654c38f96785b0093078c3ca3e16774162be607d6f8d483ceb9"
            },
            "downloads": -1,
            "filename": "mkdocs_argref_plugin-0.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "16223175066032a8652d651a3051e9f8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 6790,
            "upload_time": "2024-08-25T12:50:08",
            "upload_time_iso_8601": "2024-08-25T12:50:08.151340Z",
            "url": "https://files.pythonhosted.org/packages/1e/eb/e7e7ea2f7e374e52fc8425d5cf67890be8278a6e620aa74775da2f1039f7/mkdocs_argref_plugin-0.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "267cfea9d842705ca8c9e7dd21da2d0b7b61dbdd8b6e58ca3c7c85b5604914e9",
                "md5": "c9ae3e647fe04520b9a211cd90438e5e",
                "sha256": "b2982f9670419911f671ddff3f773b27fdc9184762ecd1e00c42aaab3e905e70"
            },
            "downloads": -1,
            "filename": "mkdocs_argref_plugin-0.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c9ae3e647fe04520b9a211cd90438e5e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 7012,
            "upload_time": "2024-08-25T12:50:09",
            "upload_time_iso_8601": "2024-08-25T12:50:09.138373Z",
            "url": "https://files.pythonhosted.org/packages/26/7c/fea9d842705ca8c9e7dd21da2d0b7b61dbdd8b6e58ca3c7c85b5604914e9/mkdocs_argref_plugin-0.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-25 12:50:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "rhshadrach",
    "github_project": "mkdocs-argref-plugin",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "mkdocs-argref-plugin"
}
        
Elapsed time: 0.64928s