mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 22:16:07 +01:00
Can't autogenerate shortlinks, as there are too many for byjp.fyi to handle! The file can't be larger than 64kb in the one file. Keep the process for manually shortlinked files — even if it's now a little complex!
6 lines
204 B
Text
6 lines
204 B
Text
{{- range .Site.RegularPages -}}
|
|
{{- $shortlink := partial "shortlink.txt" . -}}
|
|
{{- if and .Permalink $shortlink -}}
|
|
{{- printf "/%s %s 301\n" $shortlink .Permalink -}}
|
|
{{- end -}}
|
|
{{- end -}}
|