Skip to content

chore: tighten types, enable prefetch, and stop indexing stub pages - #182

Merged
magnus-madsen merged 1 commit into
masterfrom
chore/config-and-seo-cleanups
Aug 3, 2026
Merged

chore: tighten types, enable prefetch, and stop indexing stub pages#182
magnus-madsen merged 1 commit into
masterfrom
chore/config-and-seo-cleanups

Conversation

@magnus-madsen

Copy link
Copy Markdown
Member

Six small cleanups from the Astro best-practices review. All mechanical, all verified against a build.

1. tsconfigastro/tsconfigs/strict

The baseline Astro recommends; the project was on base, which leaves strict mode off. Costs nothing here — astro check stays at 0 errors, 0 warnings, 0 hints.

2. interface Props on InlineEditor and Principle

The last two components with implicitly-any props. Carousel and Layout were already typed.

3. Enable prefetch

prefetch: { prefetchAll: true }

prefetch: true on its own leaves prefetchAll at false, so only links carrying data-astro-prefetch would be prefetched — the nine-link nav would get nothing. The object form covers every internal link, on hover.

Cost: a 2.5 KB module script now loads on all ten pages, which previously shipped no external JS. Verified the homepage carousel's inline script is unaffected.

4. .idea/ into .gitignore

It has been showing up untracked in every git status and in two gh pr create warnings.

5. + 6. noindex for the 404 and /blog

Layout gains a noindex prop that emits <meta name="robots" content="noindex, follow"> and drops the canonical link — a page that shouldn't be indexed has no business claiming a canonical URL.

  • 404 previously self-canonicalised to https://flix.dev/404/, telling crawlers that every missing URL is canonically the 404 page.
  • /blog is a 1.7 KB stub whose only content is a link to blog.flix.dev. It's now noindex and filtered out of the sitemap — no point asking Google to crawl a page we then tell it to drop.

I chose noindex over a redirect because the navbar links to /blog and the page explains where the blog went; a redirect would bounce visitors straight off the site. Easy to switch if you'd rather.

Verification

astro check          0 errors, 0 warnings, 0 hints (strict)
build                clean, 10 pages

404.html             <meta name="robots" content="noindex, follow">   (no canonical)
blog/index.html      <meta name="robots" content="noindex, follow">   (no canonical)
index.html           <link rel="canonical" href="https://flix.dev/">  (unchanged)

sitemap              8 URLs, /blog absent
prefetch             prefetchAll baked in, script on all 10 pages
.idea/               now ignored

🤖 Generated with Claude Code

Six small cleanups:

- tsconfig extends astro/tsconfigs/strict rather than base, which is the
  baseline Astro recommends. Costs nothing here: check stays at 0 errors.
- Add interface Props to InlineEditor and Principle, the last two
  components whose props were implicitly any.
- Enable prefetch. `prefetch: true` alone leaves prefetchAll false, so
  only links carrying data-astro-prefetch would benefit; the object form
  covers the nine-page nav. Adds a 2.5 KB script to each page.
- Ignore .idea/, which has been showing up untracked in every status.
- Give Layout a noindex prop that emits a robots meta and drops the
  canonical link, since a page that should not be indexed has no
  business claiming one. 404 self-canonicalised to /404/ before this.
- Apply noindex to /blog, a 1.7 KB stub whose only content is a link to
  blog.flix.dev, and filter it out of the sitemap so we are not asking
  Google to crawl a page we then tell it to drop. Preferred over a
  redirect because the nav links there and the page explains the move.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@magnus-madsen
magnus-madsen merged commit 496190a into master Aug 3, 2026
2 checks passed
@magnus-madsen
magnus-madsen deleted the chore/config-and-seo-cleanups branch August 3, 2026 12:55
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