Skip to main content

Sorrow

PyPI version Release workflow status Docs workflow status Live demo

mkdocs-sorrow-theme

An MkDocs theme in the palette inspired from Omarchy Solitude theme. It is based on the Dracula theme for MkDocs: it keeps Dracula's layout and replaces its colors and code highlighting.

See the live demo at https://mhs-20.github.io/sorrow-mkdocs-theme/.

The header button switches between three accent palettes:

Palette Code Diagrams
red red palette, code red palette, diagrams
green green palette, code green palette, diagrams
blue blue palette, code blue palette, diagrams

Install

pip install "mkdocs-sorrow-theme>=0.3.0"

Then, in mkdocs.yml:

theme:
  name: sorrow
  favicon: assets/favicon.ico  # optional; defaults to the Sorrow icon
  logo: assets/logo.png        # optional sidebar logo
  mermaid: true                # optional, 0.3.0+; renders mermaid diagrams
  palette: red                 # optional; red, green or blue
  palette_switch: true         # optional; header button to cycle palettes

highlightjs (default true) and hljs_languages control highlight.js. There is no footer and no option to load other highlight styles.

Since 0.3.0, mermaid: true (default false) renders fenced mermaid blocks as diagrams colored from the theme's tokens; mermaid_version (default 11.4.1) picks the Mermaid release loaded from jsDelivr. Plain fences work as they are, and so does a pymdownx.superfences custom fence that outputs <div class="mermaid">.

Since 0.3.0, scripts in extra_javascript keep their type, async and defer settings.

How it works

The Dracula templates and layout assets are copied into this package rather than inherited with extends: dracula, because MkDocs copies every file of a parent theme into the built site. Copying lets the theme leave out Dracula's highlight stylesheet, logo, favicon, footer and color tokens.

  • base.html and modules/: Dracula's templates. The sidebar divider uses the sidebar color, the favicon defaults to the Sorrow icon, and the footer is removed. CSS classes use the prefix sorrow- instead of drac-.
  • assets/css/sorrow-ui.css, assets/css/mkdocs.min.css: Dracula's stylesheets without its color tokens; admonition tints read the tokens.
  • assets/css/sorrow.css: the color tokens and the palettes.
  • assets/css/sorrow-highlight.css: highlight.js colors following Omarchy's syntax mapping (default/themed/helix.toml.tpl).

Palette

Token Sorrow key Color
--black (sidebar, code) dark_background #0c0e10
--blackSecondary (page) background #101315
--greyTernary (text) foreground #cacccc
--white yellow #d9dbdc
--grey selection #3d1621
--greySecondary muted #4b4e55
--purple accent #7a1a2c
--cyan cyan #943a4c
--green green #9fa5a9
--orange bright_yellow #c9c2b4
--pink magenta #a8495b
--red bright_red #a82a3c
--yellow yellow #d9dbdc

The four reds are darker than the Sorrow originals. Lighter and translucent variants are derived with color-mix().

palette (default red) picks the accent palette: red, green or blue. The palettes share the dark tones and swap only the tinted tokens:

Token red green blue
--grey #3d1621 #163d26 #16263d
--purple #7a1a2c #1f5c3a #1a3f7a
--cyan #943a4c #3a7a52 #3a5c94
--pink #a8495b #4f9466 #4f73a8
--red #a82a3c #2e8a4c #2a5aa8

palette_switch (default true) adds a header button that cycles the palettes. The reader's choice is stored in localStorage and applied before the page renders, so code highlighting and Mermaid diagrams follow it too.

Develop

uv venv && uv pip install -e .
uv run mkdocs serve

The demo site is built from docs/ and mkdocs.yml. Every push to main deploys it to GitHub Pages through .github/workflows/docs.yml.

Release

Releases are automated by .github/workflows/release.yml on every push to main. semantic-release reads the Conventional Commits since the last tag, following .releaserc.json: feat releases a minor version, fix a patch, and a breaking change a major. It then tags the commit (vX.Y.Z) and creates the GitHub release. A final job builds that tag and publishes it to PyPI through trusted publishing, so no API token is stored. The package version comes from the git tag through hatch-vcs.

Credits

Released under the MIT License. Built on the MIT-licensed Dracula theme for MkDocs.

Metadata

Release files for mkdocs-sorrow-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 mkdocs-sorrow-theme 0.4.0
File Size Uploaded Provenance Actions
mkdocs_sorrow_theme-0.4.0.tar.gz 279.3 kB With provenance Details for mkdocs_sorrow_theme-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mkdocs-sorrow-theme 0.4.0
File Interpreter ABI Platform Actions
mkdocs_sorrow_theme-0.4.0-py3-none-any.whl Python 3 none any Details for mkdocs_sorrow_theme-0.4.0-py3-none-any.whl

Total release size: 567.5 kB

Release files / mkdocs_sorrow_theme-0.4.0.tar.gz

Download URL mkdocs_sorrow_theme-0.4.0.tar.gz
Size 279.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b0393779c7e55895b2aa85246aff7c1e89c6a849b275123a0f34c0e160b3c6d7
BLAKE2b-256 checksum
How to use checksums
0ce3fecb54ba9199a6fef43817867fb55c4471fa3a2e15efe93ac4ad7457f5fa
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 Nov 28, 2026.

Transparency log

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

Download URL mkdocs_sorrow_theme-0.4.0-py3-none-any.whl
Size 288.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0319f02b46ca387a6a61cd6a6e70edaeee30166e54a954bf5d9c7d1214e9c702
BLAKE2b-256 checksum
How to use checksums
bbeb3b50253150836028e03caa8e02b89cb3077fe6bd8e7058e391e5f22584be
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 Nov 28, 2026.

Transparency log

Security for mkdocs-sorrow-theme 0.4.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 mkdocs_sorrow_theme-0.4.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 Nov 28, 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