-
Notifications
You must be signed in to change notification settings - Fork 53
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
Docusaurus integration not working #171
Comments
Oh, wait a second... This does not work on a regular page but it does work in a page nested under |
The same thing is observed here. Works for |
I created an example to illustrate the problem: https://github.com/felipecrs/shiki-docusaurus-test |
I resolved this by specifying the plugin within all three preset-config sections, as well as in the top-level preset section. import remarkShikiTwoSlash, { Options as RemarkShikiTwoslashOptions } from 'remark-shiki-twoslash'
const remarkShikiOptions: RemarkShikiTwoSlashOptions = {
themes: ['github-light', 'github-dark'],
// more shiki options
};
export default {
presets: [
[
'classic',
{
docs: {
// ...
beforeDefaultRemarkPlugins: [[remarkShikiTwoSlash, remarkShikiOptions]],
},
pages: {
// ...
beforeDefaultRemarkPlugins: [[remarkShikiTwoSlash, remarkShikiOptions]],
},
blog: {
// ...
beforeDefaultRemarkPlugins: [[remarkShikiTwoSlash, remarkShikiOptions]],
},
}
],
['docusaurus-preset-shiki-twoslash', remarkShikiOptions]
// ... rest of config |
Hi there 👋 I'm trying to build a documentation site with this amazing tool. However upon following the getting started bootstrap from docusaurus and the shiki-twoslash setup for docusaurus, and having the following markdown page:
My content gets rendered like this:
Have I missed something?
The text was updated successfully, but these errors were encountered: