Modifying content width of the Sphinx theme 'Read the Docs'

前端 未结 9 848
小鲜肉
小鲜肉 2020-12-13 18:04

I am using \'Read the Docs\' Sphinx theme for my documentation. In the original theme, given below

http://read-the-docs.readthedocs.org/en/latest/theme.html

9条回答
  •  暖寄归人
    2020-12-13 18:40

    The HTML option added in Sphinx 1.8.0b1 (released Sep 2018) simplifies the process. The recommendation in Read The Docs Documentation is adding custom css to the theme via the html_css_files option in conf.py.

    html_css_files = [
        'custom.css',
    ]
    

    Put the custom.css in the html static path folder (Default is _static folder).

    Content of custom.css:

    .wy-nav-content {
        max-width: 75% !important;
    }
    

提交回复
热议问题