/shiki

A beautiful Syntax Highlighter.

Primary LanguageTypeScript

Shiki

Shiki is a beautiful Syntax Highlighter. Demo.

Usage

npm i shiki
# yarn add shiki
const shiki = require('shiki')

shiki
  .getHighlighter({
    theme: 'nord'
  })
  .then(highlighter => {
    console.log(highlighter.codeToHtml(`console.log('shiki');`, 'js'))
  })

// <pre class="shiki" style="background-color: #2e3440"><code>
//   <!-- Highlighted Code -->
// </code></pre>

Seen

Credits

License

MIT © Pine Wu