Skip to content

refactor: removes support of Shiki with CSP#15640

Merged
ematipico merged 2 commits intomainfrom
fix/code-regressions
Feb 24, 2026
Merged

refactor: removes support of Shiki with CSP#15640
ematipico merged 2 commits intomainfrom
fix/code-regressions

Conversation

@ematipico
Copy link
Member

@ematipico ematipico commented Feb 24, 2026

Changes

Closes #15608
Closes #15582

Revert #15582

Unfortunately we can't, in any way possible, to support Shiki with CSP. After extensive research, and realised that I broke things with my previous PR, we can't have a solution that works for everything.

Even with head propagation, markdown files can't be supported.

I added a warning for our users

Testing

CI is green

Docs

withastro/docs#13307

/cc @withastro/maintainers-docs for feedback!

@ematipico ematipico self-assigned this Feb 24, 2026
@github-actions github-actions bot added feat: markdown Related to Markdown (scope) pkg: integration Related to any renderer integration (scope) pkg: astro Related to the core `astro` package (scope) labels Feb 24, 2026
@changeset-bot
Copy link

changeset-bot bot commented Feb 24, 2026

🦋 Changeset detected

Latest commit: 16f3c24

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

Approving for docs (changeset and warning message)!

@ematipico ematipico force-pushed the fix/code-regressions branch from ff833d6 to 16f3c24 Compare February 24, 2026 15:59
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 24, 2026

Merging this PR will not alter performance

✅ 18 untouched benchmarks


Comparing fix/code-regressions (16f3c24) with main (be1c87e)

Open in CodSpeed

@ematipico ematipico merged commit 4c1a801 into main Feb 24, 2026
18 of 26 checks passed
@ematipico ematipico deleted the fix/code-regressions branch February 24, 2026 16:31
@@ -1,15 +1,10 @@
---
import { createShikiHighlighter, type ThemePresets } from '@astrojs/markdown-remark/shiki';
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for the late catch after the merge, but if we revert this part as well, won't it cause the Cloudflare Workers error to resurface?

Copy link
Contributor

Choose a reason for hiding this comment

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

@delucis delucis mentioned this pull request Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat: markdown Related to Markdown (scope) pkg: astro Related to the core `astro` package (scope) pkg: integration Related to any renderer integration (scope)

Projects

None yet

5 participants