Skip to content

Commit

Permalink
fix: add reactive theme content (#7218)
Browse files Browse the repository at this point in the history
Co-authored-by: Sarah Rainsberger <[email protected]>
Co-authored-by: Eveeifyeve <[email protected]>
  • Loading branch information
3 people authored May 6, 2024
1 parent a9543d8 commit 6c0af6a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/content/docs/en/guides/markdown-content.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -598,8 +598,8 @@ export default defineConfig({
// https://shiki.style/themes
theme: 'dracula',
// Alternatively, provide multiple themes
// https://shiki.style/guide/dual-themes
themes: {
// See note below for using dual light/dark themes
experimentalThemes: {
light: 'github-light',
dark: 'github-dark',
},
Expand All @@ -617,6 +617,10 @@ export default defineConfig({
});
```

:::note[Customizing Shiki themes]
Astro code blocks are styled using the `.astro-code` class. When following Shiki's documentation (e.g. to [customize light/dark dual or multiple themes](https://shiki.style/guide/dual-themes#query-based-dark-mode)), be sure to replace the `.shiki` class in the examples with `.astro-code`
:::

#### Adding your own theme

Instead of using one of Shiki’s predefined themes, you can import a custom theme from a local file.
Expand Down

0 comments on commit 6c0af6a

Please sign in to comment.