Sphinx Bootstrap Theme

0.8.1 · active · verified Thu Apr 16

Sphinx Bootstrap Theme integrates the Bootstrap CSS/JavaScript framework with Sphinx documentation, offering various layout options, hierarchical menu navigation, and mobile-friendly responsive design. It is configurable, extensible, and supports different Bootswatch CSS themes. The current version is 0.8.1. Releases occur irregularly, indicating active but not rapid development.

Common errors

Warnings

Install

Imports

Quickstart

To quickly use the theme, install it via pip, then update your Sphinx project's `conf.py` file with the specified imports and theme configuration. This snippet also shows common `html_theme_options`.

# conf.py
import os
import sys
import sphinx_bootstrap_theme

project = 'My Project'
copyright = '2026, My Team'
author = 'My Team'

extensions = [
    'sphinx.ext.autodoc',
    'sphinx.ext.napoleon'
]

html_theme = 'bootstrap'
html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()

html_theme_options = {
    'bootstrap_version': '3', # Can be '2' or '3'
    'navbar_sidebarrel': False, # Remove 'prev' and 'next' links from navbar
    'navbar_links': [
        ("Home", "index"),
        ("About", "about"),
        ("GitHub", "https://github.com/your-org/your-project", True)
    ],
    'bootswatch_theme': "flatly", # Example: "flatly", "journal", etc.
    'navbar_title': "My Project Docs"
}

view raw JSON →