Saturday, June 6, 2015

Setting a Sphinx theme

To set a theme in Sphinx:

  • find a theme you want to copy.  It will generally be a directory full of files.
  • copy the directory under your project's _templates directory.
  • set the html_theme in
  • some docs mention setting html_theme_path as well, but it doesn't seem necessary if it's under _templates.
  • There's some nice themes at

$ ls _templates/

$ diff
< html_theme = 'alabaster'
> html_theme = "sphinx_rtd_theme"
> html_theme_path = ["_themes", ]    ### probably not necessary

No comments: