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

mimaison pushed a commit to branch markdown
in repository https://gitbox.apache.org/repos/asf/kafka-site.git


The following commit(s) were added to refs/heads/markdown by this push:
     new 6e82807b7 MINOR: Handle /KEYS redirect (#782)
6e82807b7 is described below

commit 6e82807b71dfa06145567fa331d4054796c9fa8a
Author: Harish Vishwanath <[email protected]>
AuthorDate: Mon Feb 16 08:01:37 2026 -0800

    MINOR: Handle /KEYS redirect (#782)
    
    
    Reviewers: Mickael Maison <[email protected]>
---
 README.md                            | 17 +++++++++++++++++
 content/en/KEYS.md                   |  4 ++++
 layouts/partials/hooks/head-end.html |  7 ++++++-
 3 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 1bedfa322..1c7d30d7f 100644
--- a/README.md
+++ b/README.md
@@ -193,9 +193,26 @@ Detailed information about the Front Matter fields used in 
this site:
 - `type`: Used to specify the layout type (e.g., `type: docs` for 
documentation pages).
 - `aliases`: (Optional) List of old URLs that should redirect to this page.
 - `url`: (Optional) Overrides the default URL path constructed from the 
filename.
+- `redirect_to`: (Optional) Sets up a client-side meta-refresh redirect to an 
external URL.
 
 For more details, see the [Hugo Front Matter 
Documentation](https://gohugo.io/content-management/front-matter/).
 
+### Managing Redirects
+
+To create a client-side redirect to an external URL, use the `redirect_to` 
Front Matter field.
+
+1. Create a markdown file at the desired path (e.g., `content/en/KEYS.md` for 
`/KEYS`).
+2. Add the `redirect_to` field in the Front Matter.
+
+```yaml
+---
+title: KEYS Redirect
+redirect_to: https://downloads.apache.org/kafka/KEYS
+---
+```
+
+This generates a standard HTML meta-refresh redirect. Note that this is a 
client-side redirect; command-line tools like `curl` will not follow it 
automatically unless they parse the HTML.
+
 ### Dynamic Version Linking
 
 To maintain version-agnostic documentation, we use a custom system that 
dynamically resolves version numbers in links and included files. This avoids 
the need to manually update hundreds of version strings (e.g., from "43" to 
"44") when releasing a new version.
diff --git a/content/en/KEYS.md b/content/en/KEYS.md
new file mode 100644
index 000000000..7be692a74
--- /dev/null
+++ b/content/en/KEYS.md
@@ -0,0 +1,4 @@
+---
+title: KEYS Redirect
+redirect_to: https://downloads.apache.org/kafka/KEYS
+---
diff --git a/layouts/partials/hooks/head-end.html 
b/layouts/partials/hooks/head-end.html
index 07ea99223..72003ca95 100644
--- a/layouts/partials/hooks/head-end.html
+++ b/layouts/partials/hooks/head-end.html
@@ -6,4 +6,9 @@
 <!-- Additional mobile web app meta tags -->
 <meta name="mobile-web-app-capable" content="yes">
 <meta name="apple-mobile-web-app-capable" content="yes">
-<meta name="apple-mobile-web-app-status-bar-style" content="black">
\ No newline at end of file
+<meta name="apple-mobile-web-app-status-bar-style" content="black">
+
+{{ if .Params.redirect_to }}
+<meta http-equiv="refresh" content="0; url={{ .Params.redirect_to }}" />
+<link rel="canonical" href="{{ .Params.redirect_to }}" />
+{{ end }}
\ No newline at end of file

Reply via email to