Skip to content

Conversation

@hvishwanath
Copy link
Contributor

@hvishwanath hvishwanath commented Jan 11, 2026

This PR introduces a redirect_to front matter parameter, allowing any content page to easily set up an external client-side redirect. We use this new capability to redirect /KEYS to https://downloads.apache.org/kafka/KEYS.

  • Updated layouts/partials/hooks/head-end.html to check for the redirect_to parameter. If present, it injects the standard <meta http-equiv="refresh" ... /> tag and a canonical link.
  • Created content/en/KEYS.md utilizing this new parameter.

This implements the standard "Meta Refresh" method for redirects, similar to Hugo's internal Aliases. It utilizes Hugo Partial Hooks to inject the logic into the <head> of the page without overriding the entire theme layout.

cc @mumrah

Note: 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.

@hvishwanath hvishwanath changed the title Implement Front Matter Support for External Redirects Handling /KEYS redirect - Implement Front Matter Support for External Redirects Jan 11, 2026
@tisonkun tisonkun mentioned this pull request Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant