Skip to content

Commit

Permalink
Merge pull request #188 from melange-re/dune-syntax-hilite
Browse files Browse the repository at this point in the history
Add syntax highlighting to dune snippets
  • Loading branch information
feihong authored Oct 2, 2024
2 parents 41e5f0b + 84b4e2e commit b21f7c0
Show file tree
Hide file tree
Showing 6 changed files with 3,122 additions and 38 deletions.
9 changes: 7 additions & 2 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@ const reasonGrammar = JSON.parse(
readFileSync(join(__dirname, "./reasonml.tmLanguage.json"), "utf8")
);

// https://github.com/ocamllabs/vscode-ocaml-platform/blob/master/syntaxes/dune.json
const duneGrammar = JSON.parse(
readFileSync(join(__dirname, "./dune.tmLanguage.json"), "utf8")
);

const base = process.env.BASE || "unstable";

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "Melange Documentation Site",
head:[
head: [
[
'script',
{},
Expand All @@ -28,7 +33,7 @@ export default defineConfig({
hostname: `https://melange.re/${base}/`,
},
markdown: {
languages: [reasonGrammar],
languages: [reasonGrammar, duneGrammar],
},
themeConfig: {
outline: { level: [2, 3] },
Expand Down
Loading

0 comments on commit b21f7c0

Please sign in to comment.