A Sphinx extension for accessible, CSS-first filterable content tabs.
Project description
Sphinx Filter Tabs Extension
A robust Sphinx extension for creating accessible, JavaScript-free, filterable content tabs.
📖 View extension and documentation at: https://aputtu.github.io/sphinx-filter-tabs/
This extension provides filter-tabs and tab directives to create user-friendly, switchable content blocks, ideal for showing code examples in multiple languages or instructions for different platforms.
Features
- No JavaScript: Pure CSS implementation ensures maximum compatibility, speed, and accessibility.
- WAI-ARIA Compliant: The generated HTML follows accessibility best practices for keyboard navigation and screen readers.
- Highly Customizable: Easily theme colors, fonts, and sizes directly from your
conf.pyusing CSS Custom Properties. - Graceful Fallback: Renders content as simple admonitions in non-HTML outputs like PDF/LaTeX.
- Automated Testing: CI/CD pipeline tests against multiple Sphinx versions to ensure compatibility.
Installation
You can install this extension using pip:
pip install sphinx-filter-tabs
Development
- You can install a local version of the Sphinx with extension using:
./scripts/setup_dev.sh # Initially cleans previous folders in _docs/build and venv.
Command to enter venv is provided.
- Once inside virtual environment, you can use following commands:
pytest # Runs test suite on configured version of Sphinx.
tox # Check across multiple Sphinx versions. Manual install of tox required.
./scripts/export-project.sh # Outputs directory structure and code to txt
./dev.sh [options] # Allows for faster generation for html, pdf, clean up
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sphinx_filter_tabs-1.2.2.tar.gz.
File metadata
- Download URL: sphinx_filter_tabs-1.2.2.tar.gz
- Upload date:
- Size: 29.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3f08be3371f5487f6e55875008fde522d032a761e3deff246ce52f64ef25c5c
|
|
| MD5 |
de3a64b1be25773609787f256d4547bf
|
|
| BLAKE2b-256 |
01d6485dedc300395ca44e5c4a8665396544926f29e96156f94dceb298286b19
|
File details
Details for the file sphinx_filter_tabs-1.2.2-py3-none-any.whl.
File metadata
- Download URL: sphinx_filter_tabs-1.2.2-py3-none-any.whl
- Upload date:
- Size: 27.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf64c1c43bf1f108009eda725c43699019b5208337aa8e1c3307f473b26b0268
|
|
| MD5 |
bfd4bc260fa9e7120f3fc5c4cc5aad34
|
|
| BLAKE2b-256 |
440bc51c93b8a03917e90f4e2df549ee7e9ee06af9f2b9ed985eb104ed1c04f2
|