Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rodneylab/sveltekit-shiki-code-highlighting
SvelteKit Shiki syntax highlighting: use any VSCode colour theme to accessibly syntax highlight code on your SvelteKit app with line numbers.
https://github.com/rodneylab/sveltekit-shiki-code-highlighting
code-highlight mdsvex shiki shikijs sveltekit syntax-highlighting
Last synced: 2 months ago
JSON representation
SvelteKit Shiki syntax highlighting: use any VSCode colour theme to accessibly syntax highlight code on your SvelteKit app with line numbers.
- Host: GitHub
- URL: https://github.com/rodneylab/sveltekit-shiki-code-highlighting
- Owner: rodneylab
- License: bsd-3-clause
- Created: 2022-04-26T17:00:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-29T08:15:14.000Z (11 months ago)
- Last Synced: 2024-05-08T23:06:15.703Z (9 months ago)
- Topics: code-highlight, mdsvex, shiki, shikijs, sveltekit, syntax-highlighting
- Language: JavaScript
- Homepage:
- Size: 343 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
SvelteKit Shiki Syntax Highlighting# sveltekit-shiki-code-highlighting
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/rodneylab/sveltekit-shiki-code-highlighting)
Demo code for Shiki syntax highlighting with SvelteKit. The code accompanies the post on using Shiki code syntax highlighting with SvelteKit. If you have any questions, please drop a comment at the bottom of that page.
## Building and previewing the site
If you're seeing this, you've probably already done this step. Congrats!
```bash
git clone https://github.com/rodneylab/sveltekit-shiki-code-highlighting.git
cd sveltekit-shiki-code-highlighting
pnpm install # or npm install
pnpm run dev
```## Building
```bash
pnpm run build
```> You can preview the built app with `pnpm run preview`, regardless of whether you installed an adapter. This should _not_ be used to serve your app in production.
Feel free to jump into the [Rodney Lab matrix chat room](https://matrix.to/#/%23rodney:matrix.org).