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

github.com/pravin/hugo-theme-prav.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeon Rosenshein <leonrosn@amazon.com>2022-04-28 06:37:37 +0300
committerLeon Rosenshein <leonrosn@amazon.com>2022-04-28 06:37:37 +0300
commit02b710263ad3d10a6090e671b85fec2fef225565 (patch)
treed01757dcc4c4dbf02bb10f141841f732059b707c
parent27919037762d5817016fd1082a23be6e9100744a (diff)
More work on tags
-rw-r--r--layouts/partials/header.html43
1 files changed, 25 insertions, 18 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index f20945b..2417005 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -32,32 +32,39 @@
<link rel="alternate" type="application/atom+xml" title="Atom Feed" href="/atom.xml" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="generator" content="{{ hugo.Generator }}">
+ {{ hugo.Generator }}"
+ {{- if .Params.tags }}
+ <meta name=" keywords" content="{{ delimit .Params.tags "," }}">
+ {{- end }}
+
+ {{ $descText := "" -}}
{{ if .Description -}}
- <meta name="description" property="og:description" content="{{ .Description }}">
+ {{$descText = .Description -}}
{{ else -}}
- <meta name="description" property="og:description" content="{{ .Site.Params.Tagline }}">
- {{ end }}
+ {{$descText = .Site.Params.Tagline -}}
+ {{ end -}}
- {{ "<!-- Twitter Specific Stuff-->" | safeHTML }}
+ {{ $imageLink := "" -}}
+ {{ if .Description -}}
+ {{$imageLink = .Description -}}
+ {{ else -}}
+ {{$imageLink = .Site.Params.Tagline -}}
+ {{ end -}}
+
+ {{ "<!-- OpenGraph/Twitter Specific Stuff-->" | safeHTML }}
<meta name="twitter:card" content="summary">
- {{ if .Site.Social.twitteruser -}}
- <meta name="twitter:creator" content="{{ .Site.Social.twitteruser }}">
- {{ end }}
- {{- if not .IsHome -}}
- <meta name="title" property="twitter:title" content="{{ .Title }}">
- {{ end }}
+ <meta property=”og:type” content=”blog”>
+ <meta name="description" property="og:description" content="{{ $descText }}">
+ <meta property="og:image" content="{{ $imageLink }}">
+ <meta name="author" content="{{ .Site.Params.Author }}">
- {{ if .Params.tags -}}
- <meta name=" keywords" content="{{ delimit .Params.tags "," }}">
+ {{- if not .IsHome -}}
+ <meta property="og:title" content="{{ .Title }}">
{{ end -}}
- <meta name="author" content="{{ .Site.Params.Author }}">
- {{ if .Params.Previewimage -}}
- <meta name="image" property="og:image" content="{{ .Params.Previewimage }}">
- {{ else -}}
- <meta name="image" property="og:image" content="{{ .Site.Params.AuthorImgPath }}">
+ {{- if .Site.Social.twitteruser -}}
+ <meta name="twitter:creator" content="{{ .Site.Social.twitteruser }}">
{{ end }}
{{ "<!-- Any custom header goes here-->" | safeHTML }}