diff options
author | reuixiy <reuixiy@gmail.com> | 2022-10-10 19:37:16 +0300 |
---|---|---|
committer | reuixiy <reuixiy@gmail.com> | 2022-10-10 19:43:23 +0300 |
commit | c1db8a6aeda9a67228d018e8fbe2f7703dc363a8 (patch) | |
tree | 0fb696bea6e05404639a994614ab48f7e77b95be | |
parent | f46a288b8ae12a7eed823e1cec99f8de4f4f079a (diff) |
fix: duplicated lang path in post copyright link
Fixed #334
-rw-r--r-- | layouts/partials/components/post-copyright.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/layouts/partials/components/post-copyright.html b/layouts/partials/components/post-copyright.html index e6438e5..37feb9f 100644 --- a/layouts/partials/components/post-copyright.html +++ b/layouts/partials/components/post-copyright.html @@ -10,10 +10,10 @@ {{- end -}} </li> {{ if $.Params.original | default $.Site.Params.original }} - {{ $url := urls.Parse $.Permalink }} + {{ $url := urls.Parse $.RelPermalink }} {{ $decodedPath := $url.Path }} - {{ $baseURLWithLangFix := "" | absLangURL | strings.TrimSuffix "/" }} - {{ $decodedPermalink := (printf `%s%s` $baseURLWithLangFix $decodedPath) }} + {{ $baseURL := $.Site.BaseURL | strings.TrimSuffix "/" }} + {{ $decodedPermalink := (printf `%s%s` $baseURL $decodedPath) }} <li class="copyright-item link"><span class="copyright-item-text">{{ i18n "copyrightLink" }}</span>{{ i18n "colon" }}<a href="{{ $.RelPermalink }}" target="_blank" rel="noopener">{{ $decodedPermalink }}</a></li> {{ else }} {{ with $.Params.link }} |