A soothing pastel theme for MkDocs based on the Catppuccin color palette
Project description
๐จ MkDocs Catppuccin Theme
Soothing pastel theme for MkDocs based on the Catppuccin color palette
๐ Overview
This is a MkDocs theme that extends Material for MkDocs with the beautiful Catppuccin color palette. It provides a comfortable and aesthetically pleasing documentation experience with carefully crafted soothing pastel colors.
โจ Features
- ๐จ Four Catppuccin Flavors: Latte (light), Frappรฉ, Macchiato, and Mocha (dark)
- ๐ Complete Color Integration: All UI elements styled with Catppuccin colors
- ๐ฏ Syntax Highlighting: Code blocks with Catppuccin-themed syntax colors
- ๐ฑ Fully Responsive: Works perfectly on all devices
- ๐ Easy Installation: Just
pip install mkdocs-catppuccin - โก Extends Material: All Material for MkDocs features available
๐ Installation
Install the theme using pip:
pip install mkdocs-catppuccin
Or install from source:
git clone https://github.com/ruslanlap/Catppuccin-MkDocs.git
cd Catppuccin-MkDocs
pip install -e .
๐ Step-by-Step Configuration Guide
Step 1: Install the Theme
pip install mkdocs-catppuccin
Step 2: Create Project Structure
Your MkDocs project should have this structure:
your-project/
โโโ docs/
โ โโโ index.md # Home page
โ โโโ assets/ # Assets folder (optional)
โ โ โโโ logo.png # Your logo
โ โโโ stylesheets/ # CSS folder (optional)
โ โโโ extra.css # Your custom styles
โโโ mkdocs.yml # Configuration file
Step 3: Basic Configuration
Create or edit your mkdocs.yml file:
# Basic site information
site_name: Your Project Name
site_description: Your documentation description
site_url: https://yourname.github.io/your-project/
# Catppuccin theme configuration
theme:
name: catppuccin
# Choose color scheme (pick one or multiple)
palette:
# Light theme - Catppuccin Latte
- scheme: latte
toggle:
icon: material/weather-sunny
name: Switch to dark mode
# Dark theme - Catppuccin Mocha
- scheme: mocha
toggle:
icon: material/weather-night
name: Switch to light mode
# Add your logo (optional)
logo: assets/logo.png # Path to your logo
favicon: assets/logo.png # Browser tab icon
# Useful features
features:
- navigation.tabs # Navigation tabs
- navigation.sections # Navigation sections
- navigation.top # Back to top button
- search.suggest # Search suggestions
- search.highlight # Highlight search results
- content.code.copy # Copy code button
# Your site navigation
nav:
- Home: index.md
- About: about.md
# Plugins
plugins:
- search # Documentation search
Step 4: Custom Styles (Optional)
IMPORTANT: The theme already includes all Catppuccin styles! You DO NOT need to add extra_css for basic usage.
Add extra_css ONLY if you want to customize something:
# Add this ONLY if you need custom styles
extra_css:
- stylesheets/extra.css # Your custom styles
Create docs/stylesheets/extra.css file for your customizations:
/* Example: change heading color */
.md-typeset h1 {
color: #c6a0f6; /* Catppuccin Mauve */
}
๐จ Changing Accent Color (New Simplified Method!)
The theme uses Green as the default accent color for all flavors. You can now change the accent color for all themes in just one place!
Super Easy Method (Recommended):
- Open
docs/stylesheets/catppuccin.css - Find the ACCENT COLOR CONFIGURATION section at the top (lines 5-18)
- Change
greento any color you want in just 4 lines!
Example - Change from Green to Pink:
/* ========================================
ACCENT COLOR CONFIGURATION
Change these to modify the accent color for all themes in one place!
Available colors: green, pink, blue, mauve, lavender, sky, teal, etc.
======================================== */
:root {
/* Change these 4 lines to switch accent colors for all themes */
--accent-latte: var(--ctp-latte-pink);
/* Default: green, Try: var(--ctp-latte-pink) */
--accent-frappe: var(--ctp-frappe-pink);
/* Default: green, Try: var(--ctp-frappe-pink) */
--accent-macchiato: var(--ctp-macchiato-pink);
/* Default: green, Try: var(--ctp-macchiato-pink) */
--accent-mocha: var(--ctp-mocha-pink);
/* Default: green, Try: var(--ctp-mocha-pink) */
}
Available Catppuccin colors:
pink, mauve, blue, sapphire, sky, teal, green, yellow, peach, red, maroon, lavender, flamingo, rosewater
What gets changed:
- โ Link colors
- โ Navigation active states
- โ Hover effects
- โ Code syntax highlighting (strings)
- โ Success admonitions
- โ Scrollbar hover
- โ Table of contents active items
Step 5: All 4 Color Schemes
If you want to give users a choice of all 4 Catppuccin variants:
theme:
name: catppuccin
palette:
# Light theme - Latte
- scheme: latte
toggle:
icon: material/weather-sunny
name: Switch to Frappรฉ
# Dark theme - Frappรฉ (coolest)
- scheme: frappe
toggle:
icon: material/weather-night
name: Switch to Macchiato
# Dark theme - Macchiato (warm)
- scheme: macchiato
toggle:
icon: material/weather-partly-cloudy
name: Switch to Mocha
# Dark theme - Mocha (warmest)
- scheme: mocha
toggle:
icon: material/weather-cloudy
name: Switch to Latte
Step 6: Complete Configuration Example
Here's a complete mkdocs.yml example with all features:
site_name: My Documentation
site_description: Beautiful documentation with Catppuccin theme
site_url: https://yourname.github.io/your-project/
repo_url: https://github.com/yourname/your-project
repo_name: yourname/your-project
theme:
name: catppuccin
palette:
- scheme: latte
toggle:
icon: material/weather-sunny
name: Switch to Frappรฉ
- scheme: frappe
toggle:
icon: material/weather-night
name: Switch to Macchiato
- scheme: macchiato
toggle:
icon: material/weather-partly-cloudy
name: Switch to Mocha
- scheme: mocha
toggle:
icon: material/weather-cloudy
name: Switch to Latte
logo: assets/logo.png
favicon: assets/logo.png
features:
- navigation.tabs
- navigation.sections
- navigation.expand
- navigation.footer
- navigation.top
- navigation.tracking
- search.suggest
- search.highlight
- search.share
- content.code.copy
- content.code.annotate
# Navigation
nav:
- Home: index.md
- Configuration: configuration.md
# Plugins
plugins:
- search
# Markdown extensions
markdown_extensions:
- admonition
- pymdownx.details
- pymdownx.superfences
- pymdownx.highlight:
anchor_linenums: true
- pymdownx.inlinehilite
- pymdownx.snippets
- tables
- toc:
permalink: true
# Copyright
copyright: Copyright © 2025 Your Name
# Additional settings
extra:
social:
- icon: fontawesome/brands/github
link: https://github.com/yourname/your-project
generator: false
๐ Important Notes
- Logo: Place your
logo.pngfile in thedocs/assets/folder - CSS: The theme already includes all Catppuccin styles -
extra_cssis only needed for your own customizations - Color schemes: You can use a single scheme or all four with a toggle
- Testing: Run
mkdocs serveto preview your documentation locally
๐จ Color Schemes
Light Mode - Latte ๐ป
Perfect for daytime reading with warm, gentle tones:
- Background:
#eff1f5(Base) - Text:
#4c4f69(Text) - Primary:
#8839ef(Mauve) - Accent:
#1e66f5(Blue)
Dark Mode - Mocha ๐
Cozy and comfortable for nighttime with rich, soft colors:
- Background:
#1e1e2e(Base) - Text:
#cdd6f4(Text) - Primary:
#cba6f7(Mauve) - Accent:
#89b4fa(Blue)
Syntax Highlighting
Both themes include complete syntax highlighting:
- Keywords: Red
- Strings: Green
- Functions: Mauve
- Numbers: Peach
- Comments: Overlay0
- Operators: Sky
- Variables: Rosewater
๐ฆ What's Included
mkdocs-catppuccin/
โโโ mkdocs_catppuccin/
โ โโโ __init__.py
โ โโโ mkdocs_theme.yml # Theme configuration
โ โโโ assets/
โ โโโ stylesheets/
โ โโโ catppuccin.css # Catppuccin colors
โโโ pyproject.toml # Package configuration
โโโ LICENSE # MIT License
โโโ README.md # This file
๐ง Development
Setting Up Development Environment
# Clone the repository
git clone https://github.com/ruslanlap/Catppuccin-MkDocs.git
cd Catppuccin-MkDocs
# Install in editable mode
pip install -e .
# Create a test MkDocs project
mkdocs new test-site
cd test-site
# Configure to use the theme
echo "theme:
name: catppuccin" > mkdocs.yml
# Serve the documentation
mkdocs serve
Building the Package
# Install build tools
pip install build twine
# Build the package
python -m build
# The package will be in dist/
Publishing to PyPI
# Upload to TestPyPI first
python -m twine upload --repository testpypi dist/*
# If everything looks good, upload to PyPI
python -m twine upload dist/*
๐ค Contributing
Contributions are welcome! Feel free to:
- Report bugs
- Suggest new features
- Submit pull requests
- Improve documentation
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Credits
- Catppuccin Theme: catppuccin.com - The beautiful color palette
- Material for MkDocs: squidfunk/mkdocs-material - The base theme
- MkDocs: mkdocs.org - The documentation framework
๐ Links
- Homepage: github.com/ruslanlap/Catppuccin-MkDocs
- PyPI: pypi.org/project/mkdocs-catppuccin
- Catppuccin: catppuccin.com
- Material for MkDocs: squidfunk.github.io/mkdocs-material
Catppuccin-MkDocs
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mkdocs_catppuccin-0.1.1.tar.gz.
File metadata
- Download URL: mkdocs_catppuccin-0.1.1.tar.gz
- Upload date:
- Size: 116.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f253030504faed9098d8ad7c94e16f4c60835cf4be4f8f39cc2d60a62640ca33
|
|
| MD5 |
119cb24ef18049c1854c37921cd06246
|
|
| BLAKE2b-256 |
52a371ce38bf9a4e2d0b8367ef2fd5f36766c3f05761a9490f903eaa9561fe30
|
File details
Details for the file mkdocs_catppuccin-0.1.1-py3-none-any.whl.
File metadata
- Download URL: mkdocs_catppuccin-0.1.1-py3-none-any.whl
- Upload date:
- Size: 111.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9280348df782e4346e4e62a2f9f92ef9f4e8b633595478f35129f91d0402151
|
|
| MD5 |
44235601816fd832ca11dd1c7ecc6702
|
|
| BLAKE2b-256 |
c53895eb9329d2f96795c3e7aaef57e557b7866aad1c64f557d6b3ad3e6596b5
|