Skip to main content

A soothing pastel theme for MkDocs based on the Catppuccin color palette

Project description

๐ŸŽจ MkDocs Catppuccin Theme

Catppuccin MkDocs Logo

Catppuccin Palette

Demo site

Soothing pastel theme for MkDocs based on the Catppuccin color palette

PyPI PyPI - Python Version License


๐Ÿ“– 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):

  1. Open docs/stylesheets/catppuccin.css
  2. Find the ACCENT COLOR CONFIGURATION section at the top (lines 5-18)
  3. Change green to 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

  1. Logo: Place your logo.png file in the docs/assets/ folder
  2. CSS: The theme already includes all Catppuccin styles - extra_css is only needed for your own customizations
  3. Color schemes: You can use a single scheme or all four with a toggle
  4. Testing: Run mkdocs serve to 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

๐Ÿ”— Links

Catppuccin-MkDocs

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

mkdocs_catppuccin-0.1.1.tar.gz (116.7 kB view details)

Uploaded Source

Built Distribution

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

mkdocs_catppuccin-0.1.1-py3-none-any.whl (111.6 kB view details)

Uploaded Python 3

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

Hashes for mkdocs_catppuccin-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f253030504faed9098d8ad7c94e16f4c60835cf4be4f8f39cc2d60a62640ca33
MD5 119cb24ef18049c1854c37921cd06246
BLAKE2b-256 52a371ce38bf9a4e2d0b8367ef2fd5f36766c3f05761a9490f903eaa9561fe30

See more details on using hashes here.

File details

Details for the file mkdocs_catppuccin-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_catppuccin-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c9280348df782e4346e4e62a2f9f92ef9f4e8b633595478f35129f91d0402151
MD5 44235601816fd832ca11dd1c7ecc6702
BLAKE2b-256 c53895eb9329d2f96795c3e7aaef57e557b7866aad1c64f557d6b3ad3e6596b5

See more details on using hashes here.

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