summaryrefslogtreecommitdiffstats
path: root/layouts
diff options
context:
space:
mode:
authorAnoduck, The Anonymous Duck <9925396+anoduck@users.noreply.github.com>2025-03-28 22:56:50 +0000
committerGitHub <noreply@github.com>2025-03-28 22:56:50 +0000
commitafdf1fa7c5d90d5fcac78a9b893d2095071883b0 (patch)
tree578179ded2b31a591139a6c900c7f28854c61549 /layouts
parent11d3181eedd5b9fe804e6483eef683360ba13a77 (diff)
parent57dcd87622abdaae205a0e4d9cc884a4e802c17c (diff)
Merge pull request #91 from anoduck/develop
fix(google): google 404
Diffstat (limited to '')
-rw-r--r--layouts/_default/single.html2
-rw-r--r--layouts/alias.html15
2 files changed, 16 insertions, 1 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 4d15895..8d772a1 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -41,5 +41,5 @@
</div>
{{ end -}}
</div>
-{{ template "_internal/disqus.html" . }}
+ {{ template "_internal/disqus.html" . }}
{{ end -}} \ No newline at end of file
diff --git a/layouts/alias.html b/layouts/alias.html
new file mode 100644
index 0000000..d220f68
--- /dev/null
+++ b/layouts/alias.html
@@ -0,0 +1,15 @@
+{{- $url := .Permalink -}}
+{{- $match := findRE "[A-Z]" $url -}}
+{{ if $match -}}
+ {{- $lower_url := $url | lower -}}
+ <!DOCTYPE html>
+ <html lang={{ site.LanguageCode }} >
+ <head>
+ <title>Page Redirection {{ .Permalink | relLangURL }}</title>
+ <link rel="canonical" href="{{ .Permalink | relLangURL }}" />
+ <meta charset="utf-8" />
+ <meta name="robots" content="noindex">
+ <meta http-equiv="refresh" content="0; url={{ $lower_url }}">
+ </head>
+ </html>
+{{ end -}} \ No newline at end of file