如果我有一些文档,例如Galleria's documentation,如何设置它,以便在运行make html
命令时它将在每个页面上添加自定义页脚?
[如果我将conf.py的the latex preamble部分输出为pdf格式,我可能会使用它。
谢谢!
您必须通过提供这样的html文件来扩展默认布局:
{% extends '!layout.html' %}
{% block footer %}
<!-- your html code here -->
{% endblock %}
将其保存在_templates/
子目录中作为layout.html
,并确保告诉conf.py
在哪里可以找到此目录:
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
有关模板的更多信息,请参见:https://www.sphinx-doc.org/en/master/templating.html