feat: use shiki for ssr codeblocks
This PR contains:
- IMPROVED DOCS
Describe the problem you have without this PR
I've switch from prismjs to shiki, using rehype to compile the codeblocks at build-time, not on the client.
Only detail is that the dracula theme changes from prismjs to shiki, here are some screenshots:
Currently, with prismjs
With shiki
I'm exploring rxdb for a personal sideproject, and I'd like to test some of the premium features to make it more performant, as per the premium task list.
Todos
- [ ] Tests
- [ ] Changelog
I use prettier on save, and it formatted the docusaurus config file quite a lot. I couldn't find a formatter on the project to use.
Hi @polvallverdu
This PR adds shiki but does not remove the prismjs from the main javascript bundle which was the main reason to switch from something else. Please check the build main.js file by running npm run docs:build it should not contain prismjs afterwards.
Changing the theme and style is no problem. I think it looks ok to me.
Yeah, I see... I think docusaurus comes with prismjs prebundled, even some examples that use shiki still pull prismjs. Let me try a few things and see what I can do.
I think it has to be excluded with via webpack config somehow.
#7590 seems to have got it, I think we can close this