Skip to content

Point the docs site root at latest until a release exists - #45

Merged
NoeFontana merged 1 commit into
mainfrom
fix/mike-default-alias
Aug 2, 2026
Merged

Point the docs site root at latest until a release exists#45
NoeFontana merged 1 commit into
mainfrom
fix/mike-default-alias

Conversation

@NoeFontana

Copy link
Copy Markdown
Owner

Deploying from main published /latest/ and /main/, but left the
gh-pages root without an index.html, so the site root returned 404.

mike set-default writes that root redirect, and I had only wired it to the
release-tag step. A freshly seeded project has no tags, so every project
created from this template would 404 at its own documentation URL until it cut
a first release.

Fix

The main deploy now sets the default alias to latest when no stable
version exists. Once a release tag ships, the release step repoints the root at
stable, and this guard leaves it alone.

Verified against the live gh-pages branch — mike list prints:

  • main [latest] before any release → guard does not match → sets default
  • main [latest] + 0.1 [stable] after → guard matches → skips

docs/index.md now states the root's behaviour so downstream users know what
to expect.

The live site was unblocked out-of-band by running mike set-default latest
against gh-pages; this change makes that automatic for anyone seeding the
template.

Deploying from main published /latest/ and /main/ but left the gh-pages root
without an index.html, so the site root 404'd. `mike set-default` writes that
redirect, and it only ran on a release tag -- which a freshly seeded project
does not have. Every project created from this template would therefore 404
at its own documentation URL until it cut its first release.

The main deploy now sets the default to `latest` when no `stable` version
exists yet. Once a release tag ships, the release step repoints the root at
`stable` and this step leaves it alone.

Verified against a live gh-pages branch: `mike list` prints "main [latest]"
before a release and additionally "0.1 [stable]" after, so the guard skips
correctly in the second case.
@NoeFontana
NoeFontana merged commit 1a28f7e into main Aug 2, 2026
6 checks passed
@NoeFontana
NoeFontana deleted the fix/mike-default-alias branch August 2, 2026 14:44
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.

1 participant