pidgin/nest
Clone
Summary
Browse
Changes
Graph
Merged in default (pull request #77)
2020-01-14, Gary Kramlich
e08b08092c40
Parents
055b3ec8eb12
b7209fe5d90d
Children
35aff5a82d24
3e7d5a714022
c8aa6a741400
a32765bd416d
Merged in default (pull request #77)
Fix replaces list to redirect to old.pidgin where needed
Approved-by: Gary Kramlich
1 files changed, 15 insertions(+), 2 deletions(-)
+15
-2
hugo/layouts/partials/replaces-list.html
--- a/hugo/layouts/partials/replaces-list.html Tue Jan 14 05:00:21 2020 +0000
+++ b/hugo/layouts/partials/replaces-list.html Tue Jan 14 06:40:52 2020 +0000
@@ -1,6 +1,19 @@
<ul>
{{ range .Params.replaces }}
- <li><a href="{{ . }}" rel="nofollow">{{ . }}</a></li>
- {{ end }}
+ <li>
+ <a href="https://{{- template "url-thing" . -}}" rel="nofollow">
+ {{ template "url-thing" . }}
+ </a>
+ </li>
+ {{ end }}
</ul>
+{{ define "url-thing" }}
+ {{- if (hasPrefix . "pidgin.im") -}}
+ old.{{.}}
+ {{- else if (hasPrefix . "developer.pidgin.im") -}}
+ {{ . }}
+ {{- else -}}
+ {{ . }}
+ {{- end -}}
+{{ end }}