Skip to main content

doxtr-html-theme-core

Base Sphinx HTML theme (doxtr_core / doxtr_html_theme_core) built on doxtr-theme-core with semantic design tokens (--dd-*), light-dark() + persistent color-scheme toggle, WCAG AA contrast guardrails, native <dialog> mobile drawer, CSS Anchor/Scrollspy TOC, copy-code commands, and cross-builder .. stylebox:: styling.

Installation

pip install doxtr-html-theme-core

Loading the Theme

Just like pydata_sphinx_theme, no extensions entry is needed for HTML builds:

# conf.py
html_theme = "doxtr_core"  # or "doxtr_html_theme_core"

You can also list "doxtr_html_theme_core" in extensions explicitly or let doxtr-theme-core / doxtr-theme-aubergine orchestrate it for multi-format builds.

Mixing & Matching per Format

Combine doxtr_core HTML with another PDF or EPUB theme (for example doxtr_pdf_theme_aubergine):

extensions = ["doxtr_pdf_theme_aubergine"]
html_theme = "doxtr_core"

If another HTML theme (html_theme = "pydata_sphinx_theme") is active alongside doxtr_theme_*, doxtr-html-theme-core leaves the active HTML theme untouched.

Sharing One Color Theme Across Layouts

Pair doxtr_core HTML with a brand palette or custom doxtr_semantic_palette so HTML, PDF, and EPUB share identical colors even when using different layouts:

extensions = ["doxtr_theme_aubergine"]  # provides Aubergine palette & PDF theme
html_theme = "doxtr_core"               # keep Core HTML layout in Aubergine colors

Or configure your own palette via doxtr_semantic_palette:

extensions = ["doxtr_pdf_theme_aubergine"]
html_theme = "doxtr_core"
doxtr_semantic_palette = {
    "primary": "#0F4C81",
    "secondary": "#1D4ED8",
    "accent": "#EA580C",
    "dark": {"primary": "#93C5FD", "page": "#0F172A"},
}

Theme Authoring Guidance

When building a child HTML theme (inheriting doxtr_core) or a brand ThemeSpec (via doxtr-theme-core):

1. Header Brand Title (html_title / project)

The top-left header link and mobile drawer title represent the documentation project, not the theme itself. By default, doxtr-html-theme-core resolves the header title in this order:

  1. User html_theme_options["short_name"] or doxtr_branding["short_name"]
  2. User html_short_title in conf.py
  3. User html_theme_options["brand_name"]
  4. User html_title in conf.py (falls back to project, then the root document title)
  • Never set short_name or brand_name in ThemeSpec.html_options or in a child theme's theme.conf.
  • Never hardcode the theme's name in header.html or drawer.html — always render {{ (doxtr_header_title or theme_brand_name or shorttitle)|e }}.
  • Put default brand logos (logo_light, logo_dark, favicon) on BrandConfig rather than ThemeSpec.html_options so conf.py's html_logo continues to take precedence.

2. Announcement Banner Option (announcement_banner)

Every Doxtr HTML theme must expose announcement_banner and leave it empty ("") by default so end users (via conf.py) and staging/review tooling (such as doxtr test via -D html_theme_options.announcement_banner=...) can display a top-of-page notice consistently across every theme:

  1. Declare and inherit: Inheriting doxtr_core automatically registers announcement_banner = in theme.conf, renders {% block announcement %} inside layout.html (<div class="doxtr-announcement" role="region" aria-label="Announcement"><div class="doxtr-announcement-inner">{{ theme_announcement_banner }}</div></div>), and includes base @layer theme CSS in doxtr-core.css.
  2. Preserve block announcement if overriding block header: In any child layout.html that overrides {% block header %}, call {{ self.announcement() }} (or render the same .doxtr-announcement markup when theme_announcement_banner is truthy) directly above .doxtr-skip-link.
  3. Style with semantic tokens in @layer theme: Customize .doxtr-announcement inside @layer theme using WCAG-checked --dd-* tokens (e.g. var(--dd-primary) and var(--dd-on-primary, var(--dd-bg))).
  4. Leave empty by default: Keep announcement_banner = empty in theme.conf, and either omit announcement_banner or set "announcement_banner": "" in ThemeSpec.html_options. Never pre-fill announcement_banner (or add a custom top bar) with a description of the theme, color scheme, or layout — users can already derive that from looking at the rendered page.
  5. Test both states: Verify default builds render no .doxtr-announcement banner and both html_theme_options = {"announcement_banner": "..."} and -D html_theme_options.announcement_banner=... render it cleanly.

Option Ownership Summary

Option Owner Notes
html_title, project, html_short_title User conf.py Drives top-left header & drawer title
short_name, brand_name User conf.py (html_theme_options) Must remain empty in theme.conf & omitted from ThemeSpec.html_options
announcement_banner Exposed empty by all HTML themes; populated by User conf.py / doxtr test Must be supported in all HTML themes, remain "" by default in theme.conf & ThemeSpec.html_options, and never describe the theme/layout
logo_light, logo_dark, favicon BrandConfig (overridable by user html_logo / html_theme_options) Theme default artwork
show_toc, show_nav, color_scheme_toggle, etc. ThemeSpec.html_options / theme.conf Theme defaults overridable by user

doxtr-html-theme-core also enforces these rules programmatically at build time via THEME_SPEC_FORBIDDEN_HTML_OPTIONS and exposes the guidance string via HTML_THEME_AUTHOR_GUIDANCE / get_html_theme_author_guidance().

Preview

Rendered from doxamples.

Light Mode Dark Mode
Core HTML Light Core HTML Dark

Metadata

Release files for doxtr-html-theme-core 0.5.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 doxtr-html-theme-core 0.5.0
File Size Uploaded Provenance Actions
doxtr_html_theme_core-0.5.0.tar.gz 51.6 kB With provenance Details for doxtr_html_theme_core-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for doxtr-html-theme-core 0.5.0
File Interpreter ABI Platform Actions
doxtr_html_theme_core-0.5.0-py3-none-any.whl Python 3 none any Details for doxtr_html_theme_core-0.5.0-py3-none-any.whl

Total release size: 93.5 kB

Release files / doxtr_html_theme_core-0.5.0.tar.gz

Download URL doxtr_html_theme_core-0.5.0.tar.gz
Size 51.6 kB
Tags Source
SHA-256 checksum
How to use checksums
adb7b0f1f034f4602a0f94ee87d9f3201ef12a32fb66ffd4b49017b800662d31
BLAKE2b-256 checksum
How to use checksums
aa2a3df4c4d4189c6656dd17d811c616ee6827624e2c08d4d730f3ec9aec849d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 3, 2026.

Transparency log

Release files / doxtr_html_theme_core-0.5.0-py3-none-any.whl

Download URL doxtr_html_theme_core-0.5.0-py3-none-any.whl
Size 41.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b1737f3ff09060330d09d567bc41fcd1eda5d0cc1d49464329816ce18b59dc4
BLAKE2b-256 checksum
How to use checksums
a4aa27df1ebd12dd43b9c4120b29eaea045467748f038613a85bf118f22efd1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 3, 2026.

Transparency log

Security for doxtr-html-theme-core 0.5.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for doxtr_html_theme_core-0.5.0.tar.gz

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 Dec 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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