Skip to main content

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

Release files for conda-sphinx-theme 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for conda-sphinx-theme 0.4.0
File Size Uploaded
conda_sphinx_theme-0.4.0.tar.gz 547.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for conda-sphinx-theme 0.4.0
File Interpreter ABI Platform
conda_sphinx_theme-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.0 MB

Release files / conda_sphinx_theme-0.4.0.tar.gz

Download URL conda_sphinx_theme-0.4.0.tar.gz
Size 547.2 kB
Tags Source
SHA-256 checksum
How to use checksums
18548d0c9912c45775d0a6e0ef7f0246c601cc71a576fbb5c7296566c7c03db5
BLAKE2b-256 checksum
How to use checksums
46c53772a61cd9624fc8175a69fc2f55c818329a5909a94c29a6bedb79d3f7d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 23, 2026.

Transparency log

Release files / conda_sphinx_theme-0.4.0-py3-none-any.whl

Download URL conda_sphinx_theme-0.4.0-py3-none-any.whl
Size 491.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c179459fe88836739f6588d2adc6503d1c9daa623ffcc82c8325c21a054d89bd
BLAKE2b-256 checksum
How to use checksums
3a60385441f8b598b60187a374416f4f64c478c688792ff2565231eb74259c8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 23, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page