Skip to content

Upgrade Astro to v6, Starlight to v0.38, and Tailwind to v4 in blog apps#647

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/upgrade-astro-version
Draft

Upgrade Astro to v6, Starlight to v0.38, and Tailwind to v4 in blog apps#647
Copilot wants to merge 3 commits intomainfrom
copilot/upgrade-astro-version

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 17, 2026

Upgrades both template/blog and opensaas-sh/blog from Astro 4 to Astro 6, with all required ecosystem migrations.

Package changes

  • astro: ^4.16.15^6.0.5
  • @astrojs/starlight: ^0.29.2^0.38.1
  • starlight-blog: ^0.15.0^0.26.1
  • @astrojs/starlight-tailwind: ^2.0.3^5.0.0
  • sharp: ^0.32.5^0.34.5
  • Removed @astrojs/tailwind (incompatible with Astro 6)
  • Added tailwindcss@^4.2.1 + @tailwindcss/vite@^4.2.1

Tailwind v4 migration

  • Replaced @astrojs/tailwind integration with @tailwindcss/vite Vite plugin
  • Removed tailwind.config.mjs and postcss.config.cjs; theme config now lives in CSS via @theme
  • @astrojs/starlight-tailwind v5 is now a CSS import rather than a JS plugin
/* before */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* after */
@import "tailwindcss";
@import "@astrojs/starlight-tailwind";

@theme {
  --color-accent-50: var(--color-yellow-50);
  /* ... */
}

Astro 6 content layer migration

  • Moved src/content/config.tssrc/content.config.ts
  • Collections now use docsLoader() / i18nLoader() from @astrojs/starlight/loaders

Starlight breaking changes

  • social config: object → array format (changed in Starlight v0.33)
  • starlight-blog virtual module: virtual:starlight-blog-configvirtual:starlight-blog/config
  • Custom ThemeSelect override updated to wrap starlight-blog/components/ThemeSelect.astro

Null safety fixes

HeadWithOGImage, TitleWithBannerImage, and BlogPostSchema now guard against undefined id/entry props, which occur on virtual pages (404, author pages, tag pages) that have no content entry.

Contributor Checklist

Make sure to do the following steps if they are applicable to your PR:

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • telemetry.astro.build
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/open-saas/open-saas/template/blog/node_modules/.bin/astro check (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/open-saas/open-saas/template/blog/node_modules/.bin/astro build -main/dist/ripgrep/bin/linux-x64/rg (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/open-saas/open-saas/template/blog/node_modules/.bin/astro build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>upgrade Astro version in template/app</issue_title>
<issue_description></issue_description>

<agent_instructions>the template has an astro app with the starlight blog plugin. let's try updating it to the newest version and make sure its working.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits March 17, 2026 15:13
…n template/blog and opensaas-sh/blog

Co-authored-by: vincanger <70215737+vincanger@users.noreply.github.com>
Co-authored-by: vincanger <70215737+vincanger@users.noreply.github.com>
Copilot AI changed the title [WIP] Upgrade Astro version in template/app Upgrade Astro to v6, Starlight to v0.38, and Tailwind to v4 in blog apps Mar 17, 2026
Copilot AI requested a review from vincanger March 17, 2026 15:18
Copy link
Copy Markdown

@JiwaniZakir JiwaniZakir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removal of customCss: ["./src/styles/tailwind.css"] from the starlightBlog config in astro.config.mjs is worth verifying carefully. With Tailwind v4's Vite plugin approach, CSS processing is handled differently than v3's @astrojs/tailwind integration — but that only works if there's a CSS entry point somewhere that contains @import "tailwindcss" (or equivalent). The diff doesn't show any changes to src/styles/tailwind.css or a new CSS import in src/layouts / global styles, so it's unclear whether Tailwind utility classes used in custom components (e.g., TitleWithBannerImage.astro, PageFrameWithCookieConsent.astro) will still be picked up by the content scanner. If that file was the sole Tailwind entry point and it's now unreferenced, custom utility classes could silently disappear from the build output.

Also, @astrojs/starlight-tailwind jumps from ^2.0.3 to ^5.0.0 — a three-major-version bump. It's worth confirming whether the starlight-tailwind integration still needs to be listed as a dependency at all under the Tailwind v4 + Vite plugin model, or if its role has been superseded, to avoid shipping a potentially unused or conflicting package.

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.

upgrade Astro version in template/app

4 participants