Skip to content

Add azmsh.net/ch short URL for the Suggested Channels page - #29

Merged
Skordy merged 1 commit into
ArizonaMeshtasticCommunity:mainfrom
rancur:feature/short-url-ch-v2
Jul 26, 2026
Merged

Add azmsh.net/ch short URL for the Suggested Channels page#29
Skordy merged 1 commit into
ArizonaMeshtasticCommunity:mainfrom
rancur:feature/short-url-ch-v2

Conversation

@rancur

@rancur rancur commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

What this adds

A single new file, docs/ch/index.html, that makes azmsh.net/ch redirect to https://azmsh.net/docs/suggested_channels.html.

Why

The AZ Mesh G2 Base node auto-acknowledges incoming Meshtastic messages, and we'd like that acknowledgement to point people at the Suggested Channels page so newcomers can find the community channels on their own.

The catch is budget. Meshtastic text payloads are hard-capped at 237 UTF-8 bytes, and the auto-ack path rejects an over-length message rather than truncating it — so a link that doesn't fit doesn't just get cut short, the whole ack fails to send. Every character is a real constraint.

  • Full URL: https://azmsh.net/docs/suggested_channels.html46 characters, roughly a quarter of the usable message.
  • azmsh.net/ch12 characters.

That difference buys back room for actual words in the ack.

Alternatives considered

A third-party shortener (bit.ly and friends.) Counterintuitively this is longer — a bit.ly link runs ~14 characters, so it costs more bytes than the thing it's replacing. It also routes every click through a third party and logs it there. Keeping the redirect on azmsh.net is both smaller and keeps visitor data on our own infrastructure.

A Cloudflare redirect rule. This would mean flipping azmsh.net to proxied. That's a much bigger blast radius — TLS, caching, and every existing record — in exchange for a one-line redirect. Not a trade worth making here.

Implementation notes

It's raw HTML rather than a Markdown page on purpose. The offline plugin in mkdocs.yml disables directory URLs, so a ch.md would build to /ch.htmlazmsh.net/ch.html is 17 characters, which gives back most of what we're trying to save. MkDocs copies non-Markdown files out of docs/ verbatim, so this lands at /ch/index.html and GitHub Pages serves it for /ch (301 to /ch/).

The stub also includes:

  • rel=canonical pointing at the real Suggested Channels page.
  • noindex, follow so it doesn't compete with that page in search results.
  • A visible fallback link in the body, for anything that doesn't honour meta-refresh.
  • A relative link target (../docs/suggested_channels.html) rather than an absolute one, so it resolves correctly on fork/preview builds served from a sub-path as well as on azmsh.net.

There's a comment block in the file explaining the raw-HTML choice, so it doesn't look like an accident to whoever finds it next.

Risk

Additive and reversible. /ch, /c, and /channels all return 404 today, so there's no collision — re-verified against the live site immediately before opening this PR. Deleting docs/ch/ removes the feature entirely; nothing else changes.

Testing

Built locally with mkdocs build --strict (same command CI runs) — passes. Diffed the built site against a baseline build without this change: the only difference in the entire output tree is the new ch/ directory, and docs/suggested_channels.html is byte-identical. Served the build locally and confirmed the chain end to end: /ch → 301 → /ch/ → 200, meta-refresh target resolves to the Suggested Channels page (200, correct title). The stub does not appear in sitemap.xml.

One note on the branch

This branch is cut from the fork's main, which is currently a few commits behind upstream, because the token I have can't push branches carrying the workflow changes in between. The fork's main is a strict ancestor of upstream main, so the diff here is exactly the one new file and it merges cleanly — but wanted to flag it rather than have it look odd. Happy to re-cut from a synced main if you'd prefer.

Adds a meta-refresh redirect stub at /ch that points to
/docs/suggested_channels.html, so the page can be linked from
byte-constrained Meshtastic messages.

Raw HTML rather than a Markdown page because the `offline` plugin
disables directory URLs, so a ch.md would build to /ch.html (17 chars)
instead of /ch (12). MkDocs copies non-Markdown files through verbatim.

Includes rel=canonical to the real page and noindex so it does not
compete with it in search, plus a visible fallback link for clients
that do not honour meta-refresh.

Additive and reversible: deleting docs/ch/ removes it entirely.
@Skordy
Skordy merged commit f4b01e5 into ArizonaMeshtasticCommunity:main Jul 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants