aboutsummaryrefslogtreecommitdiff
path: root/website
diff options
context:
space:
mode:
Diffstat (limited to 'website')
-rw-r--r--website/themes/beastie/layouts/partials/press.html9
1 files changed, 7 insertions, 2 deletions
diff --git a/website/themes/beastie/layouts/partials/press.html b/website/themes/beastie/layouts/partials/press.html
index 803072a1ba..ca0e3c1d16 100644
--- a/website/themes/beastie/layouts/partials/press.html
+++ b/website/themes/beastie/layouts/partials/press.html
@@ -1,7 +1,12 @@
{{ $pressPath := (printf "data/%s/press/press.toml" $.Language.Lang) }}
+{{ $translatedPressEnabled := false }}
+{{ if and (fileExists $pressPath) (ne $.Language.Lang "ja") }}
+ {{ $translatedPressEnabled = true }}
+{{ end }}
+
{{ $pressData := "" }}
-{{ if (fileExists $pressPath) -}}
+{{ if $translatedPressEnabled -}}
{{ $data := index .Site.Data $.Language.Lang }}
{{ $pressData = $data.press }}
{{ else }}
@@ -16,7 +21,7 @@
<p>
<span class="txtdate">{{ dateFormat "2006-01" .date }}</span>
<br />
- <a href="{{.Site.BaseURL | relLangURL }}press/#{{ dateFormat "2006-01" .date }}:{{ $pressCounter }}">{{ .name }}</a>
+ <a href="{{ if $translatedPressEnabled }}{{ .Site.BaseURL | relLangURL }}{{ else }}{{ $.Site.BaseURL }}{{ end }}press/#{{ dateFormat "2006-01" .date }}:{{ $pressCounter }}">{{ .name }}</a>
</p>
{{ end }}
{{ $pressCounter = add $pressCounter 1 }}