#1028 Author not displayed on demo site

Added Author displaying part of code in opengraphs provider and base.html
This commit is contained in:
Achintya Choudhari 2024-07-16 23:06:02 +05:30
parent fddab05362
commit 07e3da5008
2 changed files with 9 additions and 2 deletions

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"livePreview.defaultPreviewPath": "/layouts/_default/archives.html"
}

View File

@ -33,11 +33,15 @@
{{- end -}} {{- end -}}
{{- else -}} {{- else -}}
{{- if not .Site.Lastmod.IsZero -}} {{- if not .Site.Lastmod.IsZero -}}
<meta property='og:updated_time' content='{{ .Site.Lastmod.Format " 2006-01-02T15:04:05-07:00 " | safeHTML }}'/> <meta property='og:updated_time' content='{{ .Site.Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}'/>
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{ $image := partialCached "helper/image" (dict "Context" . "Type" "opengraph") .RelPermalink "opengraph" }} {{ $image := partialCached "helper/image" (dict "Context" . "Type" "opengraph") .RelPermalink "opengraph" }}
{{- if $image.exists -}} {{- if $image.exists -}}
<meta property='og:image' content='{{ absURL $image.permalink }}' /> <meta property='og:image' content='{{ absURL $image.permalink }}' />
{{- end -}} {{- end -}}
{{- range .Param "authors" -}}
<meta property='article:author' content='{{ . }}' />
{{- end -}}