Bringing Bootswatch to Sphinx

The Bootstrap Theme for Sphinx documentation continues to evolve, and I’m pleased to announce the v0.2.0 release. The theme integrates Twitter’s Bootstrap library into Sphinx, and v0.2.0 adds new support for Bootswatch CSS extensions, which provide a lot of great new UI possibilities for your documentation. We’ve also internally updated to Bootstrap 2.3.1.

The project’s demonstration site now uses the “united” Bootswatch theme to give a clean and well… orange-ish feel to the site. Here is a screenshot of the demonstration site in a desktop viewport:

[![Theme with Bootswatch][img_demo_desk_th]][img_demo_desk] [img_demo_desk_th]: [img_demo_desk]:

The project is available for download from GitHub and PyPi. You are encouraged to update and try out some Bootswatch goodness!

Adding Bootswatch

As a preliminary note, the use of Bootswatch themes is entirely optional, and disabled by default - the project starts with a vanilla Bootstrap appearance, which you can customize to your heart’s content. To enable a specific Bootswatch theme, set the following option in your “” file:

html_theme_options = {
    # Bootswatch ( theme.
    # Options are nothing with "" (default) or the name of a valid theme such
    # as "amelia" or "cosmo".
    # Note that this is served off CDN, so won't be available offline.
    'bootswatch_theme': "united",

The list of Bootswatch themes you can now try out include:

As a final note, the Bootstrap CSS files are served off of CDN, which means that if you are offline, your site will have a non-themed, vanilla Bootstrap appearance. We are considering refactoring the Bootswatch code to be available offline as well.