shiki-templ
v0.2.4
Published
Enabling Templ syntax highlighting in Shiki.
Downloads
18
Maintainers
Readme
shiki-templ
makes easier to use the TextMate grammar definition for Templ with Shiki.
The package fetches the online version of the grammar file.
[!NOTE] A PR has been submitted to officially add Templ language support to Shiki. > This package will be used in the meantime.
Installation
You can install the package using npm, pnpm, or yarn:
# npm
npm install shiki-templ
# pnpm
pnpm add shiki-templ
# yarn
yarn add shiki-templ
Usage
Shiki
To use the shiki-templ
with Shiki, please refer to the official Load Custom Language page.
Vitepress
Here's how you can configure Vitepress to use the shiki-templ
:
import { defineConfig } from "vitepress";
import { templLang } from "shiki-templ";
// https://vitepress.dev/reference/site-config
export default defineConfig({
// ...
markdown: {
languages: [templLang],
},
}):
License
This project is licensed under the MIT License - see the LICENSE file for details.