From 03c1af557c486cfc5f1e8806ddcf24e0ca8078ce Mon Sep 17 00:00:00 2001 From: Alexander Hampel Date: Thu, 10 Mar 2022 13:25:16 -0500 Subject: [PATCH] automatically use version number set by cmake in doc --- doc/conf.py.in | 7 +++++++ doc/index.rst | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/conf.py.in b/doc/conf.py.in index 017200e1..cfdd0340 100644 --- a/doc/conf.py.in +++ b/doc/conf.py.in @@ -52,6 +52,13 @@ autosummary_imported_members=False project = 'TRIQS DFTTools' version = '@PROJECT_VERSION@' +# this makes the current project version available as var in every rst file +rst_epilog = """ +.. |PROJECT_VERSION| replace:: {version} +""".format( +version = version, +) + copyright = '2011-2021' mathjax_path = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=default" diff --git a/doc/index.rst b/doc/index.rst index 6624d170..4b11af29 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -4,9 +4,9 @@ DFTTools ######### -.. sidebar:: DFTTools 3.0.0 +.. sidebar:: DFTTools |PROJECT_VERSION| - This is the homepage of DFTTools v3.0.0. + This is the homepage of DFTTools |PROJECT_VERSION| For changes see the :ref:`changelog page `. .. image:: _static/logo_github.png