1
+ # Netlify redirects. See https://www.netlify.com/docs/redirects/
2
+ {{/* cSpell:ignore cond wordmark */ -}}
3
+
1
4
# 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
4
7
5
8
# Below version numbers are in the spec at the v0.1.0 tag.
6
9
Statement/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
9
12
SPDX/v1.0.0 https://github.com/in-toto/attestation/blob/v0.1.0/spec/predicates/spdx.md
10
13
11
14
# 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
14
17
Provenance/v0.1 https://github.com/in-toto/attestation/tree/v0.1.0/spec/predicates/provenance.md
15
18
Statement/v0.1.0 https://github.com/in-toto/attestation/tree/v0.1.0/spec#statement
16
19
@@ -37,3 +40,28 @@ attestation/test-result/v* https://github.com/in-toto/attestation/tree/main/spec
37
40
38
41
attestation/vulns https://github.com/in-toto/attestation/tree/main/spec/predicates/vuln.md
39
42
attestation/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