This repository contains a TextMate grammar for the MAML language.
- maml.json — the TextMate (TM) grammar definition.
VitePress uses Shiki under the hood for code highlighting. You can register the MAML grammar and enable highlighting for code blocks like:
```maml
# your MAML code here
```Copy maml.json to .vitepress directory.
Update configuration like this:
+const __dirname = new URL('.', import.meta.url).pathname
+const mamlLang = JSON.parse(fs.readFileSync(__dirname + '/maml.json', 'utf8'))
export default defineConfig({
...
markdown: {
+ shikiSetup(shiki) {
+ shiki.loadLanguage(mamlLang)
+ },
},
...
})