Skip to main content

A Sphinx extension for accessible, CSS-first filterable content tabs.

Project description

Sphinx Filter Tabs Extension

Tests and Docs Deployment PyPI version PyPI - Python Version PyPI - License

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.py using 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

  1. 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.

  1. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx_filter_tabs-1.2.2.tar.gz (29.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sphinx_filter_tabs-1.2.2-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

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

Hashes for sphinx_filter_tabs-1.2.2.tar.gz
Algorithm Hash digest
SHA256 d3f08be3371f5487f6e55875008fde522d032a761e3deff246ce52f64ef25c5c
MD5 de3a64b1be25773609787f256d4547bf
BLAKE2b-256 01d6485dedc300395ca44e5c4a8665396544926f29e96156f94dceb298286b19

See more details on using hashes here.

File details

Details for the file sphinx_filter_tabs-1.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_filter_tabs-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cf64c1c43bf1f108009eda725c43699019b5208337aa8e1c3307f473b26b0268
MD5 bfd4bc260fa9e7120f3fc5c4cc5aad34
BLAKE2b-256 440bc51c93b8a03917e90f4e2df549ee7e9ee06af9f2b9ed985eb104ed1c04f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page