1- const { execSync } = require ( "node:child_process" ) ;
2- const math = require ( "remark-math" ) ;
3- const katex = require ( "rehype-katex" ) ;
1+ import { themes as prismThemes } from "prism-react-renderer" ;
2+ import { execSync } from "node:child_process" ;
3+ import math from "remark-math" ;
4+ import katex from "rehype-katex" ;
45
56/** @type {import("@docusaurus/types").Config } */
6- module . exports = {
7+ const config = {
78 title : "ut.code(); Learn" ,
89 tagline : "ut.code(); 公式学習教材" ,
910 url : "https://learn.utcode.net/" ,
@@ -30,15 +31,15 @@ module.exports = {
3031 {
3132 docs : {
3233 showLastUpdateTime : true ,
33- sidebarPath : require . resolve ( "./sidebars.js" ) ,
34+ sidebarPath : "./sidebars.js" ,
3435 editUrl : "https://github.com/ut-code/utcode-learn/blob/develop/" ,
3536 remarkPlugins : [ math ] ,
3637 rehypePlugins : [ katex ] ,
3738 } ,
3839 theme : {
3940 customCss : [
40- require . resolve ( "./node_modules/katex/dist/katex.min.css" ) ,
41- require . resolve ( "./src/css/custom.css" ) ,
41+ "./node_modules/katex/dist/katex.min.css" ,
42+ "./src/css/custom.css" ,
4243 ] ,
4344 } ,
4445 } ,
@@ -52,7 +53,7 @@ module.exports = {
5253 } ,
5354 } ,
5455 prism : {
55- theme : require ( "prism-react-renderer" ) . themes . github ,
56+ theme : prismThemes . github ,
5657 } ,
5758 navbar : {
5859 title : "ut.code(); Learn" ,
@@ -95,3 +96,5 @@ module.exports = {
9596 } ,
9697 } ,
9798} ;
99+
100+ export default config ;
0 commit comments