This is an automated email from the ASF dual-hosted git repository.

kaxilnaik pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow-site.git


The following commit(s) were added to refs/heads/main by this push:
     new 6fa089a4d2 Copy external JS/CSS/fonts for Sphinx docs
6fa089a4d2 is described below

commit 6fa089a4d27924880ea0c2d860a1a8df8b85b13a
Author: Kaxil Naik <[email protected]>
AuthorDate: Wed Dec 17 12:17:02 2025 +0000

    Copy external JS/CSS/fonts for Sphinx docs
    
    This will allow Sphinx theme to be used standalone.
---
 site.sh                                               | 5 +++++
 sphinx_airflow_theme/sphinx_airflow_theme/layout.html | 6 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/site.sh b/site.sh
index 2bc27c6e43..68e6625858 100755
--- a/site.sh
+++ b/site.sh
@@ -186,6 +186,11 @@ function prepare_theme {
     cp "${SITE_DIST}"/docs.*.js "${THEME_GEN}/js/docs.js"
     cp "${SITE_DIST}"/scss/main.min.*.css "${THEME_GEN}/css/main.min.css"
     cp "${SITE_DIST}"/scss/main-custom.min.*.css 
"${THEME_GEN}/css/main-custom.min.css"
+
+    # Copy external JS/CSS/fonts for Sphinx docs to _gen directory
+    EXTERNAL_SRC="${MY_DIR}/landing-pages/site/static/external"
+    cp -r "${EXTERNAL_SRC}" "${THEME_GEN}/"
+
     echo "Successful copied required files"
 }
 
diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/layout.html 
b/sphinx_airflow_theme/sphinx_airflow_theme/layout.html
index e9ab2f8464..cad3911e2a 100644
--- a/sphinx_airflow_theme/sphinx_airflow_theme/layout.html
+++ b/sphinx_airflow_theme/sphinx_airflow_theme/layout.html
@@ -214,9 +214,9 @@
 {%- macro script() %}
     <script type="text/javascript" src="{{ pathto('_static/_gen/js/docs.js', 
1) }}"></script>
     <script type="text/javascript" id="documentation_options" 
data-url_root="{{ pathto('', 1) }}" src="{{ 
pathto('_static/documentation_options.js', 1) }}"></script>
-    <script src="/external/js/jquery-3.4.1.min.js" 
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" 
crossorigin="anonymous"></script>
-    <script src="/external/js/popper-2.11.8.min.js"></script>
-    <script src="/external/js/bootstrap-5.3.3.min.js"></script>
+    <script src="{{ pathto('_static/_gen/external/js/jquery-3.4.1.min.js', 1) 
}}" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" 
crossorigin="anonymous"></script>
+    <script src="{{ pathto('_static/_gen/external/js/popper-2.11.8.min.js', 1) 
}}"></script>
+    <script src="{{ pathto('_static/_gen/external/js/bootstrap-5.3.3.min.js', 
1) }}"></script>
     {%- for js in script_files %}
         {{ js_tag(js) }}
     {%- endfor %}

Reply via email to