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

github.com/alexandrevicenzi/soho.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Vicenzi <vicenzi.alexandre@gmail.com>2020-05-25 22:44:35 +0300
committerAlexandre Vicenzi <vicenzi.alexandre@gmail.com>2020-05-25 22:44:35 +0300
commit43ddf545bf298411ff0287d265e6a762bd3e7532 (patch)
tree9011b43062766f50c678403a10455db421ed4ec5
parentc5c85b0db5306c4798da365618d1028e82da4983 (diff)
Use built-in seo templates
-rw-r--r--layouts/partials/seo.html93
1 files changed, 4 insertions, 89 deletions
diff --git a/layouts/partials/seo.html b/layouts/partials/seo.html
index 347b41c..96d56d5 100644
--- a/layouts/partials/seo.html
+++ b/layouts/partials/seo.html
@@ -1,92 +1,7 @@
+{{ template "_internal/google_news.html" . }}
- <meta property="og:locale" content="{{ .Site.LanguageCode }}"/>
+{{ template "_internal/schema.html" . }}
- {{ with .Site.Params.gravatar }}
- <meta property="og:image" content="https://www.gravatar.com/avatar/{{md5 .}}?s=400&d=mp">
- {{- else -}}
- {{ with .Site.Params.profilePicture }}
- <meta property="og:image" content="{{ $.Site.BaseURL }}{{ . }}">
- {{- end -}}
- {{ end }}
+{{ template "_internal/twitter_cards.html" . }}
- {{ if eq .Type "post" }}
- <meta property="og:site_name" content="{{ .Site.Title }}"/>
- <meta property="og:title" content="{{ .Title }}"/>
- <meta property="og:description" content="{{ if .Description }}{{ .Description }}{{ else }}{{ .Summary }}{{ end }}"/>
- <meta property="og:url" content="{{ .Permalink }}"/>
- <meta property="og:type" content="article"/>
- <meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}"/>
- <meta property="article:modified_time" content="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}"/>
- <meta property="article:author" content="{{ .Site.Params.author }}">
-
- {{ with .Params.Categories -}}
- {{- range $name := . -}}
- <meta property="article:section" content="{{ $name }}"/>
- {{ end -}}
- {{- end -}}
-
- {{ with .Params.Tags -}}
- {{- range $name := . -}}
- <meta property="article:tag" content="{{ $name }}"/>
- {{ end -}}
- {{- end -}}
-
- {{ else }}
- <meta property="og:type" content="blog"/>
- <meta property="og:site_name" content="{{ .Site.Title }}"/>
-
- {{- if .IsHome }}
- <meta property="og:title" content="{{ .Site.Title }}"/>
- <meta property="og:url" content="{{ .Site.BaseURL }}"/>
- <meta property="og:description" content="{{ .Site.Params.description }}"/>
- {{- else -}}
- <meta property="og:title" content="{{ .Title }}"/>
- <meta property="og:url" content="{{ .Permalink }}"/>
- <meta property="og:description" content="{{ if .Description }}{{ .Description }}{{ else }}{{ .Summary }}{{ end }}"/>
- {{- end -}}
-
- {{ end }}
-
- <script type="application/ld+json">
- {
- "@context" : "http://schema.org",
- "@type" : "Blog",
- "name": {{ .Site.Title }},
- "url" : {{ .Site.BaseURL }},
- {{- with .Site.Params.gravatar }}
- "image": "https://www.gravatar.com/avatar/{{md5 .}}?s=400&d=mp",
- {{- else -}}
- {{ with .Site.Params.profilePicture }}
- "image": {{ . | printf "%s%s" $.Site.BaseURL }},
- {{- end -}}
- {{- end }}
- "description": "{{ .Site.Params.description }}"
- }
- </script>
-
- {{ if eq .Type "post" }}
- <script type="application/ld+json">
- {
- "@context": "http://schema.org",
- "@type": "BlogPosting",
- "name": "{{ .Title }}",
- "headline": "{{ .Title }}",
- "datePublished": "{{ .Date.Format "2006-01-02T15:04:05Z0700" }}",
- "dateModified": "{{ .Date.Format "2006-01-02T15:04:05Z0700" }}",
- "author": {
- "@type": "Person",
- "name": "{{ .Site.Params.author }}",
- "url": {{ .Site.BaseURL }}
- },
- {{- with .Site.Params.gravatar }}
- "image": "https://www.gravatar.com/avatar/{{md5 .}}?s=400&d=mp",
- {{- else -}}
- {{ with .Site.Params.profilePicture }}
- "image": {{ . | printf "%s%s" $.Site.BaseURL }},
- {{- end -}}
- {{- end }}
- "url": {{ .Permalink }},
- "description": "{{ if .Description }}{{ .Description }}{{ else }}{{ .Summary }}{{ end }}"
- }
- </script>
- {{ end }}
+{{ template "_internal/opengraph.html" . }}