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

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

commit 7f9a2d3b938e8a7bf3bee2b5879bf10dbba36245
Author: Kaxil Naik <[email protected]>
AuthorDate: Tue Oct 6 20:38:27 2026 +0100

    [staging test] Serve Markdown to agents for common.ai docs via Accept: 
text/markdown
---
 landing-pages/site/static/.htaccess | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/landing-pages/site/static/.htaccess 
b/landing-pages/site/static/.htaccess
index 1f5414eb3d..957d465e04 100644
--- a/landing-pages/site/static/.htaccess
+++ b/landing-pages/site/static/.htaccess
@@ -3,6 +3,20 @@ RewriteEngine On
 # Redirect bare /registry to /registry/ for consistent trailing-slash URLs
 RewriteRule ^registry$ /registry/ [R=301,L]
 
+# STAGING TEST ONLY - Markdown for coding agents (Accept: text/markdown).
+# Stand-in target: the page's _sources/*.rst.txt, until the docs build 
publishes page.html.md.
+RewriteCond %{HTTP:Accept} text/markdown [NC]
+RewriteRule ^docs/apache-airflow-providers-common-ai/([^/]+)/(.+)\.html$ 
https://d7fnmbhf26p21.cloudfront.net/docs/apache-airflow-providers-common-ai/$1/_sources/$2.rst.txt
 [P,L]
+RewriteCond %{HTTP:Accept} text/markdown [NC]
+RewriteRule ^docs/apache-airflow-providers-common-ai/([^/]+)/((?:.+/)?)$ 
https://d7fnmbhf26p21.cloudfront.net/docs/apache-airflow-providers-common-ai/$1/_sources/$2index.rst.txt
 [P,L]
+<IfModule mod_headers.c>
+    # Caches must keep the HTML and Markdown answers apart. THE_REQUEST is the 
original
+    # request line, unaffected by the rewrite to the proxy URL.
+    Header merge Vary Accept "expr=%{THE_REQUEST} =~ m# 
/docs/apache-airflow-providers-common-ai/#"
+    # S3 sends .md and .txt without a charset.
+    Header edit Content-Type "^(text/(markdown|plain))$" "$1; charset=utf-8" 
"expr=%{THE_REQUEST} =~ m# /docs/#"
+</IfModule>
+
 RewriteCond %{REQUEST_URI} ^/docs [OR]
 RewriteCond %{REQUEST_URI} ^/schemas/ [OR]
 RewriteCond %{REQUEST_URI} ^/registry/

Reply via email to