|
2 | 2 | base = "docs/book"
|
3 | 3 | command = "./install-and-build.sh"
|
4 | 4 | publish = "docs/book/book"
|
| 5 | + functions = "docs/book/functions" |
5 | 6 |
|
| 7 | +# TODO(directxman12): I don't know why, but this (functions) stanza is in the |
| 8 | +# docs and local `netlify dev`, but the above one (under build) is used by the |
| 9 | +# online version :-/ |
| 10 | + |
| 11 | +# used to handle the split between v2 and v3+ download links |
| 12 | +[functions] |
| 13 | + # relative to base directory |
| 14 | + directory = "functions" |
6 | 15 |
|
7 | 16 | # Standard Netlify redirects
|
8 | 17 | [[redirects]]
|
|
63 | 72 | status = 302
|
64 | 73 | force = true
|
65 | 74 |
|
66 |
| -# v1 redirects. |
67 |
| -[[redirects]] |
68 |
| - from = "https://go.kubebuilder.io/releases/1.:minorpatch/:os/:arch" |
69 |
| - to = "https://github.com/kubernetes-sigs/kubebuilder/releases/download/v1.:minorpatch/kubebuilder_1.:minorpatch_:os_:arch.tar.gz" |
70 |
| - status = 302 |
71 |
| - force = true |
72 |
| - |
73 |
| -# v2 redirects. |
74 |
| -[[redirects]] |
75 |
| - from = "https://go.kubebuilder.io/releases/2.:minorpatch/:os/:arch" |
76 |
| - to = "https://github.com/kubernetes-sigs/kubebuilder/releases/download/v2.:minorpatch/kubebuilder_2.:minorpatch_:os_:arch.tar.gz" |
77 |
| - status = 302 |
78 |
| - force = true |
79 |
| - |
80 |
| -# v3+ redirects. |
| 75 | +# general release redirects |
81 | 76 | [[redirects]]
|
82 | 77 | from = "https://go.kubebuilder.io/releases/:version"
|
83 | 78 | to = "https://github.com/kubernetes-sigs/kubebuilder/releases/v:version"
|
|
90 | 85 | status = 302
|
91 | 86 | force = true
|
92 | 87 |
|
| 88 | +# release download redirect |
93 | 89 | [[redirects]]
|
94 | 90 | from = "https://go.kubebuilder.io/releases/:version/:os/:arch"
|
95 |
| - to = "https://github.com/kubernetes-sigs/kubebuilder/releases/download/v:version/kubebuilder_:os_:arch" |
96 |
| - status = 302 |
| 91 | + # I don't quite know why, but netlify (or at least the dev mode) *insists* |
| 92 | + # on eating every other query parameter, so just use paths instead |
| 93 | + to = "/.netlify/functions/handle-version/:version/:os/:arch" |
| 94 | + # 200 --> don't redirect to the the function then to whereever it says, |
| 95 | + # just pretend like the function is mounted directly here |
| 96 | + status = 200 |
97 | 97 | force = true
|
98 | 98 |
|
99 | 99 | # Tools redirects.
|
|
0 commit comments