diff options
Diffstat (limited to 'packages/markdown')
-rw-r--r-- | packages/markdown/remark/CHANGELOG.md | 33 | ||||
-rw-r--r-- | packages/markdown/remark/package.json | 2 |
2 files changed, 34 insertions, 1 deletions
diff --git a/packages/markdown/remark/CHANGELOG.md b/packages/markdown/remark/CHANGELOG.md index 4cb58a347..73bab0b25 100644 --- a/packages/markdown/remark/CHANGELOG.md +++ b/packages/markdown/remark/CHANGELOG.md @@ -1,5 +1,38 @@ # @astrojs/markdown-remark +## 5.2.0 + +### Minor Changes + +- [#11341](https://github.com/withastro/astro/pull/11341) [`49b5145`](https://github.com/withastro/astro/commit/49b5145158a603b9bb951bf914a6a9780c218704) Thanks [@madcampos](https://github.com/madcampos)! - Adds support for [Shiki's `defaultColor` option](https://shiki.style/guide/dual-themes#without-default-color). + + This option allows you to override the values of a theme's inline style, adding only CSS variables to give you more flexibility in applying multiple color themes. + + Configure `defaultColor: false` in your Shiki config to apply throughout your site, or pass to Astro's built-in `<Code>` component to style an individual code block. + + ```js title="astro.config.mjs" + import { defineConfig } from 'astro/config'; + export default defineConfig({ + markdown: { + shikiConfig: { + themes: { + light: 'github-light', + dark: 'github-dark', + }, + defaultColor: false, + }, + }, + }); + ``` + + ```astro + --- + import { Code } from 'astro:components'; + --- + + <Code code={`const useMyColors = true`} lang="js" defaultColor={false} /> + ``` + ## 5.1.1 ### Patch Changes diff --git a/packages/markdown/remark/package.json b/packages/markdown/remark/package.json index fe68eaca4..b4f942298 100644 --- a/packages/markdown/remark/package.json +++ b/packages/markdown/remark/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/markdown-remark", - "version": "5.1.1", + "version": "5.2.0", "type": "module", "author": "withastro", "license": "MIT", |