This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 22755b47528 Confgure "suggest a change" links properly (#49702)
22755b47528 is described below
commit 22755b4752855b43b81020afac984b35287e0088
Author: Jarek Potiuk <[email protected]>
AuthorDate: Thu Apr 24 14:20:57 2025 +0200
Confgure "suggest a change" links properly (#49702)
After moving the docs, the links to "Suggest a change" for airflow,
docker-compose and helm-chart lead to a wrong URL. This PR fixes it.
We also do not use analytics any more so configuration for it is not
needed any more.
Fixes: #49694
---
airflow-core/docs/conf.py | 3 +--
chart/docs/conf.py | 6 ++++--
devel-common/pyproject.toml | 2 +-
devel-common/src/docs/provider_conf.py | 3 ++-
devel-common/src/docs/utils/conf_constants.py | 4 ----
docker-stack-docs/conf.py | 3 +--
providers-summary-docs/conf.py | 3 +--
7 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/airflow-core/docs/conf.py b/airflow-core/docs/conf.py
index a22136193ae..cf6c0d8a80b 100644
--- a/airflow-core/docs/conf.py
+++ b/airflow-core/docs/conf.py
@@ -67,8 +67,6 @@ PACKAGE_VERSION = airflow.__version__
SYSTEM_TESTS_DIR: pathlib.Path | None
SYSTEM_TESTS_DIR = AIRFLOW_REPO_ROOT_PATH / "airflow-core" / "tests" /
"system" / "core"
-conf_py_path = f"/docs/{PACKAGE_NAME}/"
-
os.environ["AIRFLOW_PACKAGE_NAME"] = PACKAGE_NAME
# Hack to allow changing for piece of the code to behave differently while
@@ -238,6 +236,7 @@ html_show_copyright = False
# html theme options
html_theme_options: dict[str, Any] = get_html_theme_options()
+conf_py_path = "/airflow-core/docs/"
# A dictionary of values to pass into the template engine's context for all
pages.
html_context = get_html_context(conf_py_path)
diff --git a/chart/docs/conf.py b/chart/docs/conf.py
index 79bb713af04..59e448d936c 100644
--- a/chart/docs/conf.py
+++ b/chart/docs/conf.py
@@ -64,8 +64,6 @@ PACKAGE_NAME = "helm-chart"
CHART_ROOT_PATH = AIRFLOW_REPO_ROOT_PATH / "chart"
CHART_DOC_PATH = CHART_ROOT_PATH / "docs"
CHART_STATIC_PATH = CHART_DOC_PATH / "static"
-conf_py_path = f"/docs/{PACKAGE_NAME}/"
-
os.environ["AIRFLOW_PACKAGE_NAME"] = PACKAGE_NAME
CHART_YAML_FILE_PATH = CHART_ROOT_PATH / "Chart.yaml"
@@ -134,6 +132,10 @@ html_theme = "sphinx_airflow_theme"
html_title = f"{PACKAGE_NAME} Documentation"
+conf_py_path = "/chart/docs/"
+# A dictionary of values to pass into the template engine's context for all
pages.
+html_context = get_html_context(conf_py_path)
+
# A shorter title for the navigation bar. Default is the same as html_title.
html_short_title = ""
diff --git a/devel-common/pyproject.toml b/devel-common/pyproject.toml
index e86092d5295..b7f00e8c23d 100644
--- a/devel-common/pyproject.toml
+++ b/devel-common/pyproject.toml
@@ -74,7 +74,7 @@ dependencies = [
"rich-click>=1.7.1",
"click>=8.1.8",
"docutils>=0.21",
- "sphinx-airflow-theme>=0.1.0",
+ "sphinx-airflow-theme>=0.2.2",
"sphinx-argparse>=0.4.0",
"sphinx-autoapi>=3",
"sphinx-autobuild>=2024.10.2",
diff --git a/devel-common/src/docs/provider_conf.py
b/devel-common/src/docs/provider_conf.py
index ceb97760081..16b0ad3c952 100644
--- a/devel-common/src/docs/provider_conf.py
+++ b/devel-common/src/docs/provider_conf.py
@@ -80,7 +80,6 @@ PROVIDER_PATH = (AIRFLOW_REPO_ROOT_PATH /
"providers").joinpath(*PACKAGE_ID.spli
BASE_PROVIDER_SRC_PATH = PROVIDER_PATH / "src" / "airflow"
PACKAGE_VERSION = CURRENT_PROVIDER["versions"][0]
SYSTEM_TESTS_DIR = PROVIDER_PATH / "tests" / "system"
-conf_py_path = f"/providers/{PACKAGE_ID.replace('.', '/')}/docs/"
# Adds to environment variables for easy access from other plugins like
airflow_intersphinx.
os.environ["AIRFLOW_PACKAGE_NAME"] = PACKAGE_NAME
@@ -221,6 +220,8 @@ html_show_copyright = False
html_theme_options: dict[str, Any] = get_html_theme_options()
+
+conf_py_path = f"/providers/{PACKAGE_ID.replace('.', '/')}/docs/"
# A dictionary of values to pass into the template engine's context for all
pages.
html_context = get_html_context(conf_py_path)
diff --git a/devel-common/src/docs/utils/conf_constants.py
b/devel-common/src/docs/utils/conf_constants.py
index 0e4190211cf..a6699b25cee 100644
--- a/devel-common/src/docs/utils/conf_constants.py
+++ b/devel-common/src/docs/utils/conf_constants.py
@@ -150,10 +150,6 @@ def get_html_theme_options():
def get_html_context(conf_py_path: str):
return {
- # Google Analytics ID.
- # For more information look at:
- #
https://github.com/readthedocs/sphinx_rtd_theme/blob/master/sphinx_rtd_theme/layout.html#L222-L232
- "theme_analytics_id": "UA-140539454-1",
# Variables used to build a button for editing the source code
#
# The path is created according to the following template:
diff --git a/docker-stack-docs/conf.py b/docker-stack-docs/conf.py
index f39191f65ae..5d0e9f06869 100644
--- a/docker-stack-docs/conf.py
+++ b/docker-stack-docs/conf.py
@@ -62,8 +62,6 @@ os.environ["AIRFLOW_PACKAGE_NAME"] = PACKAGE_NAME
PACKAGE_VERSION: str = "stable"
-conf_py_path = f"/docs/{PACKAGE_NAME}/"
-
# Adds to environment variables for easy access from other plugins like
airflow_intersphinx.
os.environ["AIRFLOW_PACKAGE_NAME"] = PACKAGE_NAME
@@ -155,6 +153,7 @@ html_show_copyright = False
html_theme_options: dict[str, Any] = get_html_theme_options()
+conf_py_path = "/docker-stack-docs/"
# A dictionary of values to pass into the template engine's context for all
pages.
html_context = get_html_context(conf_py_path)
diff --git a/providers-summary-docs/conf.py b/providers-summary-docs/conf.py
index 377923f3f26..85dfc4c1e1e 100644
--- a/providers-summary-docs/conf.py
+++ b/providers-summary-docs/conf.py
@@ -60,8 +60,6 @@ from docs.utils.conf_constants import (
PACKAGE_NAME = "apache-airflow-providers"
PROVIDERS_SUMMARY_DOCS_PATH = AIRFLOW_REPO_ROOT_PATH / "providers-summary-docs"
-conf_py_path = f"/docs/{PACKAGE_NAME}/"
-
os.environ["AIRFLOW_PACKAGE_NAME"] = PACKAGE_NAME
PACKAGE_VERSION = "stable"
@@ -166,6 +164,7 @@ html_show_copyright = False
html_theme_options: dict[str, Any] = get_html_theme_options()
+conf_py_path = "/providers-summary-docs/"
# A dictionary of values to pass into the template engine's context for all
pages.
html_context = get_html_context(conf_py_path)