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

github.com/kakawait/hugo-tranquilpeak-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibaud LeprĂȘtre <thibaud.lepretre@gmail.com>2017-11-12 21:45:37 +0300
committerThibaud LeprĂȘtre <thibaud.lepretre@gmail.com>2017-11-23 01:42:52 +0300
commite4a2f316ef68666e19a67e794db76ab555627428 (patch)
treeedc7cabe08eade062c15c0a9b75acb81d527c857 /layouts/partials/head.html
parent7ff200e9d0cf4e77148c05d1adef7c64c86b08eb (diff)
Rework meta and social tag
- Add more twitter meta tag - Fix existing social tag - Add link canonical Merge both existing PR #206 and 216
Diffstat (limited to 'layouts/partials/head.html')
-rw-r--r--layouts/partials/head.html54
1 files changed, 5 insertions, 49 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 111ab0d..fabc8fc 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -17,7 +17,7 @@
{{ .Scratch.Set "gravatarEmail" .Site.Author.gravataremail }}
{{ end }}
{{ if .Scratch.Get "gravatarEmail" }}
- {{ .Scratch.Set "authorPicture" (printf "//www.gravatar.com/avatar/%s" (urlize (md5 (.Scratch.Get "gravatarEmail")))) }}
+ {{ .Scratch.Set "authorPicture" (printf "https://www.gravatar.com/avatar/%s" (urlize (md5 (.Scratch.Get "gravatarEmail")))) }}
{{ else if .Site.Author.picture }}
{{ .Scratch.Set "authorPicture" (absURL .Site.Author.picture) }}
{{ end }}
@@ -25,64 +25,20 @@
<html lang="{{ .Site.LanguageCode }}">
<head>
{{ partial "head_start.html" . }}
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <meta name="generator" content="Hugo {{ .Hugo.Version }} with theme Tranquilpeak 0.4.4-SNAPSHOT">
+ {{ partial "meta.html" . }}
<title>{{ with .Title }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }}</title>
- <meta name="author" content="{{ .Site.Author.name }}">
- <meta name="keywords" content="{{ with .Keywords }}{{ delimit . ", " }}{{ end }}{{ if .Site.Params.keywords }}, {{ delimit .Site.Params.keywords ", " }}{{ end }}">
<link rel="icon" href="{{ with .Site.Params.favicon }}{{ . }}{{ else }}/favicon.png{{ end }}">
{{ with .RSSLink }}
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ . }}">
{{ end }}
- <!-- open graph data -->
- <meta name="description" content="{{ if .Description }}{{ .Description }}{{ else if .IsPage }}{{ .Summary }}{{ else }}{{ .Site.Params.description }}{{ end }}">
- <meta property="og:description" content="{{ if .Description }}{{ .Description }}{{ else if .IsPage }}{{ .Summary }}{{ else }}{{ .Site.Params.description }}{{ end }}">
- <meta property="og:type" content="blog">
- <meta property="og:title" content="{{ with .Title }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }}">
- <meta property="og:url" content="{{ .URL }}">
- <meta property="og:site_name" content="{{ .Site.Title }}">
- <meta name="twitter:card" content="summary">
- <meta name="twitter:title" content="{{ .Site.Title }}">
- <meta name="twitter:description" content="{{ if .Description }}{{ .Description }}{{ else if .IsPage }}{{ .Summary }}{{ else }}{{ .Site.Params.description }}{{ end }}">
- {{ with .Site.Author.twitter }}
- <meta name="twitter:creator" content="@{{ . }}">
- {{ end }}
- {{ with .Site.Params.fbAppId }}
- <meta property="fb:app_id" content="{{ . }}">
- {{ end }}
-
- <!-- Facebook admins -->
- {{ with .Site.Params.fbAdminIds }}
- {{ range . }}
- <meta property="fb:admins" content="{{ . }}">
- {{ end }}
- {{ end }}
-
- {{ if .Scratch.Get "gravatarEmail" }}
- <meta property="og:image" content="//www.gravatar.com/avatar/{{ (md5 (.Scratch.Get "gravatarEmail")) | urlize }}?s=640">
- {{ else if .Site.Author.picture }}
- <meta property="og:image" content="{{ .Site.Author.picture | absURL }}">
- {{ end }}
-
- {{ with .Params.thumbnailImage }}
- <meta property="og:image" content="{{ . | absURL }}">
- {{ end }}
- {{ with .Params.coverImage }}
- <meta property="og:image" content="{{ . | absURL }}">
- {{ end }}
- {{ with .Params.gallery }}
- {{ range . }}
- <meta property="og:image" content="{{ range first 1 (split . " ") }}{{ . | absURL }}{{ end }}">
- {{ end }}
- {{ end }}
-
- {{ with .Site.Author.googlePlus }}
+ {{ with .Site.Author.googleplus }}
<link rel="publisher" href="https://plus.google.com/{{ . | urlize }}">
{{ end }}
+ <link rel="canonical" href="{{ .Permalink }}">
+
<!--EXTERNAL STYLES-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/jquery.fancybox.min.css" integrity="sha256-vuXZ9LGmmwtjqFX1F+EKin1ThZMub58gKULUyf0qECk=" crossorigin="anonymous" />