text: Sphinx documentation theme based on readthedocs.org
  Project description
  Modification
  Design
  Online demo of the theme: linxifan.github.io/Sphinx-demo/
  Stanford web color specification: [1] and [2]
  Add new fonts
  - Edit bower.json, add ubuntumono-googlefont to dependency list.
  - Edit Gruntfile.js, add font paths like the others.
  - Edit sass/_theme_font_local.sass, note that font-weight: 400 corresponds to normal font while 700 correspoonds to bold.
  - Make sure the font files are copied to sphinx_theme/<mytheme>/static/fonts/
  SASS
  - bower_components/wyrm contains the SASS for the original WYRM core. You can override variables in it to use customized color.
  - sass/_theme_variables.sass defines most of the colors.
  - sass/_theme_rst.sass defines how to render any reStructuredText file. All customizations are marked with mydef in the code comment.
  - sass/_theme_layout.css defines how to render menu, navigation bars, etc.
  Workflow
  - Work in sass/ folder and Grunt will auto copy the generated files into test_theme
  - Once done, copy sass/ to sass_<newtheme> and copy test_theme to sphinx_theme/<newtheme> subdir.
  - Update sphinx_theme/__init__.py to include the new theme.
  Installation
  Via package
  Download the package or add it to your requirements.txt file:
  $ pip install sphinx_theme
  In your conf.py file:
  import sphinx_theme html_theme = "stanford_theme" html_theme_path = [sphinx_theme.get_html_theme_path('stanford-theme')] # All available themes: print(sphinx_theme.THEME_LIST) # >> ['stanford_theme', 'neo_rtd_theme']
  Via git or download
  Symlink or subtree the sphinx_theme/sphinx_theme repository into your documentation at docs/_themes/sphinx_theme then add the following two settings to your Sphinx conf.py file:
  html_theme = "stanford_theme" html_theme_path = ["_themes/sphinx_theme", ]
  Configuration
  You can configure different parts of the theme.
  Project-wide configuration
  The theme’s project-wide options are defined in the sphinx_theme/<mytheme>/theme.conf file of this repository, and can be defined in your project’s conf.py via html_theme_options. For example:
  html_theme_options = { 'collapse_navigation': False, 'display_version': False, 'navigation_depth': 3, }.
  Make the theme compatible with ReadTheDocs
  Currently if you import stanford.
  # on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org on_rtd = os.environ.get('READTHEDOCS', None) == 'True' if not on_rtd: # only import and set the theme if we're building docs locally import sphinx_theme html_theme = 'stanford_theme' html_theme_path = [sphinx_theme.get_html_theme_path('stanford_theme')] # otherwise, readthedocs.org uses their theme by default, so no need to specify it
  Editing the theme
  The.
  Project details
  Release history Release notifications
  Download files
  Download the file for your platform. If you're not sure which to choose, learn more about installing packages.