bettertags


Namebettertags JSON
Version 1.0.3 PyPI version JSON
download
home_pagehttps://github.com/rzig/bettertags
Summarymkdocs-material tag plugin with free enhanced versions of some insiders features
upload_time2023-11-08 02:07:16
maintainer
docs_urlNone
authorryan
requires_python>=3.8
licensePermission 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 NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TO=RT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords mkdocs insiders tags free
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Bettertags

`bettertags` is an enhanced version of the [`mkdocs-material` built-in tags plugin](https://squidfunk.github.io/mkdocs-material/plugins/tags) with FREE versions of all Insiders-only tags features, and some minor improvements.

This plugin is originally based on the MIT-licensed source from `mkdocs-material`, but many parts have been heavily refactored/rewritten (and weren't written without any knowledge of the Material Insiders source). If you have suggestions of extra enhancements, please open an issue.

## Installation and usage

1. Run `pip install bettertags`
2. Replace the `tags` configruation option of your `mkdocs.yml` with `bettertags`
3. If you use Material-provided functions for `tags_compare` or `tags_pages_compare`, replace `material.plugins.tags` with `bettertags`

You can now use any insiders-only features [described in the Material docs](https://squidfunk.github.io/mkdocs-material/plugins/tags). I've also added a features to `tags_extra_files`, described below.

## `tags_extra_files`

Use this option to add additional tag lists to your wiki:

```
plugins:
  - bettertags:
      tags_extra_files:
        extra-1.md: [allowed-tag-1, allowed-tag-2, ...]
        extra-2.md: "*subfolder"
        extra-3.md: "*"
        "folder/extra-4.md":
            - rule: "*subfolder"
            - priority: 3
```

Each tag index can have one of the following types of rules:

- `[allowed-tag-1, ...]`: only include tags from the given list
- `*subfolder`: only include tags and pages from files contained within the same parent folder (or any descendants) as this index
- `*`: include all tags and pages

An index may also have an associated priority. By default, all extra indexes have priority `0`, and the primary index (from `tags_file` option) has priority `1`. When a tag on a wiki page is linked back to a tag index, it is linked to the index with the highest priority that contains the page. By default, this means a tag will always link back to the primary tags index. In the above example, pages in `folder/` will have tags linking to `folder/extra-4.md`, since `folder/` has a priority `3 > 1`. It is considered _undefined behavior_ to have multiple indexes that _tie_ for having the _highest priority_ for a given page/tag pair.

`tags_extra_files` can also be replaced with `indexes` in your config for improved clarity.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/rzig/bettertags",
    "name": "bettertags",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "mkdocs,insiders,tags,free",
    "author": "ryan",
    "author_email": "Ryan Ziegler <ryan@ziegler.lol>",
    "download_url": "https://files.pythonhosted.org/packages/60/b3/ccd904102aa708c2ce2fb04b2f4e6823404ff9f407799e93350e1a43abc4/bettertags-1.0.3.tar.gz",
    "platform": null,
    "description": "# Bettertags\n\n`bettertags` is an enhanced version of the [`mkdocs-material` built-in tags plugin](https://squidfunk.github.io/mkdocs-material/plugins/tags) with FREE versions of all Insiders-only tags features, and some minor improvements.\n\nThis plugin is originally based on the MIT-licensed source from `mkdocs-material`, but many parts have been heavily refactored/rewritten (and weren't written without any knowledge of the Material Insiders source). If you have suggestions of extra enhancements, please open an issue.\n\n## Installation and usage\n\n1. Run `pip install bettertags`\n2. Replace the `tags` configruation option of your `mkdocs.yml` with `bettertags`\n3. If you use Material-provided functions for `tags_compare` or `tags_pages_compare`, replace `material.plugins.tags` with `bettertags`\n\nYou can now use any insiders-only features [described in the Material docs](https://squidfunk.github.io/mkdocs-material/plugins/tags). I've also added a features to `tags_extra_files`, described below.\n\n## `tags_extra_files`\n\nUse this option to add additional tag lists to your wiki:\n\n```\nplugins:\n  - bettertags:\n      tags_extra_files:\n        extra-1.md: [allowed-tag-1, allowed-tag-2, ...]\n        extra-2.md: \"*subfolder\"\n        extra-3.md: \"*\"\n        \"folder/extra-4.md\":\n            - rule: \"*subfolder\"\n            - priority: 3\n```\n\nEach tag index can have one of the following types of rules:\n\n- `[allowed-tag-1, ...]`: only include tags from the given list\n- `*subfolder`: only include tags and pages from files contained within the same parent folder (or any descendants) as this index\n- `*`: include all tags and pages\n\nAn index may also have an associated priority. By default, all extra indexes have priority `0`, and the primary index (from `tags_file` option) has priority `1`. When a tag on a wiki page is linked back to a tag index, it is linked to the index with the highest priority that contains the page. By default, this means a tag will always link back to the primary tags index. In the above example, pages in `folder/` will have tags linking to `folder/extra-4.md`, since `folder/` has a priority `3 > 1`. It is considered _undefined behavior_ to have multiple indexes that _tie_ for having the _highest priority_ for a given page/tag pair.\n\n`tags_extra_files` can also be replaced with `indexes` in your config for improved clarity.\n",
    "bugtrack_url": null,
    "license": "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 NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TO=RT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "mkdocs-material tag plugin with free enhanced versions of some insiders features",
    "version": "1.0.3",
    "project_urls": {
        "Homepage": "https://github.com/rzig/bettertags"
    },
    "split_keywords": [
        "mkdocs",
        "insiders",
        "tags",
        "free"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4593d20566f18440d35dabb14e631087443aa743dd6002ec3601844166f2bbb0",
                "md5": "2122c9ea3cda00ba9643b15df721ce05",
                "sha256": "3afc2826f63a2be37a41b6abfc29b9396ec10f254bb7e9a79994a650551d62e3"
            },
            "downloads": -1,
            "filename": "bettertags-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2122c9ea3cda00ba9643b15df721ce05",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 7087,
            "upload_time": "2023-11-08T02:07:14",
            "upload_time_iso_8601": "2023-11-08T02:07:14.943509Z",
            "url": "https://files.pythonhosted.org/packages/45/93/d20566f18440d35dabb14e631087443aa743dd6002ec3601844166f2bbb0/bettertags-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "60b3ccd904102aa708c2ce2fb04b2f4e6823404ff9f407799e93350e1a43abc4",
                "md5": "d78a9215fc0a075450c7e63a46479023",
                "sha256": "ea5bf79958f9a4be78342744ad65d59eb029a4a48143ef1e78ef4765aad97f5f"
            },
            "downloads": -1,
            "filename": "bettertags-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "d78a9215fc0a075450c7e63a46479023",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 6088,
            "upload_time": "2023-11-08T02:07:16",
            "upload_time_iso_8601": "2023-11-08T02:07:16.271458Z",
            "url": "https://files.pythonhosted.org/packages/60/b3/ccd904102aa708c2ce2fb04b2f4e6823404ff9f407799e93350e1a43abc4/bettertags-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-08 02:07:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "rzig",
    "github_project": "bettertags",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "bettertags"
}
        
Elapsed time: 0.14515s