Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/reuixiy/hugo-theme-meme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/post-copyright.html')
-rw-r--r--layouts/partials/post-copyright.html12
1 files changed, 8 insertions, 4 deletions
diff --git a/layouts/partials/post-copyright.html b/layouts/partials/post-copyright.html
index 9ae2615..a66e17e 100644
--- a/layouts/partials/post-copyright.html
+++ b/layouts/partials/post-copyright.html
@@ -1,22 +1,26 @@
+{{- $Deliver := . -}}
{{ if and .Site.Params.enablePostCopyright (.Params.displayCopyright | default .Site.Params.displayPostCopyright) }}
{{ partial "components/author.html" . }}
{{ $author := .Scratch.Get "author" }}
{{ with $author.name }}
<ul class="post-copyright">
- <li class="copyright-item author">{{ with $author.website }}{{ printf `%s<a href="%s" target="_blank">%s</a>` (i18n "copyrightAuthor") . $author.name | safeHTML }}{{ else }}{{ printf `%s%s` (i18n "copyrightAuthor") $author.name }}{{ end }}</li>
+ <li class="copyright-item author">{{ with $author.website }}{{ printf `%s<a href="%s" target="_blank" rel="noopener">%s</a>` (i18n "copyrightAuthor") . $author.name | safeHTML }}{{ else }}{{ printf `%s%s` (i18n "copyrightAuthor") $author.name }}{{ end }}</li>
{{ if $.Params.original | default $.Site.Params.original }}
{{ $url := urls.Parse $.Permalink }}
{{ $decodedPath := $url.Path }}
{{ $baseURLWithLangFix := (strings.TrimSuffix "/" (print `/` | absLangURL)) }}
{{ $decodedPermalink := (printf `%s%s` $baseURLWithLangFix $decodedPath) }}
- <li class="copyright-item link">{{ printf `%s<a href="%s" target="_blank">%s</a>` (i18n "copyrightLink") $.RelPermalink $decodedPermalink | safeHTML }}</li>
+ <li class="copyright-item link">{{ printf `%s<a href="%s" target="_blank" rel="noopener">%s</a>` (i18n "copyrightLink") $.RelPermalink $decodedPermalink | safeHTML }}</li>
{{ else }}
{{ with $.Params.link }}
- <li class="copyright-item link">{{ printf `%s<a href="%s" target="_blank">%s</a>` (i18n "copyrightLink") . . | safeHTML }}</li>
+ <li class="copyright-item link">{{ printf `%s<a href="%s" target="_blank" rel="noopener">%s</a>` (i18n "copyrightLink") . . | safeHTML }}</li>
{{ end }}
{{ end }}
{{ with $author.copyright }}
- <li class="copyright-item license">{{ printf `%s%s` (i18n "copyrightLicense") (. | markdownify) | safeHTML }}</li>
+ {{- $raw := . -}}
+ {{- partial "components/markdownify.html" (dict "Deliver" $Deliver "raw" $raw) -}}
+ {{- $Content := $Deliver.Scratch.Get "Content" -}}
+ <li class="copyright-item license">{{ printf `%s%s` (i18n "copyrightLicense") $Content | safeHTML }}</li>
{{ end }}
</ul>
{{ end }}