diff options
author | Zhenlei Huang <zlei@FreeBSD.org> | 2022-11-02 15:48:35 +0000 |
---|---|---|
committer | Sergio Carlavilla Delgado <carlavilla@FreeBSD.org> | 2022-11-02 15:48:35 +0000 |
commit | 0854172b37a3a82e45b25c5496055544fba7d461 (patch) | |
tree | feb68f6b7a6632b41b15e5380fa317663b81aeaa /documentation | |
parent | d102df7b721c74b82720164dafa772931d179d62 (diff) | |
download | doc-0854172b37a3a82e45b25c5496055544fba7d461.tar.gz doc-0854172b37a3a82e45b25c5496055544fba7d461.zip |
Fix download link for non-English languages
Approved by: carlavilla@
Differential Revision: https://reviews.freebsd.org/D37144
Diffstat (limited to 'documentation')
-rw-r--r-- | documentation/themes/beastie/layouts/index.html | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/documentation/themes/beastie/layouts/index.html b/documentation/themes/beastie/layouts/index.html index 6ee1b26a3b..15881d7d08 100644 --- a/documentation/themes/beastie/layouts/index.html +++ b/documentation/themes/beastie/layouts/index.html @@ -1,9 +1,11 @@ {{ define "main" }} - {{ $language := "" }} - {{ $currentLang := $.Site.Language.Lang }} + {{ $downloadurl := "" }} + {{ $language := $.Site.Language.Lang }} - {{ if ne $currentLang "en" }} - {{ $language = $currentLang }} + {{ if ne $language "en" }} + {{ $downloadurl = printf "%s/%s/%s/" $.Site.Params.websiteURL $language "where" }} + {{ else }} + {{ $downloadurl = printf "%s/%s/" $.Site.Params.websiteURL "where" }} {{ end }} <main class="main-wrapper"> {{ partial "global-search.html" . }} @@ -15,7 +17,7 @@ </a> </div> <div class="card"> - <a href={{ printf "%s%s/%s" $.Site.Params.websiteURL $language "where" }}> + <a href={{ $downloadurl }}> <h5>{{ i18n "download" }}</h5> <p>{{ i18n "download-freebsd" }}</p> </a> |