1+ # Netlify redirects. See https://www.netlify.com/docs/redirects/
2+ {{/* cSpell:ignore cond wordmark */ -}}
3+
14# No versions mentioned in the spec so assume v0.1
2- Envelope/v0.1 https://github.com/in-toto/attestation/tree/v0.1.0/spec#envelope
3- Predicate/v0.1 https://github.com/in-toto/attestation/tree/v0.1.0/spec#predicate
5+ Envelope/v0.1 https://github.com/in-toto/attestation/tree/v0.1.0/spec#envelope
6+ Predicate/v0.1 https://github.com/in-toto/attestation/tree/v0.1.0/spec#predicate
47
58# Below version numbers are in the spec at the v0.1.0 tag.
69Statement/v0.1 https://github.com/in-toto/attestation/tree/v0.1.0/spec#statement
@@ -9,8 +12,8 @@ Provenance/v0.1.0 https://github.com/in-toto/attestation/tree/v0.1.0/spec/predic
912SPDX/v1.0.0 https://github.com/in-toto/attestation/blob/v0.1.0/spec/predicates/spdx.md
1013
1114# Bonus: v0.1.0 <-> v0.1
12- Envelope/v0.1.0 https://github.com/in-toto/attestation/tree/v0.1.0/spec#envelope
13- Predicate/v0.1.0 https://github.com/in-toto/attestation/tree/v0.1.0/spec#predicate
15+ Envelope/v0.1.0 https://github.com/in-toto/attestation/tree/v0.1.0/spec#envelope
16+ Predicate/v0.1.0 https://github.com/in-toto/attestation/tree/v0.1.0/spec#predicate
1417Provenance/v0.1 https://github.com/in-toto/attestation/tree/v0.1.0/spec/predicates/provenance.md
1518Statement/v0.1.0 https://github.com/in-toto/attestation/tree/v0.1.0/spec#statement
1619
@@ -37,3 +40,28 @@ attestation/test-result/v* https://github.com/in-toto/attestation/tree/main/spec
3740
3841attestation/vulns https://github.com/in-toto/attestation/tree/main/spec/predicates/vuln.md
3942attestation/vulns/v* https://github.com/in-toto/attestation/tree/main/spec/predicates/vuln.md
43+
44+ {{ range $p := .Site.Pages -}}
45+
46+ {{ range $p.Aliases -}}
47+ {{ $alias := cond (strings.HasPrefix . "/")
48+ .
49+ (partial "relative-redirects-alias" (dict "alias" . "p" $p.Parent)) -}}
50+ {{ $alias | printf "%-35s" }} {{ $p.RelPermalink }}
51+ {{ end -}}
52+
53+ {{ end }}{{/* range $p */ -}}
54+
55+ {{- define "partials/relative-redirects-alias" -}}
56+ {{ $result := "" }}
57+ {{ if strings.HasPrefix .alias "../" }}
58+ {{ $result = (partial "relative-redirects-alias"
59+ (dict
60+ "alias" (strings.TrimPrefix "../" .alias)
61+ "p" .p.Parent ))
62+ }}
63+ {{ else }}
64+ {{ $result = path.Join .p.RelPermalink .alias }}
65+ {{ end }}
66+ {{ return $result }}
67+ {{ end }}
0 commit comments