Improve SEO

This commit is contained in:
Hazem Krimi
2023-11-22 19:03:03 +01:00
parent e05564729d
commit 077c4fe728
5 changed files with 31 additions and 6 deletions
+21 -2
View File
@@ -17,10 +17,28 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#BD1839" />
<meta
name="description"
content="{{ if .Params.description }}{{ .Params.description }}{{ else }}{{ .Site.Params.defaultDescription }}{{ end }}"
>
<meta
name="keywords"
content="{{ if .Params.keywords }}{{ .Params.keywords }}{{ else }}{{ .Site.Params.defaultKeywords }}{{ end }}"
>
<meta name="robots" content="index, follow">
<meta property="og:title" content="{{ .Page.Title }}">
<meta
property="og:description"
content="{{ if .Params.description }}{{ .Params.description }}{{ else }}{{ .Site.Params.defaultDescription }}{{ end }}"
>
<meta property="og:url" content="{{ .Page.Permalink }}">
{{ block "meta" . }}{{ end }}
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .Permalink site.Title | safeHTML }}
{{ printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .Permalink site.Title | safeHTML }}
{{ end }}
<link rel="canonical" href="{{ .Page.Permalink }}">
<link rel="icon" sizes="192x192" href="{{ $androidChromeIcon.Permalink }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ $appleTouchIcon.Permalink }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ $favIcon32.Permalink }}">
@@ -40,6 +58,7 @@
<script defer src="{{ $baseScripts.Permalink }}"></script>
<script defer src="{{ $mobileNavigationScripts.Permalink }}"></script>
<script defer src="{{ $contactFormScripts.Permalink }}"></script>
{{ block "scripts" . }}{{ end }}
</head>
<body>
{{ partial "header.html" . }}