Installation
Installing the Package
First, install the extension package using pip:
pip install sphinx-filter-tabs
Enabling the Extension
After installation, you must enable the extension in your Sphinx project’s
conf.py file. Add 'filter_tabs' to your extensions list:
# conf.py
extensions = [
# ... your other extensions ...
'filter_tabs',
]
Optional Configuration
You can customize the extension’s appearance by adding these optional settings
to your conf.py:
# Essential theming
filter_tabs_highlight_color = '#007bff' # Active tab highlight color
filter_tabs_theme_mode = 'native' # Can be 'native' or other specific theme variables
filter_tabs_flavor = 'default' # Set styling flavor
# Features
filter_tabs_enable_collapsible_admonitions = True # Enable/disable collapsible admonition rendering
# Development option
filter_tabs_debug_mode = False # Enable debug logging
Verifying Installation
To verify the extension is properly installed and loaded:
Build your documentation:
sphinx-build -b html docs docs/_build/html
Check for any errors in the output. If the extension loads correctly, you should see no warnings about
filter_tabs.Try using the directive in an RST file:
.. filter-tabs:: .. tab:: Test If you see this, it works!