Skip to content

Commit bb437f6

Browse files
committed
refactor: rename themes to expressiveCodeThemes
1 parent 71ed684 commit bb437f6

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

docs/tutorialkit.dev/src/content/docs/reference/configuration.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ See [Overriding Components](/guides/overriding-components/) for details of all t
530530
Controls whether the tutorial routes are automatically added to your project. When set to `true`, it additionally adds a redirect from `/` to the first tutorial.
531531
Use `"tutorial-only"` to only add the tutorial routes without the redirect.
532532

533-
### `themes`
533+
### `expressiveCodeThemes`
534534

535535
**type**: `[ThemeObjectOrShikiThemeName, ThemeObjectOrShikiThemeName]`<br/>
536536
**default**: `['light-plus', 'dark-plus']`
@@ -539,8 +539,9 @@ Controls which themes are applied to [Expressive Code](https://expressive-code.c
539539

540540
```ts
541541
tutorialkit({
542-
themes: ['catppuccin-latte', 'catppuccin-mocha'],
542+
expressiveCodeThemes: ['catppuccin-latte', 'catppuccin-mocha'],
543543
});
544544
```
545+
545546
Make sure to provide a light and a dark theme if you want support for both light and dark modes.
546547
See the [themes](https://expressive-code.com/guides/themes/) section of Expressive Code to learn more.

packages/astro/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export interface Options {
7575
*
7676
* @default ['light-plus', 'dark-plus']
7777
*/
78-
themes?: [ThemeObjectOrShikiThemeName, ThemeObjectOrShikiThemeName];
78+
expressiveCodeThemes?: [ThemeObjectOrShikiThemeName, ThemeObjectOrShikiThemeName];
7979
}
8080

8181
export default function createPlugin({
@@ -84,7 +84,7 @@ export default function createPlugin({
8484
isolation,
8585
enterprise,
8686
expressiveCodePlugins = [],
87-
themes,
87+
expressiveCodeThemes,
8888
}: Options = {}): AstroIntegration {
8989
const webcontainerFiles = new WebContainerFiles();
9090

@@ -159,7 +159,7 @@ export default function createPlugin({
159159
config.integrations.splice(
160160
selfIndex + 1,
161161
0,
162-
...extraIntegrations({ root: fileURLToPath(config.root), expressiveCodePlugins, themes }),
162+
...extraIntegrations({ root: fileURLToPath(config.root), expressiveCodePlugins, expressiveCodeThemes }),
163163
);
164164
},
165165
'astro:config:done'({ config }) {

packages/astro/src/integrations.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import UnoCSS from 'unocss/astro';
1010
export function extraIntegrations({
1111
root,
1212
expressiveCodePlugins = [],
13-
themes = ['light-plus', 'dark-plus'],
13+
expressiveCodeThemes = ['light-plus', 'dark-plus'],
1414
}: {
1515
root: string;
1616
expressiveCodePlugins?: ExpressiveCodePlugin[];
@@ -19,13 +19,13 @@ export function extraIntegrations({
1919
* Themes for Expressive Code.
2020
* Takes a tuple of themes, e.g. `[lightTheme, darkTheme]`.
2121
*/
22-
themes?: [ThemeObjectOrShikiThemeName, ThemeObjectOrShikiThemeName];
22+
expressiveCodeThemes?: [ThemeObjectOrShikiThemeName, ThemeObjectOrShikiThemeName];
2323
}) {
2424
return [
2525
react(),
2626
expressiveCode({
2727
plugins: [pluginCollapsibleSections(), pluginLineNumbers(), ...expressiveCodePlugins],
28-
themes,
28+
themes: expressiveCodeThemes,
2929
customizeTheme: (theme) => {
3030
const isDark = theme.type === 'dark';
3131

0 commit comments

Comments
 (0)