diff --git a/docs/conf.py b/docs/conf.py index 32824013..8166ff01 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -45,14 +45,16 @@ master_doc = 'index' project = u'ZoiteChat' copyright = u'2026, TingPing' -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = '2.19' -# The full version, including alpha/beta/rc tags. -release = '2.19.0' +# Read the release directly from the repository's VERSION file so the +# documentation always matches the ZoiteChat source/release being built. +_version_file = os.path.abspath( + os.path.join(os.path.dirname(__file__), '..', 'VERSION') +) +with open(_version_file, encoding='utf-8') as version_file: + release = version_file.read().strip() + +# The short X.Y version used by Sphinx. +version = '.'.join(release.split('.')[:2]) # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages.