mirror of
https://github.com/withastro/astro.git
synced 2025-01-13 22:11:20 -05:00
4afb5fe23c
* feat: add shiki option for default color * feat: propagate shiki option for default color to astro config * feat: add tests for default color * chore: add change set * fix: add complete type to shiki default color config * fix: remove unneeded heavy shiki theme from fixture * fix: add literals to schema validation Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com> * Update .changeset/cold-crabs-arrive.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * feat: improve changeset * grammar tweak --------- Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
909 B
909 B
@astrojs/markdown-remark | astro |
---|---|
minor | minor |
Adds support for Shiki's defaultColor
option.
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.
import { defineConfig } from 'astro/config';
export default defineConfig({
markdown: {
shikiConfig: {
themes: {
light: 'github-light',
dark: 'github-dark',
},
defaultColor: false,
},
},
});
---
import { Code } from 'astro:components';
---
<Code code={`const useMyColors = true`} lang="js" defaultColor={false} />