|
1 |
| -import { themes as prismThemes } from "prism-react-renderer"; |
2 | 1 | import type { Config } from "@docusaurus/types";
|
3 | 2 | import type * as Preset from "@docusaurus/preset-classic";
|
| 3 | +import rehypeShiki, { RehypeShikiOptions } from "@shikijs/rehype"; |
| 4 | +import { BundledLanguage, bundledLanguages, ShikiTransformer } from "shiki"; |
| 5 | +// import talonLanguage from "./talon.tmLanguage.json" ; |
| 6 | +import { transformerColorizedBrackets } from "@shikijs/colorized-brackets"; |
| 7 | +import { transformerNotationHighlight } from "@shikijs/transformers"; |
4 | 8 |
|
5 | 9 | const config: Config = {
|
6 | 10 | title: "Talon Community Wiki",
|
@@ -39,6 +43,23 @@ const config: Config = {
|
39 | 43 | sidebarPath: "./sidebars.ts",
|
40 | 44 | // Remove this to remove the "edit this page" links.
|
41 | 45 | editUrl: "https://github.com/TalonCommunity/Wiki/edit/main/",
|
| 46 | + beforeDefaultRehypePlugins: [ |
| 47 | + [ |
| 48 | + // customRehypeShiki, |
| 49 | + rehypeShiki, |
| 50 | + { |
| 51 | + themes: { |
| 52 | + light: "catppuccin-latte", |
| 53 | + dark: "catppuccin-macchiato", |
| 54 | + }, |
| 55 | + inline: "tailing-curly-colon", |
| 56 | + transformers: [ |
| 57 | + // transformerColorizedBrackets() as unknown as ShikiTransformer, |
| 58 | + ], |
| 59 | + langs: Object.keys(bundledLanguages) as BundledLanguage[], |
| 60 | + } satisfies RehypeShikiOptions, |
| 61 | + ], |
| 62 | + ], |
42 | 63 | },
|
43 | 64 | theme: {
|
44 | 65 | customCss: "./src/css/custom.css",
|
@@ -171,11 +192,6 @@ const config: Config = {
|
171 | 192 | ],
|
172 | 193 | copyright: `Copyright © ${new Date().getFullYear()} Talon Community`,
|
173 | 194 | },
|
174 |
| - prism: { |
175 |
| - theme: prismThemes.github, |
176 |
| - darkTheme: prismThemes.dracula, |
177 |
| - additionalLanguages: ["talon"], |
178 |
| - }, |
179 | 195 | colorMode: {
|
180 | 196 | respectPrefersColorScheme: true,
|
181 | 197 | },
|
|
0 commit comments