aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/base-head.html
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2023-12-30 16:39:52 -0500
committertdro <tdro@noreply.example.com>2023-12-30 16:39:52 -0500
commit937d0e35700c85c7d683dd33a7f542442d8ec11c (patch)
treed9b071862fdd2b51b9d0f9fb864cfbf4fb5a0df6 /themes/default/layouts/partials/base-head.html
parent3b43bb9fbe661cb35201082fca9b0924da22bb03 (diff)
downloadcanory-937d0e35700c85c7d683dd33a7f542442d8ec11c.tar.gz
canory-937d0e35700c85c7d683dd33a7f542442d8ec11c.tar.bz2
canory-937d0e35700c85c7d683dd33a7f542442d8ec11c.zip
config: Simplify author site data
Diffstat (limited to 'themes/default/layouts/partials/base-head.html')
-rw-r--r--themes/default/layouts/partials/base-head.html27
1 files changed, 11 insertions, 16 deletions
diff --git a/themes/default/layouts/partials/base-head.html b/themes/default/layouts/partials/base-head.html
index 1fdfe4e..0fbeb3a 100644
--- a/themes/default/layouts/partials/base-head.html
+++ b/themes/default/layouts/partials/base-head.html
@@ -1,20 +1,15 @@
-{{-
- $authorData := (dict
- "Context" .
- "AuthorDefaultUser" .Site.Author.default.home
- )
--}}
-
-{{- $author := partial "function-authors-data.html" (dict "Data" $authorData) -}}
-
{{- $noindex := "" -}}
-{{- if or .Params.Feed .Params.Unlisted .Params.ExpiryDate -}}
+{{- $author := .Section -}}
+{{- $authors := partial "function-authors-data.html" . -}}
+{{- $image := print ("" | absURL) "/data/media/" $author "/" $author "-profile.png" -}}
+
+{{- with or .Params.Feed .Params.Unlisted .Params.ExpiryDate -}}
{{- $noindex = "noindex,nofollow" -}}
{{- end }}
<!-- HTML Meta Tags -->
<meta charset="utf-8" />
-<meta name="author" content="{{ $author.name -}}" />
+<meta name="author" content="{{ $authors.name -}}" />
<meta name="robots" content="{{ or $noindex .Site.Params.site.robots "index,follow" }}" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="keywords" content="{{- partial "base-title.html" . -}}" />
@@ -22,14 +17,14 @@
<!-- Search Engine Tags -->
<meta itemprop="name" content="{{ partial "base-title.html" . -}}" />
-<meta itemprop="description" content="{{ if .Params.summary }}{{ .Params.summary }}{{ else }}{{ .Summary }}{{ end }}" />
-<meta itemprop="image" content="{{ .Site.BaseURL }}/{{ $author.user -}}/media/profile/picture.png" />
+<meta itemprop="description" content="{{- partial "base-description.html" . -}}" />
+<meta itemprop="image" content="{{ $image }}" />
<!-- Open Graph Meta Tags -->
<meta property="og:title" content="{{ partial "base-title.html" . -}}" />
<meta property="og:description" content="{{- partial "base-description.html" . -}}" />
<meta property="og:url" content="{{ .Permalink }}" />
-<meta property="og:image" content="{{ .Site.BaseURL }}/{{ $author.user -}}/media/profile/picture.png" />
+<meta property="og:image" content="{{ $image }}" />
<meta property="og:type" content="website" />
<meta property="article:published_time" content="{{ (or .Params.PublishDate now.UTC) | time.Format "2006-01-02T15:04:05Z" }}" />
<meta property="article:modified_time " content="{{ (or .Params.LastMod now.UTC) | time.Format "2006-01-02T15:04:05Z" }}" />
@@ -38,14 +33,14 @@
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="{{ partial "base-title.html" . -}}" />
<meta name="twitter:description" content="{{- partial "base-description.html" . -}}" />
-<meta name="twitter:image" content="{{ .Site.BaseURL }}/{{ $author.user -}}/media/profile/picture.png" />
+<meta name="twitter:image" content="{{ $image }}" />
<!-- Extra Meta Tags -->
<meta name='base-url' content="{{ "" | absURL }}" />
<meta name='last-modified' content="{{ now.UTC.Format "Mon, 02 Jan 2006 15:04:05 GMT" }}" />
<!-- Link Tags -->
-<link rel="home" href="{{ .Site.BaseURL }}/{{ $author.user }}/" />
+<link rel="home" href="{{ "" | absURL }}/{{ $authors.user }}/" />
<!-- Search Verification -->
{{- partial "base-search.html" . -}}