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
19 changes: 11 additions & 8 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
const { execSync } = require("node:child_process");
const math = require("remark-math");
const katex = require("rehype-katex");
import { themes as prismThemes } from "prism-react-renderer";
import { execSync } from "node:child_process";
import math from "remark-math";
import katex from "rehype-katex";

/** @type {import("@docusaurus/types").Config} */
module.exports = {
const config = {
title: "ut.code(); Learn",
tagline: "ut.code(); 公式学習教材",
url: "https://learn.utcode.net/",
Expand All @@ -30,15 +31,15 @@ module.exports = {
{
docs: {
showLastUpdateTime: true,
sidebarPath: require.resolve("./sidebars.js"),
sidebarPath: "./sidebars.js",
editUrl: "https://github.com/ut-code/utcode-learn/blob/develop/",
remarkPlugins: [math],
rehypePlugins: [katex],
},
theme: {
customCss: [
require.resolve("./node_modules/katex/dist/katex.min.css"),
require.resolve("./src/css/custom.css"),
"./node_modules/katex/dist/katex.min.css",
"./src/css/custom.css",
],
},
},
Expand All @@ -52,7 +53,7 @@ module.exports = {
},
},
prism: {
theme: require("prism-react-renderer").themes.github,
theme: prismThemes.github,
},
navbar: {
title: "ut.code(); Learn",
Expand Down Expand Up @@ -95,3 +96,5 @@ module.exports = {
},
},
};

export default config;
4 changes: 3 additions & 1 deletion sidebars.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module.exports = {
const sidebars = {
sidebar: [{ type: "autogenerated", dirName: "." }],
};

export default sidebars;