Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { themes as prismThemes } from "prism-react-renderer";
import type { Config } from "@docusaurus/types";
import type * as Preset from "@docusaurus/preset-classic";
import rehypeShiki, { RehypeShikiOptions } from "@shikijs/rehype";
import { BundledLanguage, bundledLanguages, ShikiTransformer } from "shiki";
// import talonLanguage from "./talon.tmLanguage.json" ;
import { transformerColorizedBrackets } from "@shikijs/colorized-brackets";
import { transformerNotationHighlight } from "@shikijs/transformers";

const config: Config = {
title: "Talon Community Wiki",
Expand Down Expand Up @@ -39,6 +43,23 @@ const config: Config = {
sidebarPath: "./sidebars.ts",
// Remove this to remove the "edit this page" links.
editUrl: "https://github.com/TalonCommunity/Wiki/edit/main/",
beforeDefaultRehypePlugins: [
[
// customRehypeShiki,
rehypeShiki,
{
themes: {
light: "catppuccin-latte",
dark: "catppuccin-macchiato",
},
inline: "tailing-curly-colon",
transformers: [
// transformerColorizedBrackets() as unknown as ShikiTransformer,
],
langs: Object.keys(bundledLanguages) as BundledLanguage[],
} satisfies RehypeShikiOptions,
],
],
},
theme: {
customCss: "./src/css/custom.css",
Expand Down Expand Up @@ -171,11 +192,6 @@ const config: Config = {
],
copyright: `Copyright © ${new Date().getFullYear()} Talon Community`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: ["talon"],
},
colorMode: {
respectPrefersColorScheme: true,
},
Expand Down
Loading