From b8fb01706bda5f0182f07543afc01785c9163e26 Mon Sep 17 00:00:00 2001 From: patrickryan01 Date: Fri, 4 Dec 2026 16:17:26 -0500 Subject: [PATCH] fix(site): i gave the chart repository addresses a page, because release notes link to hotloop.io/hotloop and it answered 404 hotloop.io/hotloop/ is the Helm repository root, and a browser got a 404 there. It now shows the helm repo add command for HotLoop, Flow, Cascade and for CODESYS, and helm still reads index.yaml and the chart files under it. The pages stay out of the sitemap. The old release notes are untouched. Checked in the built image with serve-check: 755 passed, 0 failed, with the new check for the four pages. --- docker/nginx.conf | 7 +++++ scripts/serve-check.sh | 7 +++++ scripts/sitemap-exclude.mjs | 2 +- src/components/ChartRepo.astro | 47 +++++++++++++++++++++++++++++++++ src/pages/hotloop-cascade.astro | 5 ++++ src/pages/hotloop-codesys.astro | 5 ++++ src/pages/hotloop-flow.astro | 5 ++++ src/pages/hotloop.astro | 5 ++++ 8 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 src/components/ChartRepo.astro create mode 100644 src/pages/hotloop-cascade.astro create mode 100644 src/pages/hotloop-codesys.astro create mode 100644 src/pages/hotloop-flow.astro create mode 100644 src/pages/hotloop.astro diff --git a/docker/nginx.conf b/docker/nginx.conf index 02d6b836..ab9ca9d4 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -91,6 +91,13 @@ server { return 301 /$1/; } + # The bare address of a chart repository is a page for people (the add command); helm reads index.yaml and the chart files + # under it, which the next block proxies. Regex locations match in file order, so this one sits first. + location ~ ^/(hotloop|hotloop-flow|hotloop-cascade|hotloop-codesys)/$ { + include /etc/nginx/security-headers.conf; + try_files /$1/index.html =404; + } + location ~ ^/(?hotloop|hotloop-flow|hotloop-cascade|hotloop-codesys|hotloop-transmitter)/(?.*)$ { set $chart_host hotloop-io.github.io; proxy_pass https://$chart_host/$chart_repo/$chart_rest$is_args$args; diff --git a/scripts/serve-check.sh b/scripts/serve-check.sh index 65fd6cc4..6f51d328 100755 --- a/scripts/serve-check.sh +++ b/scripts/serve-check.sh @@ -63,6 +63,13 @@ if [ -n "${WWW_BASE:-}" ]; then [ "$code" = 301 ] && [ "$loc" = "https://hotloop.io/releases/core/?a=b" ] && ok || bad "www forward: $code $loc" fi +# 4b. a chart repository's bare address is a page for people, with the add command (helm reads index.yaml under it) +for r in hotloop hotloop-flow hotloop-cascade hotloop-codesys; do + code=$(c -o /tmp/serve-check-repo.$$ -w '%{http_code}' "$@" "$base/$r/") + [ "$code" = 200 ] && grep -q "helm repo add $r https://hotloop.io/$r" /tmp/serve-check-repo.$$ && ok || bad "/$r/ -> $code (want the chart repository page)" +done +rm -f /tmp/serve-check-repo.$$ + # 5. an unknown path is a real 404 with the branded page code=$(c -o /tmp/serve-check-404.$$ -w '%{http_code}' "$@" "$base/no-such-page-$$/") [ "$code" = 404 ] && grep -q 'Page not found' /tmp/serve-check-404.$$ && ok || bad "unknown path -> $code" diff --git a/scripts/sitemap-exclude.mjs b/scripts/sitemap-exclude.mjs index 8d902387..1ff0fe4a 100644 --- a/scripts/sitemap-exclude.mjs +++ b/scripts/sitemap-exclude.mjs @@ -1,7 +1,7 @@ // Pages that answer 200 but do not belong in the sitemap: the 404 page and the legal // boilerplate. The sitemap lists only the pages we want found. Shared by the build and // by seo-audit, so the audit and the sitemap can never disagree. -export const NOT_IN_SITEMAP = /\/(404|privacy|terms|license)\/?$/; +export const NOT_IN_SITEMAP = /\/(404|privacy|terms|license|hotloop|hotloop-flow|hotloop-cascade|hotloop-codesys)\/?$/; // Search Console reads a new domain's crawl budget out on translated copies before the English pages. Until // the English pages are indexed the sitemap lists only them. When they are, set this to true and the thirteen diff --git a/src/components/ChartRepo.astro b/src/components/ChartRepo.astro new file mode 100644 index 00000000..17e248be --- /dev/null +++ b/src/components/ChartRepo.astro @@ -0,0 +1,47 @@ +--- +// The page a person lands on at a Helm chart repository's address (hotloop.io/hotloop/ and its siblings). The address itself +// answers as a Helm repository (nginx proxies index.yaml and the chart files there), and a browser pointed at the bare address +// used to get a 404. This page answers that one address for people, with the command that adds the repository. +// It is out of the sitemap: the address is for helm, and the product pages are what search should find. +import Base from '../layouts/Base.astro'; + +interface Props { + repo: string; + product: string; + productHref: string; + charts: string[]; +} +const { repo, product, productHref, charts } = Astro.props; +const url = `https://hotloop.io/${repo}`; +--- + + +
+ Helm repository +

{product} charts, one command away

+

This address is the {product} Helm repository. Add it once, and every release is a chart you can install.

+
helm repo add {repo} {url}
+helm repo update
+helm install {charts[0]} {repo}/{charts[0]}
+ {charts.length > 1 && ( + <> +

Charts in this repository

+
    {charts.map((c) =>
  • {c}
  • )}
+ + )} + +
+ + + diff --git a/src/pages/hotloop-cascade.astro b/src/pages/hotloop-cascade.astro new file mode 100644 index 00000000..71af0a91 --- /dev/null +++ b/src/pages/hotloop-cascade.astro @@ -0,0 +1,5 @@ +--- +import ChartRepo from '../components/ChartRepo.astro'; +--- + + diff --git a/src/pages/hotloop-codesys.astro b/src/pages/hotloop-codesys.astro new file mode 100644 index 00000000..c24557c5 --- /dev/null +++ b/src/pages/hotloop-codesys.astro @@ -0,0 +1,5 @@ +--- +import ChartRepo from '../components/ChartRepo.astro'; +--- + + diff --git a/src/pages/hotloop-flow.astro b/src/pages/hotloop-flow.astro new file mode 100644 index 00000000..bc6c4279 --- /dev/null +++ b/src/pages/hotloop-flow.astro @@ -0,0 +1,5 @@ +--- +import ChartRepo from '../components/ChartRepo.astro'; +--- + + diff --git a/src/pages/hotloop.astro b/src/pages/hotloop.astro new file mode 100644 index 00000000..f9d7f216 --- /dev/null +++ b/src/pages/hotloop.astro @@ -0,0 +1,5 @@ +--- +import ChartRepo from '../components/ChartRepo.astro'; +--- + +