A beautiful Syntax Highlighter.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
packages Add aliases Jan 30, 2019
.gitignore Refactor Jan 1, 2019
.prettierrc.json Prettier Dec 28, 2018
README.md update readme Jan 4, 2019
lerna.json v0.1.3 Jan 30, 2019
package.json Types for Themes Jan 1, 2019
yarn.lock site Jan 2, 2019

README.md

Shiki

Shiki is a beautiful Syntax Highlighter. Demo.

Usage

npm

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>

Credits

License

MIT © Pine Wu