Conversation
…ests Adds a new blog/ workspace package built with Astro 6, configured with base: '/blog' and directory output so each post emits as /blog/<slug>/index.html, ready to be served as a subpath of iii.dev without any path rewrites. Includes a typed content collection schema, a sample post, RSS feed, and node:test build-output assertions that catch base-path regressions before they ship. Infrastructure (CloudFront /blog* behavior, S3 sync, SPA-fallback fix, sitemap merge) is intentionally deferred to a follow-up step.
Astro emits the blog with trailingSlash: 'always' and build.format: 'directory', so canonical URLs are /blog/<slug>/ backed by blog/<slug>/index.html keys in S3. CloudFront's default_root_object only handles the apex, and the existing SPA fallback would rewrite /blog/<slug> to /index.html, so /blog/* needs explicit routing in the viewer-request function. Adds a /blog/* block before the SPA fallback that: - 301s /blog and /blog/<extensionless>/ to the canonical trailing-slash form (preserves querystring, uses request host so preview deploys redirect to themselves) - Rewrites /blog/<path>/ to /blog/<path>/index.html so S3 serves the directory index - Passes /blog/<file.ext> through unchanged for assets and RSS - Lets /blogfoo and similar prefixes fall through to the existing SPA logic (boundary-safe via the /blog/ prefix check) 12 new test cases in redirects.test.js cover each branch plus querystring preservation.
Extends the existing website deploy workflow to also build the Astro blog and sync blog/dist/ to s3://<bucket>/blog/. The blog and website share the same S3 bucket and CloudFront distribution, so: - Trigger paths now include blog/**. - The website syncs gain --exclude "blog/*" so their --delete flag doesn't wipe blog output between sync steps. - Blog deploy mirrors the website's two-pass cache-control split: hashed assets under _astro/ get max-age=31536000,immutable; *.html and *.xml get max-age=0,must-revalidate so new posts surface immediately after the /* invalidation. The blog README now documents the deploy flow and links to the CloudFront routing tests as the source of truth for /blog/* behavior.
Adds website/scripts/blog-posts.ts — a tiny dependency-free frontmatter
reader for blog/src/content/blog/*.{md,mdx} — and wires it into the
existing generate-sitemap.ts so /blog/ and every non-draft /blog/<slug>/
URL appears in iii.dev/sitemap.xml. lastmod uses updatedDate ?? pubDate
so updated posts surface promptly in search.
Six new node:test cases cover frontmatter parsing, draft handling,
sort order, missing dirs, and a smoke test against the seeded
hello-world post.
Also drops @astrojs/sitemap from pnpm-lock.yaml (was removed from
blog/package.json earlier due to a pnpm hoisting bug in 3.7.2).
Mirrors the analytics + consent stack from website/index.html so the blog tracks page views the same way the marketing site does and honors the same consent decision. Because /blog and / share an origin the localStorage 'iii_cookie_consent' key carries across both — a visitor who accepts (or declines) on either entry point won't see the banner on the other. Adds two Astro components used by BaseLayout: - AnalyticsHead.astro — GTM container script + Common Room loader (defines window.iiiLoadCommonRoomSignals / iiiNotifyCommonRoomEmail but only auto-fetches the Common Room signals.js after consent). - CookieBanner.astro — GTM <noscript> iframe, banner DOM/CSS, and the accept/decline script that calls iiiLoadCommonRoomSignals on accept. Two new build-output tests assert that both the index and post pages ship the GTM container ID, the noscript iframe, both Common Room globals, the signals URL, the banner DOM, and the shared storage key — so any drift from the website snippet fails CI. CSP already allows googletagmanager.com and *.cr-relay.com on the default S3 cache behavior, so no Terraform change is needed.
…rk mode Brings the blog visual identity in line with the marketing site: - Adopts the website's design tokens (warm paper bg, Chivo Mono, orange #ff5a1f accent, full dark-mode palette) by porting the :root variables verbatim. - Adds ThemeInit.astro — the same inline pre-paint theme detector the website uses, reading the shared 'iii_theme' localStorage key. A user's dark/light choice now carries between iii.dev and /blog with no flash of unstyled palette. - References /fonts/ChivoMono-*.ttf directly so the blog reuses the fonts already deployed at the website root (single source of truth, same S3 bucket). - New Logo.astro and Footer.astro components reproduce the iii six-rect SVG and the website's three-column footer (developers / contact / brand) plus the © Motia LLC bottom row. - BaseLayout.astro wraps content in the website's bordered .sheet with a sticky bordered .nav; main content stays a comfortable 760px reading column. - Post index uses the website's underlined-on-hover orange-accent link treatment for consistent affordances. Two new build tests pin down the parity: one asserts the iii_theme key + pre-paint dark-mode application, one asserts the iii logo SVG renders in the header. Updated the URL allowlist for the new footer links (/docs/quickstart, /fonts/*).
Three small theme-parity fixes: - Logo: the website renders the iii six-rect mark with all six rects filled in --ink in both navbar and footer; --accent (orange) is reserved for highlight text only. The blog was painting the middle column orange, which made the icon look like a different logo. Both Logo placements now use var(--ink) consistently. - Navbar: drop the 'iii / blog' wordmark — the website navbar shows only the icon, so the wordmark was extra noise that diverged from the parent site. - CookieBanner: leftover --fg / --border tokens from the pre-theme scaffold no longer exist after the theme rewrite, which left the Accept button rendering as transparent on transparent. Switched the banner to the live token set (--ink, --paper, --rule, --bg).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedFailed to post review comments 📝 WalkthroughWalkthroughIntroduces a complete Astro-based blog under ChangesBlog Feature
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Terraform plan —
|
The blog has its own build + tests via deploy-website.yml; mirror the website/** paths-ignore entry so docs-style content changes under blog/ don't trigger the full Rust/Node CI matrix or license scan.
Terraform plan —
|
What
New static blog site for iii
Summary by CodeRabbit
New Features
Infrastructure
Documentation
Tests