Я только что создал документ Sphinx, используя sphinx-quickstart.exe
с темой alabaster
.
И я хотел бы напечатать версию документа где-нибудь в заголовке.
Я заполнил version
и release
переменных в conf.py
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
# -- Project information -----------------------------------------------------
project = 'MWE'
copyright = '2019, and1er'
author = 'and1er'
# The short X.Y version
version = '2.4.12'
# The full version, including alpha/beta/rc tags
release = 'beta'
extensions = [
]
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
language = None
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
pygments_style = 'sphinx'
html_theme = 'alabaster'
html_static_path = ['_static']
htmlhelp_basename = 'MWEdoc'
index.rst
.. MWE documentation master file, created by
sphinx-quickstart on Tue Feb 5 14:51:07 2019.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to MWE's documentation!
===============================
.. toctree::
:maxdepth: 2
:caption: Contents:
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
Полученный документ не имеет строк 2.4.12
или beta
.