0.3.0 โ€ข Published 8 months ago

ember-shiki v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Build Status NPM Ember Observer Score Ember Version

๐ŸŒˆ ember-shiki

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.

  • โœ… TypeScript and Glint ready
  • ๐Ÿงต V2 addon format
  • ๐Ÿš€ FastBoot support
  • ๐Ÿ“ฆ Lazy loaded packages โ€” minimal impact on initial load
  • #๏ธโƒฃ Syntax highlighting for 170+ languages โ€” including .gjs and .gts
  • ๐ŸŽจ Theme support: 29 included themes โ€” load any external
  • ๐Ÿ”ข Line number support
  • ๐Ÿ”ค Custom fonts โ€” including font ligature support
  • ๐Ÿ“‹ Copy code to clipboard
  • ๐Ÿท๏ธ Code block naming
  • ๐Ÿ—‚๏ธ Group code blocks with tabs
  • โœจ Line highlighting
  • ๐Ÿ–Œ๏ธ Stylable via CSS variables

Compatibility

  • Embroider or ember-auto-import v2
  • Ember.js v4.4 or above
  • Node.js v16 or above

Installation

npm install ember-shiki
# or
yarn add ember-shiki
# or
pnpm install ember-shiki

Usage

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.

Contributing

See the Contributing guide for details.

Acknowledgements

Heavily inspired by VitePress.

License

This project is licensed under the MIT License.

0.3.0

8 months ago

0.2.0

8 months ago

0.1.5

8 months ago

0.1.4

9 months ago

0.1.3

9 months ago

0.1.2

9 months ago

0.1.1

9 months ago

0.1.0

9 months ago