diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2022-04-24 08:54:54 +0200 |
|---|---|---|
| committer | Serghei Iakovlev <egrep@protonmail.ch> | 2022-04-24 08:54:54 +0200 |
| commit | b056f13dc9322a55288433a167841de592124937 (patch) | |
| tree | cb41e9e908dfd535907912f4c36941c7a33492a5 /layouts/partials/head.html | |
| parent | 018097da9cc6bcdac546666a193e86c6b83b2d95 (diff) | |
| download | gohugo-theme-ed-b056f13dc9322a55288433a167841de592124937.tar.gz | |
Add sidebar support
Diffstat (limited to 'layouts/partials/head.html')
| -rw-r--r-- | layouts/partials/head.html | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index a324697..1518319 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,8 +1,6 @@ <head prefix="og: http://ogp.me/ns#; dc: http://purl.org/dc/terms/#"> - {{- $resource_url := print .Site.BaseURL | safeURL -}} - {{- $title := print .Title -}} - {{ if .IsHome }}{{ $title = .Site.Title }}{{ end }} + {{- if .IsHome }}{{ $title = .Site.Title }}{{ end -}} {{- $description := print .Params.Description -}} {{- if or .IsHome (eq .Params.Description "") (not .Params.Description) -}} @@ -11,7 +9,6 @@ {{- $author := print .Site.Author.name -}} {{- if .Params.author -}}{{ $author = .Params.author }}{{- end -}} - <!-- Basic meta elements --> <meta charset="utf-8"> @@ -22,20 +19,21 @@ <link rel="canonical" href="{{ .Permalink }}"> <title>{{ $title }}</title> + <meta name="description" content="{{ $description }}"> <!-- Dublin Core metadata for Zotero --> <meta property="dc:title" content="{{ $title }}"> <meta property="dc:creator" content="{{ $author }}"> <meta property="dc:identifier" content="{{ .Permalink }}"> - {{ if .Params.editor }}<meta property="dc:contributor" content="{{ .Params.editor }}">{{ end }} - {{ if .Params.pub_date }}<meta property="dc:date" content="{{ .Params.pub_date }}">{{ end }} - {{ if .Params.rights }}<meta property="dc:rights" content="{{ .Params.rights }}">{{ end }} + {{- if .Params.editor }}<meta property="dc:contributor" content="{{ .Params.editor }}">{{ end }} + {{- if .Params.pub_date }}<meta property="dc:date" content="{{ .Params.pub_date }}">{{ end }} + {{- if .Params.rights }}<meta property="dc:rights" content="{{ .Params.rights }}">{{ end }} <meta property="dc:source" content="{{ if .Params.source }}{{ .Params.source }}{{ else }}{{ .Site.Title }}{{ end }}"> <!-- Open Graph metadata --> <meta property="og:title" content="{{ $title }}"> <meta property="og:url" content="{{ .Permalink }}"> - <meta property="og:image" content="{{ $resource_url }}{{ "img/open-graph-logo.png" }}"> + <meta property="og:image" content="{{ .Site.BaseURL | safeURL }}{{ "img/open-graph-logo.png" }}"> <meta property="og:image:width" content="200"> <meta property="og:image:height" content="200"> {{- /* TODO: add fb:admins and fb:app_id */ -}} @@ -43,13 +41,12 @@ <!-- meta property="fb:app_id" content="" --> {{- /* TODO: add ability to render 'article' type */ -}} - <meta name="description" content="{{ $description }}"> <meta property="og:description" content="{{ .Site.Params.Description }}"> <meta property="og:type" content="website"> <!-- CSS link --> - {{ $sass := resources.Get "sass/style.scss" -}} - {{ $style := $sass | resources.ToCSS | resources.Minify | resources.Fingerprint -}} + {{- $sass := resources.Get "sass/style.scss" }} + {{- $style := $sass | resources.ToCSS | resources.Minify | resources.Fingerprint }} <link rel="stylesheet" href="{{ $style.RelPermalink }}"> <!-- Icons --> |
