Publish to a subfolder route via external_web (tangonexus.com/nexus) #2

Merged
forgejo-admin merged 3 commits from external-web-publish into main 2026-07-31 17:34:33 +00:00

What

Makes this module publishable to a subfolder of a domain celilo does not govern — a cPanel host that owns its own domain, DNS and TLS — via the new external_web capability, while still working with public_web (Caddy) unchanged.

Two commits:

5d49260 — deployment configs for external_web (was sitting unpushed on local main)

  • on_install.ts takes capabilities.external_web ?? capabilities.public_web; both declared optional
  • route config var, default /nexus, passed as publishStaticSite({ path: route, ... })
  • astro.config.mjs reads base from process.env.CELILO_ROUTE; build.command exports CELILO_ROUTE=/nexus
  • dropped the dns_registrar requirement — the host owns DNS
  • health_check.ts fetches the page and the first asset the served HTML references
  • manifest → 0.2.0

7434a52 — favicon base-path fix + dep bump

The bug the second commit fixes

The route is a build-time constant. Astro rewrites the asset URLs it can see — bundled JS, url() in CSS, the @font-face files — but not a hand-written href. BaseLayout.astro had a root-absolute href="/favicon.svg", which on tangonexus.com/nexus resolves to the host's document root, i.e. the WordPress next door, not us.

Built both ways to confirm:

CELILO_ROUTE=/nexus  ->  href="/nexus/favicon.svg"   src="/nexus/_astro/HeroMark...js"
(default)            ->  href="/favicon.svg"          src="/_astro/HeroMark...js"

The health check would not have caught this. firstAssetUrl matches only .js/.css/.mjs, so it picks the bundled script — correctly prefixed — and passes. Worth knowing the check has that blind spot; a fully-correct page and a page with a broken favicon look identical to it.

Also repoints the hook deps at @celilo/capabilities ^0.9.0 — the release that actually carries external_web — replacing a hand-assembled 0.8.0 tree (from before 0.8.0 existed on npm) with a real bun install.

Verification

  • celilo-module tests 6/6
  • Both builds inspected for emitted asset URLs (above)
  • Live smoke against tangonexus.com/nexus follows once the provider is onboarded

Not included

src/pages/play.astro has unrelated in-progress print-export work in the working tree; deliberately left out of this branch.

🤖 Generated with Claude Code

## What Makes this module publishable to a subfolder of a domain celilo does **not** govern — a cPanel host that owns its own domain, DNS and TLS — via the new `external_web` capability, while still working with `public_web` (Caddy) unchanged. Two commits: **`5d49260` — deployment configs for external_web** (was sitting unpushed on local `main`) - `on_install.ts` takes `capabilities.external_web ?? capabilities.public_web`; both declared `optional` - `route` config var, default `/nexus`, passed as `publishStaticSite({ path: route, ... })` - `astro.config.mjs` reads `base` from `process.env.CELILO_ROUTE`; `build.command` exports `CELILO_ROUTE=/nexus` - dropped the `dns_registrar` requirement — the host owns DNS - `health_check.ts` fetches the page *and* the first asset the served HTML references - manifest → `0.2.0` **`7434a52` — favicon base-path fix + dep bump** ## The bug the second commit fixes The route is a **build-time** constant. Astro rewrites the asset URLs it can see — bundled JS, `url()` in CSS, the `@font-face` files — but not a hand-written `href`. `BaseLayout.astro` had a root-absolute `href="/favicon.svg"`, which on `tangonexus.com/nexus` resolves to the *host's* document root, i.e. the WordPress next door, not us. Built both ways to confirm: ``` CELILO_ROUTE=/nexus -> href="/nexus/favicon.svg" src="/nexus/_astro/HeroMark...js" (default) -> href="/favicon.svg" src="/_astro/HeroMark...js" ``` **The health check would not have caught this.** `firstAssetUrl` matches only `.js`/`.css`/`.mjs`, so it picks the bundled script — correctly prefixed — and passes. Worth knowing the check has that blind spot; a fully-correct page and a page with a broken favicon look identical to it. Also repoints the hook deps at `@celilo/capabilities` `^0.9.0` — the release that actually carries `external_web` — replacing a hand-assembled `0.8.0` tree (from before 0.8.0 existed on npm) with a real `bun install`. ## Verification - `celilo-module` tests 6/6 - Both builds inspected for emitted asset URLs (above) - Live smoke against `tangonexus.com/nexus` follows once the provider is onboarded ## Not included `src/pages/play.astro` has unrelated in-progress print-export work in the working tree; deliberately left out of this branch. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The site publishes into a subfolder of a domain celilo does not govern
(tangonexus.com/nexus, alongside the host's WordPress). Astro rewrites the
asset URLs it can see — bundled JS, url() in CSS, the @font-face files — but
not a hand-written href, so BaseLayout's root-absolute "/favicon.svg"
resolved to the HOST's document root instead of ours.

Build it from import.meta.env.BASE_URL. Verified both ways:

  CELILO_ROUTE=/nexus  ->  href="/nexus/favicon.svg"
  (default)            ->  href="/favicon.svg"

The consumer health_check would not have caught this: its asset regex matches
only .js/.css/.mjs, so it picks the bundled script (correctly prefixed) and
passes.

Also point the hook deps at @celilo/capabilities ^0.9.0 — the release that
actually carries external_web — replacing a hand-assembled 0.8.0 tree with a
real install.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The favicon base-path fix landed after the 0.2.0 manifest commit, so the
publish stale-check flags src-newer-than-manifest. 0.2.0 has never been
published (registry and fleet are both on 0.1.0), so the version is still
unspent and the fix is simply part of what 0.2.0 is — a release-touch, not
a semver bump.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
celilo/tango-nexus!2
No description provided.