chore: tighten types, enable prefetch, and stop indexing stub pages - #182
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Six small cleanups from the Astro best-practices review. All mechanical, all verified against a build.
1.
tsconfig→astro/tsconfigs/strictThe baseline Astro recommends; the project was on
base, which leaves strict mode off. Costs nothing here —astro checkstays at 0 errors, 0 warnings, 0 hints.2.
interface PropsonInlineEditorandPrincipleThe last two components with implicitly-
anyprops.CarouselandLayoutwere already typed.3. Enable prefetch
prefetch: trueon its own leavesprefetchAllatfalse, so only links carryingdata-astro-prefetchwould 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.gitignoreIt has been showing up untracked in every
git statusand in twogh pr createwarnings.5. + 6.
noindexfor the 404 and/blogLayoutgains anoindexprop 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.https://flix.dev/404/, telling crawlers that every missing URL is canonically the 404 page./blogis a 1.7 KB stub whose only content is a link to blog.flix.dev. It's nownoindexand filtered out of the sitemap — no point asking Google to crawl a page we then tell it to drop.I chose
noindexover a redirect because the navbar links to/blogand the page explains where the blog went; a redirect would bounce visitors straight off the site. Easy to switch if you'd rather.Verification
🤖 Generated with Claude Code