0

how to get source code of html template of read the docs ? I get sphinx package from git hub but i don't know python or how to proceed with that package

I simply want HTML and css files of that template then i will modify according to my requirement

barryhunter
  • 20,886
  • 3
  • 30
  • 43
Rahul Kumawat
  • 165
  • 1
  • 11

1 Answers1

0

If you want to use the ReadTheDocs theme locally with Sphinx you can clone/fork the code from the Github repository below.

Source: https://github.com/snide/sphinx_rtd_theme

If you're also building your Docs using readthedocs.org you'll need to enter the following to your conf.py to avoid issues with the RTD build process:

# 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_rtd_theme
    html_theme = 'sphinx_rtd_theme'
    html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

Otherwise, readthedocs.org uses their theme by default, so no need to specify it.

Elias MÃ¥rtenson
  • 3,820
  • 23
  • 32
Brian King
  • 474
  • 3
  • 13