You take some Shiki, add a hint of TypeScript compiler, and 🎉 incredible statically generated code samples.
See the user-facing docs at: https://shikijs.github.io/twoslash/
The majority of this repo uses pnpm, the rest yarn. There are four main areas of interest:
packages
, the shiki meets twoslash plugins for markdown renderers and static site generatorssite
, the docs micro-siteexamples
, example static site generator projects which use the pluginsextensions
, right now, just the vscode extension for twoslash code samples
The site
extensions
and examples
are excluded from the workspace. To work on those, cd
to their folders and read instructions.
Otherwise:
git clone https://github.com/shikijs/twoslash
cd twoslash
pnpm i
pnpm bootstrap
pnpm test
Then see the contributing for advice and the vision file for the long-term perspective.
docusaurus-preset-shiki-twoslash
- for Docusauruseleventy-plugin-shiki-twoslash
- For 11tygatsby-remark-shiki-twoslash
- For Gatsbyhexo-shiki-twoslash
- For Hexovuepress-plugin-shiki-twoslash
- For VuePress
markdown-it-shiki-twoslash
- For Markdown-Itremark-shiki-twoslash
- For Remark
shiki-twoslash
- Provides all the building blocks for abovetwoslash-cli
- A CLI for converting md/ts/tsx/js/jsx files to HTML
Run: pnpm deploy
.