-
Notifications
You must be signed in to change notification settings - Fork 93
feat(astro): add expressiveCodeThemes
option
#461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great!
Let's also update documentation at
tutorialkit/docs/tutorialkit.dev/src/content/docs/reference/configuration.mdx
Lines 489 to 531 in 05eb7ab
## Configure the Tutorialkit Astro integration | |
`@tutorialkit/astro` is an integration for Astro. You can configure the integration in your `astro.config.ts` file. | |
```ts "tutorialkit()" title="astro.config.ts" | |
import tutorialkit from "@tutorialkit/astro"; | |
import { defineConfig } from "astro/config"; | |
export default defineConfig({ | |
devToolbar: { | |
enabled: false, | |
}, | |
integrations: [ | |
tutorialkit(), | |
], | |
}); | |
``` | |
You can pass the following options to the `tutorialkit` integration: | |
### `components` | |
**type**: `OverrideComponentsOptions` | |
Provide the path to the components you want to override. | |
```ts | |
tutorialkit({ | |
components: { | |
TopBar: './src/components/CustomTopBar.astro', | |
}, | |
}); | |
``` | |
See [Overriding Components](/guides/overriding-components/) for details of all the components that you can override. | |
### `defaultRoutes` | |
**type**: `boolean | "tutorial-only"`<br/> | |
**default**: `true` | |
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. | |
Use `"tutorial-only"` to only add the tutorial routes without the redirect. |
Something simple to mention that expressive code themes can be changed.
…alkit integration
ee68967
to
bb437f6
Compare
expressiveCodeThemes
option
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @ackzell 💯
I've renamed the themes
option to expressiveCodeThemes
to be more explicit about what the option controls. It aligns nicely with previously existing expressiveCodePlugins
option name.
Released in |
I noticed there isn't a way to change the themes that Expressive Code uses.
I am proposing to expose a
themes
config in thetutorialkit
integration for astro.