use*_*884 5 restructuredtext python-sphinx
我想更改sphinx文档中的默认字体.我正在使用sphinx_bootstrap_theme'journal'
我该怎么做呢?
创建自己的" _templates"目录和" layout.html"文件(假设您从"源"目录构建):
$ mkdir source/_templates
$ touch source/_templates/layout.html
Run Code Online (Sandbox Code Playgroud)
配置"conf.py":
templates_path = ['_templates']
html_static_path = ['_static']
Run Code Online (Sandbox Code Playgroud)
覆盖文件" source/_templates/layout.html":
{# Import the theme's layout. #}
{% extends "!layout.html" %}
{# Custom CSS overrides #}
{% set bootswatch_css_custom = ['_static/my-styles.css'] %}
Run Code Online (Sandbox Code Playgroud)
在_static/my-styles.css:
body{
font-family:"Arial", Helvetica, sans-serif;
}
Run Code Online (Sandbox Code Playgroud)
此链接应该更有用