git: bdb3189d38 - main - Fix broken links to event items on translated top page. If there is no translated event entry, these links should be to the original English entry.
Ryusuke SUZUKI
ryusuke at FreeBSD.org
Sun Feb 21 03:13:42 UTC 2021
The branch main has been updated by ryusuke:
URL: https://cgit.FreeBSD.org/doc/commit/?id=bdb3189d381db12d99cc3a653b7c5c0a009f22f7
commit bdb3189d381db12d99cc3a653b7c5c0a009f22f7
Author: Ryusuke SUZUKI <ryusuke at FreeBSD.org>
AuthorDate: 2021-02-21 03:12:55 +0000
Commit: Ryusuke SUZUKI <ryusuke at FreeBSD.org>
CommitDate: 2021-02-21 03:12:55 +0000
Fix broken links to event items on translated top page.
If there is no translated event entry, these links should be to
the original English entry.
---
website/themes/beastie/layouts/partials/events.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/website/themes/beastie/layouts/partials/events.html b/website/themes/beastie/layouts/partials/events.html
index f85df0d00b..0852e870cc 100644
--- a/website/themes/beastie/layouts/partials/events.html
+++ b/website/themes/beastie/layouts/partials/events.html
@@ -18,7 +18,7 @@
<p>
<span class="txtdate">{{ dateFormat "2006-01-02" .startDate }} - {{ dateFormat "2006-01-02" .endDate }}</span>
<br />
- <a href="{{.Site.BaseURL | relLangURL }}events/#{{ dateFormat "2006-01" .endDate }}:{{ $eventsCounter }}">
+ <a href="{{ if (fileExists $eventsPath) -}}{{ .Site.BaseURL | relLangURL }}{{ else }}{{ $.Site.BaseURL }}{{- end }}events/#{{ dateFormat "2006-01" .endDate }}:{{ $eventsCounter }}">
{{ .name }}
<br />
{{ if or (.city) (.country) }}({{end}}{{ if .city }}{{ .city }},{{ end }} {{ if .country }}{{ .country }}{{ end }}{{ if or (.city) (.country) }}){{end}}
More information about the dev-commits-doc-all
mailing list