Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/rafed/ramium.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafed Muhammad Yasir <rafed123@yahoo.com>2020-05-22 10:16:53 +0300
committerRafed Muhammad Yasir <rafed123@yahoo.com>2020-05-22 10:16:53 +0300
commita39c1298f8f848cd3266db210e039aa1ec7ec1b2 (patch)
treef2f51fa499901c7fbe4046d12340c259e5a6387a
parent7fe06ae2a27a9d297f1412b7b52d38daa0d15638 (diff)
Improved SEO
-rw-r--r--layouts/partials/head.html11
-rw-r--r--layouts/partials/meta.html24
2 files changed, 26 insertions, 9 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 68d8793..f3b3b8f 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -8,11 +8,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
-<meta name="description"
- content="{{- with .Description }}{{ . }}
- {{ else }}{{ with .Summary }}{{ . }}
- {{ else }}{{ .Site.Params.description }}
- {{ end }}{{ end -}}">
+{{- partial "meta.html" . -}}
<link rel="canonical" href="{{ .Permalink }}" />
@@ -21,11 +17,8 @@
<link rel="stylesheet" href="{{ "/css/font-awesome.min.css" | relURL }}">
<link rel="stylesheet" href="{{ "/css/bulma.min.css" | relURL }}">
-{{ template "_internal/opengraph.html" . }}
-{{ template "_internal/twitter_cards.html" . }}
-
{{ if not (in (string .Site.BaseURL) "localhost") }}
- {{ template "_internal/google_analytics_async.html" . }}
+{{ template "_internal/google_analytics_async.html" . }}
{{ end }}
<script src={{ "/js/ramium.js" | relURL }}></script>
diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html
new file mode 100644
index 0000000..da2df44
--- /dev/null
+++ b/layouts/partials/meta.html
@@ -0,0 +1,24 @@
+{{ if eq .Kind "taxonomy" }}
+<meta name="description" content="List of all articles related to {{ .Title }}">
+
+{{ else if eq .Kind "taxonomyTerm" }}
+<meta name="description" content="List of all tags in {{ .Site.Title }}">
+
+{{ else if eq .Kind "section"}}
+<meta name="description" content="List of all articles in section- {{ .Title | humanize }}">
+
+{{ else if eq .Title "All Sections" }}
+<meta name="description" content="List of all sections in {{ .Site.Title }}">
+
+{{ else }}
+<meta name="description" content="
+ {{- with .Description }}{{ . }}
+ {{ else }}{{ with .Summary }}{{ . }}
+ {{ else }}{{ .Site.Params.description }}
+ {{ end }}{{ end -}}
+">
+{{ end }}
+
+{{ template "_internal/opengraph.html" . }}
+{{ template "_internal/twitter_cards.html" . }}
+{{ template "_internal/schema.html" . }}