cwd*_*cwd 22 unix linux restructuredtext makefile python-sphinx
如果我有一些文档,例如Galleria的文档,我该如何设置它以便在运行make html命令时它会在每个页面上添加一个自定义页脚?
我看到如果我将它输出为pdf格式,我可能会使用conf.py 的latex前言部分.
谢谢!
Unc*_*eiv 30
您必须通过提供如下的html文件来扩展默认布局:
{% extends '!layout.html' %}
{% block footer %}
<!-- your html code here -->
{% endblock %}
Run Code Online (Sandbox Code Playgroud)
将其保存在_templates/子目录中,layout.html并确保告诉conf.py在哪里找到此目录:
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Run Code Online (Sandbox Code Playgroud)
有关模板的更多信息,请访问:http://sphinx.pocoo.org/templating.html
| 归档时间: |
|
| 查看次数: |
5570 次 |
| 最近记录: |