Embed code snippets with pretty syntax highlighting in Ember.js, powered by Shiki
ember-shiki is an addon which makes using Shiki in Ember a breeze. It offers a drop-in component to get syntax highlighting for code. This is perfect for documentation sites, blogs, or wherever you need pretty formatted code.
- Embroider or ember-auto-import v2
- Ember.js v4.4 or above
- Node.js v16 or above
npm install ember-shiki
# or
yarn add ember-shiki
# or
pnpm install ember-shiki
Basic usage:
import { CodeBlock } from 'ember-shiki';
<template>
<CodeBlock
@code="console.log('hello world');"
@language="js"
/>
</template>
See the deployed docs app for an interactive demo and information on all options.
See the Contributing guide for details.
Heavily inspired by VitePress.
This project is licensed under the MIT License.