Skip to content

Commit

Permalink
Add alias page to include OG data, so rendering of old URLs at Linked…
Browse files Browse the repository at this point in the history
…In and Slack is still fine.
  • Loading branch information
cbos committed Jan 17, 2025
1 parent 17c58f0 commit e56a7a2
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions layouts/alias.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!DOCTYPE html>
<html lang="{{ site.Language.LanguageCode }}">
<head>
<title>Redirect {{ .Permalink }}</title>
<link rel="canonical" href="{{ .Permalink }}">
<meta name="robots" content="noindex">
<meta charset="utf-8">
{{ if .Site.Params.favicon }}
<link rel="icon" type="image/x-icon" href='{{ .Site.Params.favicon }}'>
{{ else }}
<link rel="icon" type="image/x-icon" href='{{ "images/favicon.ico" | absURL }}'>
{{ end }}
<meta name="theme-color" content="#1e2327">

<meta name="description"
content="{{ if .IsHome }}{{ .Site.Params.tagline }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
<meta name="keywords"
content='{{ with .Params.Keywords }}{{ delimit . ", " }}{{ else }}{{ $.Site.Params.Keywords }}{{ end }}' />
<meta name="robots" content="index,follow" />

<!-- Twitter Card -->
{{ template "_internal/twitter_cards.html" . }}

<!-- OG data -->
{{ template "_internal/opengraph.html" . }}

<!-- RSS -->
{{ with .OutputFormats.Get "RSS" }}
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
{{ end }}

<!-- JSON Feed -->
{{ with .OutputFormats.Get "json" }}
<link href="{{ .RelPermalink }}" rel="alternate" type="application/json" title="{{ $.Site.Title }}" />
{{ end }}

{{ partial "faro-analytics/assets/js" . }}
<meta http-equiv="refresh" content="0; url={{ .Permalink }}">
</head>
</html>

0 comments on commit e56a7a2

Please sign in to comment.