How to add custom css file to Sphinx?

前端 未结 4 517
故里飘歌
故里飘歌 2020-12-02 15:25

How I can add custom css file? The following config does not work for me:

# conf.py
html_static_path = [\'_static\']
html_theme = \'default\'
html_theme_opti         


        
4条回答
  •  时光说笑
    2020-12-02 16:07

    A simpler way is to add this to your conf.py:

    def setup(app):
        app.add_css_file('css/custom.css')  # may also be an URL
    

    Then put the file into the _static/css/ folder.

提交回复
热议问题