Upgrade to Astro 7#3243
Open
borland wants to merge 2 commits into
Open
Conversation
|
Pull request environment is available at https://stoctodocspr3243.z22.web.core.windows.net. You can view the ephemeral environment status in Octopus Deploy. This environment will be automatically deprovisioned when the pull request is closed, or after 7 days of inactivity. |
Bumps astro to ^7.0.9 and @astrojs/mdx to ^7.0.3, and resolves the
breaking changes surfaced by the upgrade:
- Header.astro: mark the theme-switcher <script> as `is:inline`. Astro 7
hands non-inline scripts to Vite for bundling, which cannot resolve the
`/docs/js/modules/theme-switcher.js` public asset and failed the build.
Inlining emits it verbatim so the browser resolves it at runtime.
- astro.config.mjs: move remark plugins from the deprecated
`markdown.remarkPlugins` into `markdown.processor: unified({ ... })`
from @astrojs/markdown-remark (added as a direct dependency since it is
now imported by the config). `trailingSlash` was not honored in its location, so it was removed, and drop the dead `extendDefaultPlugins`.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Thanks @enf0rc3. I've updated the astro config to restore the v6 behaviour. If you refresh the ephemeral environment at https://stoctodocspr3243.z22.web.core.windows.net/docs/installation/requirements you can see it now matches the original |
steve-fenton-octopus
approved these changes
Jul 15, 2026
steve-fenton-octopus
left a comment
Contributor
There was a problem hiding this comment.
Tested on the ephemeral environment. Looks good to go.
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.

Why: Astro 7 is faster than prior versions (The github actions build looks like it takes 9 minutes now, instead of 11+), and it is good to keep on top of dependency updates
Claude made the changes in this PR, and wrote the content below the line
I verified the output using
pnpm devandpnpm previewand as far as I can see, everything looks as it should.What
Upgrades the docs site from Astro 6 to Astro 7 (
astro@^7.0.9,@astrojs/mdx@^7.0.3) and fixes the breaking changes the upgrade surfaced.pnpm buildcompletes cleanly (2695 pages, no warnings).Changes
Header.astro— build failure fix. Astro 7 hands non-inline<script>tags to Vite for bundling, which cannot resolve the/docs/js/modules/theme-switcher.jspublic asset and failed the build withUNRESOLVED_IMPORT. Marked the scriptis:inlineso Astro emits it verbatim and the browser resolves it at runtime — consistent with how the rest of the site references its public JS.astro.config.mjs— deprecation migration.markdown.remarkPluginsis deprecated in Astro 7. Moved the remark plugins intomarkdown.processor: unified({ remarkPlugins })from@astrojs/markdown-remark, and added that package as a direct dependency (it's now imported by the config; previously only transitive).astro.config.mjs— config cleanup. HoistedtrailingSlash: 'never'to the top level, where it's actually honored (it was previously nested undermarkdownand silently ignored), and removed the deadextendDefaultPluginsoption (a no-op since Astro 2).Testing
pnpm build— passes, exit code 0, 2695 pages built, no deprecation or config warnings.