pidgin/nest

Parents d403cd1e2e3a
Children e08b08092c40
Fix replaces list to redirect to old.pidgni where needed
--- a/hugo/layouts/partials/replaces-list.html Mon Jan 13 22:51:57 2020 -0600
+++ b/hugo/layouts/partials/replaces-list.html Tue Jan 14 05:24:57 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 }}