Skip to content

Commit 0d00a8e

Browse files
committed
🀌 Better SEO πŸš€
1 parent d68356a commit 0d00a8e

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

β€Žlayouts/partials/custom/head-end.htmlβ€Ž

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
<!-- Basic SEO Meta Tags -->
2+
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ with .Summary }}{{ . | plainify | truncate 160 }}{{ else }}{{ .Site.Params.description }}{{ end }}{{ end }}">
3+
<meta name="keywords" content="{{ with .Params.keywords }}{{ delimit . ", " }}{{ else }}{{ delimit .Site.Params.keywords ", " }}{{ end }}">
4+
<meta name="author" content="{{ with .Params.author }}{{ . }}{{ else }}{{ .Site.Params.author }}{{ end }}">
5+
6+
<!-- Canonical URL -->
7+
<link rel="canonical" href="{{ .Permalink }}">
8+
9+
<!-- Robots Meta Tag -->
10+
<meta name="robots" content="{{ with .Params.robots }}{{ . }}{{ else }}index, follow{{ end }}">
11+
12+
<!-- Open Graph Meta Tags (for social sharing) -->
13+
<meta property="og:title" content="{{ .Title }} | {{ .Site.Title }}">
14+
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{ with .Summary }}{{ . | plainify | truncate 160 }}{{ else }}{{ .Site.Params.description }}{{ end }}{{ end }}">
15+
<meta property="og:image" content="{{ with .Params.image }}{{ . | absURL }}{{ else }}{{ .Site.Params.image | absURL }}{{ end }}">
16+
<meta property="og:url" content="{{ .Permalink }}">
17+
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}">
18+
<meta property="og:site_name" content="{{ .Site.Title }}">
19+
20+
<!-- Twitter Card Meta Tags -->
21+
<meta name="twitter:card" content="summary_large_image">
22+
<meta name="twitter:title" content="{{ .Title }} | {{ .Site.Title }}">
23+
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{ with .Summary }}{{ . | plainify | truncate 160 }}{{ else }}{{ .Site.Params.description }}{{ end }}{{ end }}">
24+
<meta property="twitter:image" content="{{ with .Params.image }}{{ . | absURL }}{{ else }}{{ .Site.Params.image | absURL }}{{ end }}">
25+
26+
27+
28+
29+
130
<script src="https://cdnjs.cloudflare.com/ajax/libs/quicklink/2.3.0/quicklink.umd.js"></script>
231
<script>
332
window.addEventListener("load", () => {

0 commit comments

Comments
Β (0)