From 2d7a5748d8a5e822e89366ca934d7ae15b455ecf Mon Sep 17 00:00:00 2001 From: Alexander Hampel Date: Thu, 10 Mar 2022 13:35:14 -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 ff4697b1..182c670f 100644 --- a/doc/conf.py.in +++ b/doc/conf.py.in @@ -49,6 +49,13 @@ autosummary_imported_members=False project = '@PROJECT_NAME@' 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 = '2017-2018 N. Wentzell, O. Parcollet 2018-2021 The Simons Foundation, authors: N. Wentzell, D. Simons, H. Strand, O. Parcollet' 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 8d52d689..94054b86 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -3,9 +3,9 @@ app4triqs ********* -.. sidebar:: app4triqs 3.0.0 +.. sidebar:: app4triqs |PROJECT_VERSION| - This is the homepage of app4triqs v3.0.0. + This is the homepage of app4triqs |PROJECT_VERSION|. For changes see the :ref:`changelog page `. .. image:: _static/logo_github.png