A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://sphinx-tags.readthedocs.io/en/latest/configuration.html below:

Configuration — sphinx-tags 0.4 documentation

Configuration#

A few custom configuration keys can be used in your conf.py file.

Tags overview page#

You can customize the title of the tags overview page using the tags_overview_title key in your conf.py file. For example,

tags_overview_title = "Site tags"

The default value for this configuration key is “Tags overview”.

This page should show you a list of available tags, next to a number describing how many pages are associated with each tag.

Tag badges#

If you also use the sphinx-design extension, you can optionally use its badges to display tags. To enable this, set tags_create_badges = True in conf.py.

Badge Colors#

You can also define which colors to use, based on the tag name. This can be defined in tags_badge_colors, which should be a dict mapping tag names to colors.

Color values may be one of:

Example:

tags_create_badges = True
tags_badge_colors = {
    "tag1": "primary",
    "tag2": "secondary",
    "tag3": "success",
}

Which will result in badges like this: tag1 tag2 tag3

You may also use glob patterns to match multiple tags:

tags_badge_colors = {
    "tag_*": "primary",
    "status:*": "warning",
    "*": "dark",  # Used as a default value
}

This will result in badges like this: tag_1 tag_2 status:done other

Special characters#

Tags can contain spaces and special characters such as emoji. In that case, the tag will be normalized when processed. See our Examples for more details.

Usage with sphinx-autobuild#

Sphinx-autobuild is a live-reload tool for local development that automatically rebuilds your docs when changes are detected. Sphinx-tags dynamically generates a tag overview and tag index pages during each build, so you will want to tell sphinx-autobuild to ignore these files so it doesn’t get stuck in a loop. Example:

sphinx-autobuild docs docs/_build/html --ignore '**/_tags/*'

If you have set tags_output_dir to a different path, use that instead of _tags.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4