Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override alias template to preserve anchor fragment #24394

Merged
merged 4 commits into from
Apr 28, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
docs: override alias template to preserve anchor fragment
Signed-off-by: jolheiser <[email protected]>
  • Loading branch information
jolheiser committed Apr 28, 2023
commit b5cbd8313a1c134b8bc618a91bdf202125364b2c
12 changes: 12 additions & 0 deletions docs/layouts/alias.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html{{ with site.LanguageCode | default site.Language.Lang }} lang="{{ . }}"{{ end }}>
<head>
<title>{{ .Permalink }}</title>
<link rel="canonical" href="{{ .Permalink }}">
<meta name="robots" content="noindex">
<meta charset="utf-8">
jolheiser marked this conversation as resolved.
Show resolved Hide resolved
<script>
window.location = "{{ .Permalink }}" + window.location.search + window.location.hash;
</script>
</head>
</html>