Conda theme for Sphinx
Project description
Conda Sphinx Theme
This is the Conda Sphinx Theme. It extends the PyData Sphinx Theme project by adding custom styling.
Install
You can install the conda-sphinx-theme via conda-forge:
conda install -c conda-forge conda-sphinx-theme
or PyPI:
pip install conda-sphinx-theme
Configuring
When creating a conda subproject you can include this theme by changing this line in your conf.py file
html_theme = 'conda_sphinx_theme'
Version Anchors Extension
The theme includes a version_anchors Sphinx extension that automatically creates anchors for version headings in changelog files. This makes it easy to link directly to specific versions in your changelog.
Usage
To use the version anchors extension, add it to your extensions list in conf.py:
extensions = [
# ... your other extensions
"conda_sphinx_theme.version_anchors",
]
How it works
The extension automatically detects changelog files (files with names containing "changelog", "release", "history", or "news") and scans for headings that match version patterns. When found, it creates anchor IDs that you can link to.
For example, if you have a heading like:
25.5.0 (2025-05-21)
===================
The extension will create an anchor with ID version-25.5.0 that you can link to with :version:25.5.0 (recommended), `:ref:`version-25.5.0, or by URL fragment #version-25.5.0.
Configuration
You can customize the behavior with these configuration options in your conf.py:
# Pattern to match version headings (must have exactly one capture group for the version)
version_anchor_pattern = r"^(\d+\.\d+(?:\.\d+)?)\s*\(.*?\)$" # Default
# Format template for anchor IDs (use {version} as placeholder)
version_anchor_format = "version-{version}" # Default (REQUIRED: must contain {version})
# File patterns that indicate changelog files (case-insensitive)
version_anchor_changelog_files = ["changelog", "release", "history", "news"] # Default
Note: The version_anchor_format must contain the {version} placeholder. The extension will validate this at startup and raise an error if the placeholder is missing.
Alternative patterns and formats you might want to use:
# For "Version 1.2.3" format
version_anchor_pattern = r"^Version\s+(\d+\.\d+(?:\.\d+)?).*$"
# For "Release 1.2.3" format
version_anchor_pattern = r"^Release\s+(\d+\.\d+(?:\.\d+)?)"
# For "v1.2.3" or "1.2.3" format
version_anchor_pattern = r"^v?(\d+\.\d+(?:\.\d+)?)"
# Alternative anchor formats:
version_anchor_format = "v{version}" # Creates anchors like "v25.5.0"
version_anchor_format = "release-{version}" # Creates anchors like "release-25.5.0"
version_anchor_format = "{version}" # Creates anchors like "25.5.0" (not recommended for HTML4/XHTML)
Development
This project uses pixi for development and dependency management.
Setup
# Install pixi (if not already installed)
curl -fsSL https://pixi.sh/install.sh | bash
# Install all environments
pixi install --all
Available Commands
Testing:
pixi run test # Run tests with coverage
pixi run test-fast # Run tests without coverage
pixi run ci # Run full CI pipeline (lint + type-check + test)
Documentation:
pixi run docs-build # Build documentation
pixi run docs-live # Build docs with live reload (opens browser)
pixi run docs-clean # Clean build artifacts
Code Quality:
pixi run lint # Check code with ruff
pixi run lint-fix # Fix auto-fixable issues
pixi run type-check # Check types with ty
Git Hooks:
pixi run hooks-install # Install pre-commit hooks
pixi run hooks-run # Run hooks manually
pixi run hooks-update # Update hook versions
Testing Multiple Python Versions
The project supports Python 3.9-3.13 with version-specific environments:
pixi run --environment test-py39 test
pixi run --environment test-py310 test
pixi run --environment test-py311 test
pixi run --environment test-py312 test
pixi run --environment test-py313 test
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 conda_sphinx_theme-0.4.0.tar.gz.
File metadata
- Download URL: conda_sphinx_theme-0.4.0.tar.gz
- Upload date:
- Size: 547.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18548d0c9912c45775d0a6e0ef7f0246c601cc71a576fbb5c7296566c7c03db5
|
|
| MD5 |
f339b474662b497034aa58396a4b17bd
|
|
| BLAKE2b-256 |
46c53772a61cd9624fc8175a69fc2f55c818329a5909a94c29a6bedb79d3f7d0
|
Provenance
The following attestation bundles were made for conda_sphinx_theme-0.4.0.tar.gz:
Publisher:
release.yml on conda-incubator/conda-sphinx-theme
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
conda_sphinx_theme-0.4.0.tar.gz -
Subject digest:
18548d0c9912c45775d0a6e0ef7f0246c601cc71a576fbb5c7296566c7c03db5 - Sigstore transparency entry: 1162410806
- Sigstore integration time:
-
Permalink:
conda-incubator/conda-sphinx-theme@c9df615e71d64daaf7a644fb78822b09be370b20 -
Branch / Tag:
refs/tags/0.4.0 - Owner: https://github.com/conda-incubator
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c9df615e71d64daaf7a644fb78822b09be370b20 -
Trigger Event:
release
-
Statement type:
File details
Details for the file conda_sphinx_theme-0.4.0-py3-none-any.whl.
File metadata
- Download URL: conda_sphinx_theme-0.4.0-py3-none-any.whl
- Upload date:
- Size: 491.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c179459fe88836739f6588d2adc6503d1c9daa623ffcc82c8325c21a054d89bd
|
|
| MD5 |
36b853f00f0856273ade968078e0bf7f
|
|
| BLAKE2b-256 |
3a60385441f8b598b60187a374416f4f64c478c688792ff2565231eb74259c8e
|
Provenance
The following attestation bundles were made for conda_sphinx_theme-0.4.0-py3-none-any.whl:
Publisher:
release.yml on conda-incubator/conda-sphinx-theme
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
conda_sphinx_theme-0.4.0-py3-none-any.whl -
Subject digest:
c179459fe88836739f6588d2adc6503d1c9daa623ffcc82c8325c21a054d89bd - Sigstore transparency entry: 1162410851
- Sigstore integration time:
-
Permalink:
conda-incubator/conda-sphinx-theme@c9df615e71d64daaf7a644fb78822b09be370b20 -
Branch / Tag:
refs/tags/0.4.0 - Owner: https://github.com/conda-incubator
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c9df615e71d64daaf7a644fb78822b09be370b20 -
Trigger Event:
release
-
Statement type: