Add M3U8 syntax highlighting in docs

This commit is contained in:
Vanilagy
2026-04-15 17:28:06 +02:00
parent 6a54ad8a5b
commit d68c9c4fb1
2 changed files with 110 additions and 0 deletions
+4
View File
@@ -5,6 +5,7 @@ import llmstxt from 'vitepress-plugin-llms';
import { HeadConfig } from 'vitepress';
// @ts-expect-error This file gets generated once docs:generate is run
import apiRoutes from '../api/index.json';
import m3u8Grammar from './m3u8-grammar.json' with { type: 'json' };
const DESCRIPTION = 'A JavaScript library for reading, writing, and converting media files. Directly in the browser,'
+ ' and faster than anybunny else.';
@@ -168,6 +169,9 @@ export default withMermaid({
markdown: {
math: true,
theme: { light: 'github-light', dark: 'github-dark-dimmed' },
shikiSetup: (shiki) => {
shiki.loadLanguageSync(m3u8Grammar);
},
config(md) {
md.use(footnote);
},