Skip to content

styfle/shiki

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A beautiful Syntax Highlighter.

Resources

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 52.5%
  • HTML 40.4%
  • JavaScript 5.5%
  • CSS 1.6%