pidgin/nest

Merged in default (pull request #77)

20 months ago, Gary Kramlich
e08b08092c40
Merged in default (pull request #77)

Fix replaces list to redirect to old.pidgin where needed

Approved-by: Gary Kramlich
--- 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 }}