Skip to main content
Ctrl+K
⚠️The latest release refactored our HTML, so double-check your custom CSS rules!⚠️
Sphinx Book Theme - Home Sphinx Book Theme - Home
  • Executable Books
  • GitHub
  • PyPI

Topic Areas

  • Get started
  • Content and formatting
    • Special content blocks
    • PyData Theme Elements
    • Jupyter notebooks
    • Launch buttons for interactivity
  • Layout and major sections
    • Primary sidebar and navigation
    • Secondary sidebar and table of contents
    • Header and navbar
    • Content footer
    • Page footer
    • Announcement banners
  • Component customization
    • Logo and branding
    • Icon links and badges
    • Add a download page button
    • Buttons that link to source files
    • Add your own CSS rules
  • Reference of theme options
  • Contributing guide
    • Set up your development workflow
    • Architecture of the repository
    • Style and design
    • Testing infrastructure
    • Releases and version numbers
    • Translation workflow
    • Creating sub-themes
  • Changelog

Example pages

  • Kitchen Sink
    • Admonitions
    • API documentation
    • Blocks
    • Generic items
    • Images & Figures
    • Lists
    • Really Long Page Title because we should test sidebar wrapping
    • Structural Elements
    • Tables
    • Typography
  • Theme-specific elements
  • Sphinx extension styles
  • Jupyter notebooks
  • Thebe
  • Reference for Blog
  • NumPy docstrings
  • Comments
  • Show source
  • Suggest edit
  • Open issue
  • .md

Layout and major sections

Layout and major sections#

These sections describe how to add content to the major sections of the site.

  • Primary sidebar and navigation
    • Control the left sidebar items
      • Default sidebar elements
    • Add a header to your Table of Contents
    • Add the home page to your table of contents
    • Control the depth of the left sidebar lists to expand
    • Control the maximum depth of the left sidebar lists
    • Turn off expandable left sidebar lists
  • Secondary sidebar and table of contents
    • Rename the in-page Table of Contents
    • Show more levels of the in-page TOC by default
  • Header and navbar
    • Add components to the header navbar
    • An example
    • Style the header
  • Content footer
    • Add extra HTML to your content footer
  • Page footer
  • Announcement banners

previous

Launch buttons for interactivity

next

Primary sidebar and navigation

By the Executable Book Project

© Copyright 2025.

Last updated on Apr 06, 2025.