From 848d4bdd1e66d1a0c3b90747f103b3450f4b01ad Mon Sep 17 00:00:00 2001 From: David Garcia Date: Tue, 19 Nov 2024 19:09:50 +0000 Subject: [PATCH] docs: render supported enterprise versions from json --- .../data/enterprise_supported_versions.json | 34 +++++++++++++++++++ docs/_templates/supported_versions.tmpl | 15 ++++++++ docs/conf.py | 5 +++ docs/pyproject.toml | 1 + .../versioning/version-support-enterprise.rst | 30 ++-------------- 5 files changed, 57 insertions(+), 28 deletions(-) create mode 100644 docs/_static/data/enterprise_supported_versions.json create mode 100644 docs/_templates/supported_versions.tmpl diff --git a/docs/_static/data/enterprise_supported_versions.json b/docs/_static/data/enterprise_supported_versions.json new file mode 100644 index 000000000..5ad51eb1f --- /dev/null +++ b/docs/_static/data/enterprise_supported_versions.json @@ -0,0 +1,34 @@ +{ + "data": [ + { + "version": "2024.2", + "released": "November 2024", + "status": "Supported", + "end_of_life": "After 2026.1 or 2025.2 is released (see :ref:`Version Support Policy `)" + }, + { + "version": "2024.1 (LTS)", + "released": "February 2024", + "status": "Supported", + "end_of_life": "After 2026.1 is released (see :ref:`Version Support Policy `)" + }, + { + "version": "2023.1 (LTS)", + "released": "August 2023", + "status": "Supported", + "end_of_life": "After 2025.1 is released (see :ref:`Version Support Policy `)" + }, + { + "version": "2022.2", + "released": "January 2023", + "status": "Not supported", + "end_of_life": "June 2024" + }, + { + "version": "2022.1 (LTS)", + "released": "August 2022", + "status": "Not supported", + "end_of_life": "June 2024" + } + ] +} diff --git a/docs/_templates/supported_versions.tmpl b/docs/_templates/supported_versions.tmpl new file mode 100644 index 000000000..4431257d1 --- /dev/null +++ b/docs/_templates/supported_versions.tmpl @@ -0,0 +1,15 @@ +.. list-table:: + :widths: 15 20 15 50 + :header-rows: 1 + + * - Version + - Released + - Status + - End of Life (EOL) + +{% for row in data['data'] %} + * - {{ row['version'] }} + - {{ row['released'] }} + - {{ row['status'] }} + - {{ row['end_of_life'] }} +{% endfor %} diff --git a/docs/conf.py b/docs/conf.py index 008721b75..bb30e0ca3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -34,6 +34,8 @@ "sphinx_sitemap", "sphinx_scylladb_theme", "sphinx_multiversion", # optional + "sphinxcontrib.datatemplates", + ] # The suffix(es) of source filenames. @@ -94,6 +96,9 @@ # The theme to use for pages. html_theme = "sphinx_scylladb_theme" +# The directory for data templates. +templates_path = ['_templates', ] + # These folders are copied to the documentation's HTML output html_static_path = ['_static'] diff --git a/docs/pyproject.toml b/docs/pyproject.toml index 75ee089a7..1a1087885 100644 --- a/docs/pyproject.toml +++ b/docs/pyproject.toml @@ -14,6 +14,7 @@ sphinx-autobuild = "^2024.4.19" Sphinx = "^7.3.7" sphinx-multiversion-scylla = "^0.3.1" redirects_cli ="^0.1.3" +sphinxcontrib-datatemplates = "^0.11.0" [build-system] requires = ["poetry>=1.8.0"] diff --git a/docs/versioning/version-support-enterprise.rst b/docs/versioning/version-support-enterprise.rst index 6e431abdf..ee62b4ab6 100644 --- a/docs/versioning/version-support-enterprise.rst +++ b/docs/versioning/version-support-enterprise.rst @@ -5,34 +5,8 @@ ScyllaDB Enterprise Version Support Supported Versions ------------------------ -.. list-table:: - :widths: 20 25 20 35 - :header-rows: 1 - - * - Version - - Released - - Status - - End of Life (EOL) - * - 2024.2 - - November 2024 - - Supported - - After 2026.1 or 2025.2 is released (see :ref:`Version Support Policy `) - * - 2024.1 (LTS) - - February 2024 - - Supported - - After 2026.1 is released (see :ref:`Version Support Policy `) - * - 2023.1 (LTS) - - August 2023 - - Supported - - After 2025.1 is released (see :ref:`Version Support Policy `) - * - 2022.2 - - January 2023 - - Not supported - - June 2024 - * - 2022.1 (LTS) - - August 2022 - - Not supported - - June 2024 +.. datatemplate:json:: /_static/data/enterprise_supported_versions.json + :template: supported_versions.tmpl Version Numbering -------------------