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:
- User
html_theme_options["short_name"]ordoxtr_branding["short_name"] - User
html_short_titleinconf.py - User
html_theme_options["brand_name"] - User
html_titleinconf.py(falls back toproject, then the root document title)
- Never set
short_nameorbrand_nameinThemeSpec.html_optionsor in a child theme'stheme.conf. - Never hardcode the theme's name in
header.htmlordrawer.html— always render{{ (doxtr_header_title or theme_brand_name or shorttitle)|e }}. - Put default brand logos (
logo_light,logo_dark,favicon) onBrandConfigrather thanThemeSpec.html_optionssoconf.py'shtml_logocontinues 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:
- Declare and inherit: Inheriting
doxtr_coreautomatically registersannouncement_banner =intheme.conf, renders{% block announcement %}insidelayout.html(<div class="doxtr-announcement" role="region" aria-label="Announcement"><div class="doxtr-announcement-inner">{{ theme_announcement_banner }}</div></div>), and includes base@layer themeCSS indoxtr-core.css. - Preserve
block announcementif overridingblock header: In any childlayout.htmlthat overrides{% block header %}, call{{ self.announcement() }}(or render the same.doxtr-announcementmarkup whentheme_announcement_banneris truthy) directly above.doxtr-skip-link. - Style with semantic tokens in
@layer theme: Customize.doxtr-announcementinside@layer themeusing WCAG-checked--dd-*tokens (e.g.var(--dd-primary)andvar(--dd-on-primary, var(--dd-bg))). - Leave empty by default: Keep
announcement_banner =empty intheme.conf, and either omitannouncement_banneror set"announcement_banner": ""inThemeSpec.html_options. Never pre-fillannouncement_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. - Test both states: Verify default builds render no
.doxtr-announcementbanner and bothhtml_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 |
|---|---|
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)
| 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)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| 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 logRelease 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 logSecurity 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.
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 logA 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.