1.1.41 • Published 1 year ago

docusaurus-preset-shiki-twoslash v1.1.41

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Docusaurus Preset Shiki Twoslash

Sets up markdown code blocks to run through shiki which means it gets the VS Code quality syntax highlighting mixed with the twoslash JavaScript tooling from the TypeScript website.

Setup

  1. Install the dependency: yarn add docusaurus-preset-shiki-twoslash
  2. Include "docusaurus-preset-shiki-twoslash" in the presets section of docusaurus.config.js

      presets: [
     [
       '@docusaurus/preset-classic',
       {
         // ...
       },
     ],
    + [
    +     'docusaurus-preset-shiki-twoslash',
    +     {
    +       themes: ["min-light", "nord"],
    +     },
    + ],
    ],
  3. Set up light/dark mode CSS in src/css/custom.css:

    [data-theme="light"] .shiki.nord {
       display: none;
    }
    
    [data-theme="dark"] .shiki.min-light {
       display: none;
    }
  4. Go read npmjs.com/package/remark-shiki-twoslash to see what is available, this package leaves all the heavy work to that module.

1.1.41

1 year ago

1.1.40

1 year ago

1.1.39

1 year ago

1.1.38

2 years ago

1.1.37

2 years ago

1.1.36

2 years ago

1.1.34

2 years ago

1.1.33

2 years ago

1.1.35

2 years ago

1.1.32

3 years ago

1.1.31

3 years ago

1.1.30

3 years ago

1.1.29

3 years ago

1.1.28

3 years ago

1.1.27

3 years ago

1.1.23

3 years ago

1.1.22

3 years ago

1.1.21

3 years ago

1.1.26

3 years ago

1.1.25

3 years ago

1.1.24

3 years ago

1.1.20

3 years ago

1.1.19

3 years ago

1.1.18

3 years ago

1.1.17

3 years ago

1.1.16

3 years ago

1.1.15

3 years ago

1.1.14

3 years ago

1.1.12

3 years ago

1.1.13

3 years ago

1.1.11

3 years ago

1.1.10

3 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.1

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago