Skip to main content

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)

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

conda_sphinx_theme-0.3.0.tar.gz (497.3 kB view details)

Uploaded Source

Built Distribution

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

conda_sphinx_theme-0.3.0-py3-none-any.whl (492.8 kB view details)

Uploaded Python 3

File details

Details for the file conda_sphinx_theme-0.3.0.tar.gz.

File metadata

  • Download URL: conda_sphinx_theme-0.3.0.tar.gz
  • Upload date:
  • Size: 497.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for conda_sphinx_theme-0.3.0.tar.gz
Algorithm Hash digest
SHA256 0ac34dca0a5114f66c10152be428ec6ceec9f51b52c98f6f6aaab7fb76c4308e
MD5 f645f5e44b71b99df603dfa58ad9cb96
BLAKE2b-256 83e3cba0da541713df81f64a9378109b8fb29d80b3e3845b6f6263abe215e442

See more details on using hashes here.

Provenance

The following attestation bundles were made for conda_sphinx_theme-0.3.0.tar.gz:

Publisher: release.yml on conda-incubator/conda-sphinx-theme

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file conda_sphinx_theme-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for conda_sphinx_theme-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3a8bf7bda3214ea642e38835efe3d832ae70a8f9d7418f3f6b7442ea23e8e287
MD5 84e02269fc45d6ae99672c255a279bd5
BLAKE2b-256 eb9cce348984dd96c92e34aada83c659c190dd85b7b12027d67c32638d32a232

See more details on using hashes here.

Provenance

The following attestation bundles were made for conda_sphinx_theme-0.3.0-py3-none-any.whl:

Publisher: release.yml on conda-incubator/conda-sphinx-theme

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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