use .Param for author field

This commit is contained in:
Aniket Teredesai 2023-05-07 15:41:11 +05:30
parent 9726b8d806
commit 40f42481d9
4 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@
{{ .Date.Format "2006-01-02" }} ::
</time>
{{ end }}
{{ with .Params.Author }}
{{ with $.Param "author" }}
<span class="post-author">{{ . }}</span>
{{ end }}
</div>

View File

@ -16,7 +16,7 @@
{{ .Date.Format "2006-01-02" }} ::
</time>
{{ end }}
{{ with .Params.Author }}
{{ with $.Param "author" }}
<span class="post-author">{{ . }}</span>
{{ end }}
</div>

View File

@ -12,7 +12,7 @@
{{ end }}
</time>
{{ end }}
{{ with .Params.Author }}
{{ with $.Param "author" }}
<span class="post-author">{{ . }}</span>
{{ end }}
{{ if and (.Param "readingTime") (eq (.Param "readingTime") true) }}

View File

@ -48,7 +48,7 @@
{{ if (isset $.Site.Params.Twitter "site") }}
<meta name="twitter:site" content="{{ $.Site.Params.Twitter.site }}" />
{{ end }}
<meta name="twitter:creator" content="{{ if .IsHome }}{{ $.Site.Params.Twitter.creator }}{{ else if isset .Params "authortwitter" }}{{ .Params.authorTwitter }}{{ else }}{{ .Params.Author }}{{ end }}" />
<meta name="twitter:creator" content="{{ if .IsHome }}{{ $.Site.Params.Twitter.creator }}{{ else if isset .Params "authortwitter" }}{{ .Params.authorTwitter }}{{ else }}{{ $.Param "author" }}{{ end }}" />
{{ end }}
<!-- OG data -->