Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docker/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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 ~ ^/(?<chart_repo>hotloop|hotloop-flow|hotloop-cascade|hotloop-codesys|hotloop-transmitter)/(?<chart_rest>.*)$ {
set $chart_host hotloop-io.github.io;
proxy_pass https://$chart_host/$chart_repo/$chart_rest$is_args$args;
Expand Down
7 changes: 7 additions & 0 deletions scripts/serve-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion scripts/sitemap-exclude.mjs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
47 changes: 47 additions & 0 deletions src/components/ChartRepo.astro
Original file line number Diff line number Diff line change
@@ -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}`;
---

<Base
title={`${product} Helm repository`}
description={`Add the ${product} Helm repository and install the chart with one command. Charts are versioned with each release and update themselves.`}
ogImage="/og/home.png"
ogAlt={`${product} Helm repository`}
>
<section class="wrap stack repo">
<span class="label">Helm repository</span>
<h1>{product} charts, one command away</h1>
<p class="lede">This address is the {product} Helm repository. Add it once, and every release is a chart you can install.</p>
<pre><code>helm repo add {repo} {url}
helm repo update
helm install {charts[0]} {repo}/{charts[0]}</code></pre>
{charts.length > 1 && (
<>
<h2>Charts in this repository</h2>
<ul>{charts.map((c) => <li><code>{c}</code></li>)}</ul>
</>
)}
<div class="cluster">
<a class="btn primary" href={productHref}>See {product}</a>
<a class="btn" href="/releases/">Release notes</a>
</div>
</section>
</Base>

<style>
.repo { padding-block: clamp(var(--hl-s7), 7vw, var(--hl-s9)); max-width: 860px; }
pre { overflow-x: auto; }
</style>
5 changes: 5 additions & 0 deletions src/pages/hotloop-cascade.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
import ChartRepo from '../components/ChartRepo.astro';
---

<ChartRepo repo="hotloop-cascade" product="HotLoop Cascade" productHref="/cascade/" charts={['hotloop-cascade']} />
5 changes: 5 additions & 0 deletions src/pages/hotloop-codesys.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
import ChartRepo from '../components/ChartRepo.astro';
---

<ChartRepo repo="hotloop-codesys" product="HotLoop for CODESYS" productHref="/codesys/" charts={['hotloop-codesys']} />
5 changes: 5 additions & 0 deletions src/pages/hotloop-flow.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
import ChartRepo from '../components/ChartRepo.astro';
---

<ChartRepo repo="hotloop-flow" product="HotLoop Flow" productHref="/flow/" charts={['hotloop-flow']} />
5 changes: 5 additions & 0 deletions src/pages/hotloop.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
import ChartRepo from '../components/ChartRepo.astro';
---

<ChartRepo repo="hotloop" product="HotLoop" productHref="/products/" charts={['hotloop-iot', 'hotloop-edge', 'hotloop-edge-relay', 'hotloop']} />