aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/head.html
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-06-15 22:40:02 -0400
committertdro <tdro@noreply.example.com>2022-06-15 22:40:02 -0400
commitb03fbdca3b70587cb46b28aadd30d42fe0b29f50 (patch)
tree8d174422cb47356e8c92c9ac4964eba2cebbfa58 /themes/default/layouts/partials/head.html
parent9cba41a32db4a059e46ea4daf217d0c8f41b9791 (diff)
downloadcanory-b03fbdca3b70587cb46b28aadd30d42fe0b29f50.tar.gz
canory-b03fbdca3b70587cb46b28aadd30d42fe0b29f50.tar.bz2
canory-b03fbdca3b70587cb46b28aadd30d42fe0b29f50.zip
themes/default/layouts/partials/head: Try variable context
Try explicit inputs on default templates. Header links properly reflects home configuration now. Initial experiment for showing follow list.
Diffstat (limited to 'themes/default/layouts/partials/head.html')
-rw-r--r--themes/default/layouts/partials/head.html18
1 files changed, 11 insertions, 7 deletions
diff --git a/themes/default/layouts/partials/head.html b/themes/default/layouts/partials/head.html
index 33c1a6a..8eb9435 100644
--- a/themes/default/layouts/partials/head.html
+++ b/themes/default/layouts/partials/head.html
@@ -1,6 +1,12 @@
+{{- $data :=
+ (dict
+ "Author" (index .Site.Data.authors ((or .Params.author .Site.Author.default.home) | default "default"))
+ )
+-}}
+
<!-- HTML Meta Tags -->
<meta charset="utf-8">
-<meta name="author" content="{{ partial "author-name.html" . -}}">
+<meta name="author" content="{{ partial "author-name.html" (dict "Data" $data) -}}">
{{ if or .Params.Unlisted .Params.ExpiryDate -}}
<meta name="robots" content="noindex,nofollow">
{{- else -}}
@@ -16,13 +22,13 @@
<!-- Search Engine Tags -->
<meta itemprop="name" content="{{ partial "site-title.html" . -}}">
<meta itemprop="description" content="{{ if .Params.summary }}{{ .Params.summary }}{{ else }}{{ .Summary }}{{ end }}">
-<meta itemprop="image" content="{{ .Site.BaseURL }}/{{ partial "author-media-path.html" . }}/profile/picture.png">
+<meta itemprop="image" content="{{ .Site.BaseURL }}/{{ partial "author-user.html" (dict "Data" $data) -}}/media/profile/picture.png">
<!-- Open Graph Meta Tags -->
<meta property="og:title" content="{{ partial "site-title.html" . -}}">
<meta property="og:description" content="{{- partial "site-description.html" . -}}">
<meta property="og:url" content="{{ .Permalink }}">
-<meta property="og:image" content="{{ .Site.BaseURL }}/{{ partial "author-media-path.html" . }}/profile/picture.png">
+<meta property="og:image" content="{{ .Site.BaseURL }}/{{ partial "author-user.html" (dict "Data" $data) -}}/media/profile/picture.png">
<meta property="og:type" content="website">
<meta property="article:published_time" content="{{ .Params.PublishDate }}">
<meta property="article:modified_time " content="{{ .Params.LastMod }}">
@@ -31,15 +37,13 @@
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="{{ partial "site-title.html" . -}}">
<meta name="twitter:description" content="{{- partial "site-description.html" . -}}">
-<meta name="twitter:image" content="{{ .Site.BaseURL }}/{{ partial "author-media-path.html" . }}/profile/picture.png">
+<meta name="twitter:image" content="{{ .Site.BaseURL }}/{{ partial "author-user.html" (dict "Data" $data) -}}/media/profile/picture.png">
<!-- Search Verification -->
{{- partial "head-search.html" . -}}
<!-- Link Tags -->
-{{- range first 1 (where .Site.Pages "Params.Author" .Site.Author.default.home) -}}
-<link rel="home" href="{{ .Site.BaseURL }}/{{ partial "author-user.html" . }}">
-{{- end }}
+<link rel="home" href="{{ .Site.BaseURL }}/{{ partial "author-user.html" (dict "Data" $data) }}">
<!-- Style Sheets & Scripts -->
{{- $index := resources.Get "js/index.js" -}}