# mkdocs-badges
[![PyPI version](https://img.shields.io/pypi/v/mkdocs-badges)](https://pypi.org/project/mkdocs-badges/)
![License](https://img.shields.io/pypi/l/mkdocs-badges)
![Python versions](https://img.shields.io/pypi/pyversions/mkdocs-badges)
This package allows you to add badges to your MkDocs site.
## Documentation
This README is just a short intro to the package.
For a quick start and detailed information please see the [documentation](https://mkdocs-badges.six-two.dev/).
The documentation is also available in the `docs` folder of the source code and can be built locally with [MkDocs](https://www.mkdocs.org/).
A development version built with the latest changes (`HEAD` commit) can be found at <https://mkdocs-badges-dev.six-two.dev/>.
## Testing
The documentation also serves as a test of the plugin, especially the files under the `Tests` menu item.
Build the documentation with the latest source code:
```bash
pip install . && mkdocs serve -t <theme>
```
Themes that should work are `mkdocs`, `readthedocs`, and `material`.
### Unit tests
The GitHub repository now contains some unit test.
You can run them against the current code with the following command (issued in the root directory of the repository):
```bash
pip install . && python -m unittest
```
## Known issues
- At least on iPhones (which only support Safari based engines) only one toast can be shown.
After that you need to reload the page to show the same toast again or to show another toast.
This seems to be an issue with <https://github.com/mlcheng/js-toast/> (used in `src/mkdocs_badges/assets/badge.js`) which seems no longer maintained.
## Notable changes
### Version 0.4.4
- Rewrite `-` to `_` in install badge types.
This allows using both `brew-formula` and `brew_formula` notation.
### Version 0.4.3
- Changed behavior of the `install_badge_data` option.
Instead of removing the defaults the specified file is merged with them
- Changed install badge data.
Renamed `brew` to `brew_formula` and added `brew_cask`, `docker_hub`, and `docker_ghcr`
- Fixed crash of JavaScript copy code if the text contains a single quote
### Version 0.4.2
- Detect markdown tables even if they have only a single dash in the header. Fixes [#4](https://github.com/six-two/mkdocs-badges/issues/4)
- Option to disable warnings (use this at your own risk) by adding `disable_warnings: True` to the plugin config in your `mkdocs.yml`
### Version 0.4.1
- Now requires MkDocs 1.5 or newer
- The included script is now marked as `async` by default, maybe improving loading times a tiny bit. This can be disabled by adding `async: False` to the plugin config in your `mkdocs.yml`
### Version 0.4.0
- Now requires MkDocs 1.4 or newer
- Updated the layout rules for badges. This should better handle oversized contents (like images or very long texts).
### Version 0.3.4
- Added single element badges
### Version 0.3.3
- Added tags badges
### Version 0.3.1
- Better error handling, fixed a crash
- Started adding unit tests
### Version 0.3.0
- Breaking changes to the badges formats. See the [migration guide](https://mkdocs-badges.six-two.dev/migration/)
- Added support for reference links
### Version 0.2.0
- Each badge now needs to be the only thing on its line
- Badges inside code blocks are no longer parsed
- The `|end` at the end of custom badges is no longer neccessary. A simple `|` is enough. This shorter form is recommended from now on.
- Documentation is now in the `docs` folder in the form of a mkdocs website
- Added link badges
Raw data
{
"_id": null,
"home_page": "https://github.com/six-two/mkdocs-badges",
"name": "mkdocs-badges",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": null,
"author": "six-two",
"author_email": "pip@six-two.dev",
"download_url": "https://files.pythonhosted.org/packages/f5/f3/c7d3f9e4f590d02d4f129a21a1cc0896cbd584a044b8085ecd16f0b95598/mkdocs_badges-0.4.4.tar.gz",
"platform": null,
"description": "# mkdocs-badges\n[![PyPI version](https://img.shields.io/pypi/v/mkdocs-badges)](https://pypi.org/project/mkdocs-badges/)\n![License](https://img.shields.io/pypi/l/mkdocs-badges)\n![Python versions](https://img.shields.io/pypi/pyversions/mkdocs-badges)\n\nThis package allows you to add badges to your MkDocs site.\n\n## Documentation\n\nThis README is just a short intro to the package.\nFor a quick start and detailed information please see the [documentation](https://mkdocs-badges.six-two.dev/).\nThe documentation is also available in the `docs` folder of the source code and can be built locally with [MkDocs](https://www.mkdocs.org/).\n\nA development version built with the latest changes (`HEAD` commit) can be found at <https://mkdocs-badges-dev.six-two.dev/>.\n\n## Testing\n\nThe documentation also serves as a test of the plugin, especially the files under the `Tests` menu item.\n\nBuild the documentation with the latest source code:\n```bash\npip install . && mkdocs serve -t <theme>\n```\n\nThemes that should work are `mkdocs`, `readthedocs`, and `material`.\n\n### Unit tests\n\nThe GitHub repository now contains some unit test.\nYou can run them against the current code with the following command (issued in the root directory of the repository):\n\n```bash\npip install . && python -m unittest\n```\n\n## Known issues\n\n- At least on iPhones (which only support Safari based engines) only one toast can be shown.\n After that you need to reload the page to show the same toast again or to show another toast.\n This seems to be an issue with <https://github.com/mlcheng/js-toast/> (used in `src/mkdocs_badges/assets/badge.js`) which seems no longer maintained.\n\n## Notable changes\n\n### Version 0.4.4\n\n- Rewrite `-` to `_` in install badge types.\n This allows using both `brew-formula` and `brew_formula` notation.\n\n### Version 0.4.3\n\n- Changed behavior of the `install_badge_data` option.\n Instead of removing the defaults the specified file is merged with them\n- Changed install badge data.\n Renamed `brew` to `brew_formula` and added `brew_cask`, `docker_hub`, and `docker_ghcr`\n- Fixed crash of JavaScript copy code if the text contains a single quote\n\n### Version 0.4.2\n\n- Detect markdown tables even if they have only a single dash in the header. Fixes [#4](https://github.com/six-two/mkdocs-badges/issues/4)\n- Option to disable warnings (use this at your own risk) by adding `disable_warnings: True` to the plugin config in your `mkdocs.yml`\n\n### Version 0.4.1\n\n- Now requires MkDocs 1.5 or newer\n- The included script is now marked as `async` by default, maybe improving loading times a tiny bit. This can be disabled by adding `async: False` to the plugin config in your `mkdocs.yml`\n\n### Version 0.4.0\n\n- Now requires MkDocs 1.4 or newer\n- Updated the layout rules for badges. This should better handle oversized contents (like images or very long texts).\n\n### Version 0.3.4\n\n- Added single element badges\n\n### Version 0.3.3\n\n- Added tags badges\n\n### Version 0.3.1\n\n- Better error handling, fixed a crash\n- Started adding unit tests\n\n### Version 0.3.0\n\n- Breaking changes to the badges formats. See the [migration guide](https://mkdocs-badges.six-two.dev/migration/)\n- Added support for reference links\n\n### Version 0.2.0\n\n- Each badge now needs to be the only thing on its line\n- Badges inside code blocks are no longer parsed\n- The `|end` at the end of custom badges is no longer neccessary. A simple `|` is enough. This shorter form is recommended from now on.\n- Documentation is now in the `docs` folder in the form of a mkdocs website\n- Added link badges\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Add badges to your MkDocs page",
"version": "0.4.4",
"project_urls": {
"Homepage": "https://github.com/six-two/mkdocs-badges"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3084822e16afc721e07405a13f920d1353944bd9d894eb474a8dee836d834474",
"md5": "4efc4a08060b78fa2e40acd59d7d87bb",
"sha256": "f46cbc42b75f63bc64234476982d09323aff3c104abcad1f2c2e0e7bfe57c01c"
},
"downloads": -1,
"filename": "mkdocs_badges-0.4.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4efc4a08060b78fa2e40acd59d7d87bb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 17855,
"upload_time": "2024-08-11T18:46:41",
"upload_time_iso_8601": "2024-08-11T18:46:41.868696Z",
"url": "https://files.pythonhosted.org/packages/30/84/822e16afc721e07405a13f920d1353944bd9d894eb474a8dee836d834474/mkdocs_badges-0.4.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f5f3c7d3f9e4f590d02d4f129a21a1cc0896cbd584a044b8085ecd16f0b95598",
"md5": "bd8fd2fbc773bf895ee5279ad3e3054b",
"sha256": "15805a074388a0416a1e4c5048b670f204e04531ef3755dacd30e1e613a85d0f"
},
"downloads": -1,
"filename": "mkdocs_badges-0.4.4.tar.gz",
"has_sig": false,
"md5_digest": "bd8fd2fbc773bf895ee5279ad3e3054b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 16883,
"upload_time": "2024-08-11T18:46:43",
"upload_time_iso_8601": "2024-08-11T18:46:43.314703Z",
"url": "https://files.pythonhosted.org/packages/f5/f3/c7d3f9e4f590d02d4f129a21a1cc0896cbd584a044b8085ecd16f0b95598/mkdocs_badges-0.4.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-11 18:46:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "six-two",
"github_project": "mkdocs-badges",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "babel",
"specs": [
[
"==",
"2.16.0"
]
]
},
{
"name": "certifi",
"specs": [
[
"==",
"2024.7.4"
]
]
},
{
"name": "charset-normalizer",
"specs": [
[
"==",
"3.3.2"
]
]
},
{
"name": "click",
"specs": [
[
"==",
"8.1.7"
]
]
},
{
"name": "colorama",
"specs": [
[
"==",
"0.4.6"
]
]
},
{
"name": "ghp-import",
"specs": [
[
"==",
"2.1.0"
]
]
},
{
"name": "idna",
"specs": [
[
"==",
"3.7"
]
]
},
{
"name": "importlib-metadata",
"specs": [
[
"==",
"8.2.0"
]
]
},
{
"name": "jinja2",
"specs": [
[
"==",
"3.1.4"
]
]
},
{
"name": "markdown",
"specs": [
[
"==",
"3.6"
]
]
},
{
"name": "markupsafe",
"specs": [
[
"==",
"2.1.5"
]
]
},
{
"name": "mergedeep",
"specs": [
[
"==",
"1.3.4"
]
]
},
{
"name": "mkdocs",
"specs": [
[
"==",
"1.6.0"
]
]
},
{
"name": "mkdocs-get-deps",
"specs": [
[
"==",
"0.2.0"
]
]
},
{
"name": "mkdocs-material",
"specs": [
[
"==",
"9.5.31"
]
]
},
{
"name": "mkdocs-material-extensions",
"specs": [
[
"==",
"1.3.1"
]
]
},
{
"name": "packaging",
"specs": [
[
"==",
"24.1"
]
]
},
{
"name": "paginate",
"specs": [
[
"==",
"0.5.6"
]
]
},
{
"name": "pathspec",
"specs": [
[
"==",
"0.12.1"
]
]
},
{
"name": "platformdirs",
"specs": [
[
"==",
"4.2.2"
]
]
},
{
"name": "pygments",
"specs": [
[
"==",
"2.18.0"
]
]
},
{
"name": "pymdown-extensions",
"specs": [
[
"==",
"10.9"
]
]
},
{
"name": "python-dateutil",
"specs": [
[
"==",
"2.9.0.post0"
]
]
},
{
"name": "pyyaml",
"specs": [
[
"==",
"6.0.2"
]
]
},
{
"name": "pyyaml-env-tag",
"specs": [
[
"==",
"0.1"
]
]
},
{
"name": "regex",
"specs": [
[
"==",
"2024.7.24"
]
]
},
{
"name": "requests",
"specs": [
[
"==",
"2.32.3"
]
]
},
{
"name": "six",
"specs": [
[
"==",
"1.16.0"
]
]
},
{
"name": "urllib3",
"specs": [
[
"==",
"2.2.2"
]
]
},
{
"name": "watchdog",
"specs": [
[
"==",
"4.0.2"
]
]
},
{
"name": "zipp",
"specs": [
[
"==",
"3.20.0"
]
]
}
],
"lcname": "mkdocs-badges"
}