From de312027cfe76146f81c48070bd6182f4b055e59 Mon Sep 17 00:00:00 2001 From: Santiago Torres-Arias Date: Fri, 6 Dec 2024 12:11:35 -0500 Subject: [PATCH 1/2] layouts: add redirect layout In order to support assets inside of other domains (e.g., our github pages), we need to add support for sending 301/302 replies. Add a layout that provides a redirect to the configured target. This uses a template such as: --- type: redirect target: location --- This is inspired by this blogpost: https://blog.builtwithcaffeine.cloud/posts/hugo-url-redirect/ Signed-off-by: Santiago Torres-Arias --- layouts/redirect/single.html | 1 + 1 file changed, 1 insertion(+) create mode 100644 layouts/redirect/single.html diff --git a/layouts/redirect/single.html b/layouts/redirect/single.html new file mode 100644 index 0000000..1537e67 --- /dev/null +++ b/layouts/redirect/single.html @@ -0,0 +1 @@ +{{- template "_internal/alias.html" (dict "Permalink" .Params.target) -}} From c7f40b36e419dfa0a55081ea449ec7d123f30698 Mon Sep 17 00:00:00 2001 From: Santiago Torres-Arias Date: Fri, 6 Dec 2024 12:13:05 -0500 Subject: [PATCH 2/2] content: add redirect to helm-charts Our helm-charts subproject requires a repository hosted on github pages (for simplicity). Add a redirect endpoint in in-toto.io to our github pages for helm-charts. Signed-off-by: Santiago Torres-Arias --- content/helm-charts.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 content/helm-charts.md diff --git a/content/helm-charts.md b/content/helm-charts.md new file mode 100644 index 0000000..42836f8 --- /dev/null +++ b/content/helm-charts.md @@ -0,0 +1,4 @@ +--- +type: redirect +target: https://in-toto.github.io/helm-charts +---