Skip to content

Commit

Permalink
fix(post-copyright): missing colon when website param is not set
Browse files Browse the repository at this point in the history
See #116
  • Loading branch information
reuixiy committed Apr 16, 2020
1 parent af709a0 commit 86bfc77
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion layouts/partials/components/post-copyright.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
{{ $author := .Scratch.Get "author" }}
{{ with $author.name }}
<ul class="post-copyright">
<li class="copyright-item author">{{ with $author.website }}{{ printf `<span class="copyright-item-text">%s</span>%s<a href="%s" target="_blank" rel="noopener">%s</a>` (i18n "copyrightAuthor") (i18n "colon") . $author.name | safeHTML }}{{ else }}{{ printf `%s%s` (i18n "copyrightAuthor") $author.name }}{{ end }}</li>
<li class="copyright-item author">
{{- with $author.website -}}
{{ printf `<span class="copyright-item-text">%s</span>%s<a href="%s" target="_blank" rel="noopener">%s</a>` (i18n "copyrightAuthor") (i18n "colon") . $author.name | safeHTML }}
{{- else -}}
{{ printf `<span class="copyright-item-text">%s</span>%s%s` (i18n "copyrightAuthor") (i18n "colon") $author.name | safeHTML }}
{{- end -}}
</li>
{{ if $.Params.original | default $.Site.Params.original }}
{{ $url := urls.Parse $.Permalink }}
{{ $decodedPath := $url.Path }}
Expand Down

0 comments on commit 86bfc77

Please sign in to comment.