Skip to content

Commit 62f5188

Browse files
authored
refactor: supplement meta tags for SEO (#305)
1 parent 9237a1c commit 62f5188

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

layouts/partials/head.html

+8-6
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
<link href="{{ site.Params.favicon | relURL }}" rel="shortcut icon" type="image/x-icon" />
33
{{ end }}
44

5+
<link rel="canonical" href="{{ .Permalink }}" />
6+
7+
{{ template "_internal/schema.html" . }}
8+
59
{{ if eq .Type "posts" }}
6-
<!-- Page Author & Description -->
10+
<!-- Page Author -->
711
<meta name="author" content="{{ if isset .Params "author" }}{{ .Params.author }}{{ else }}{{ site.Params.author }}{{ end }}" />
8-
<meta name="description" content="{{ .Summary | plainify }}" />
912
{{ else }}
10-
<!-- Site Author & Description -->
13+
<!-- Site Author -->
1114
<meta name="author" content="{{ site.Params.author }}" />
12-
<meta name="description" content="{{ site.Params.description }}" />
1315
{{ end }}
1416

15-
<link rel="canonical" href="{{ .Permalink }}" />
16-
1717
<!-- Open Graph -->
1818
{{ template "_internal/opengraph.html" . }}
1919

@@ -25,6 +25,7 @@
2525

2626
<link rel="stylesheet" href="{{ "css/output.css" | relURL }}" />
2727

28+
{{ if or site.Params.backgroundImage site.Params.backgroundImageDark }}
2829
<style>
2930
{{ if site.Params.backgroundImage }}
3031
#dream-global-bg {
@@ -38,3 +39,4 @@
3839
}
3940
{{ end }}
4041
</style>
42+
{{ end }}

0 commit comments

Comments
 (0)