Skip to main content

A Sphinx extension for accessible, JS-free 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.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-0.9.2.tar.gz (26.2 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-0.9.2-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

Details for the file sphinx_filter_tabs-0.9.2.tar.gz.

File metadata

  • Download URL: sphinx_filter_tabs-0.9.2.tar.gz
  • Upload date:
  • Size: 26.2 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-0.9.2.tar.gz
Algorithm Hash digest
SHA256 17b597c0c4aa0b54f384ce0523940d4f92947c58ee8a177cb9b266fcfd1421d0
MD5 20f08e145927ff8cf0d93b70472c1e7d
BLAKE2b-256 27a50134d87f3c83f98deef0e5b11786ff49ac984b779f42b991298f84f28ec8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sphinx_filter_tabs-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 18c701fb2f40fde351ccc385affb5ca96d7f5b3a6397fcfd346e77795ea92ebf
MD5 6f86c1fb8781285785d45aa90c4a5c2a
BLAKE2b-256 b9cd8f9f9b9ddd3905cd8d3f6fa844c803fb166c3b8e84839744ebfaa4809d9d

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