Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 0 additions & 3 deletions babel.config.js
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

初期からこのファイルは存在していましたが、Babelの設定をカスタマイズする際に作成するものであるという説明がドキュメントにあり、Babelの設定はカスタマイズしていないためこのファイルは不要ではないかという理由から削除しました。 cf. https://docusaurus.io/docs/configuration#customizing-babel-configuration
テンプレートにもbabel.config.jsは存在しません。 cf. https://github.com/facebook/docusaurus/tree/c6c0f636a86dfb255ff3b114a29cd86eb165424f/packages/create-docusaurus/templates

This file was deleted.

13 changes: 6 additions & 7 deletions docusaurus.config.js → docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { themes as prismThemes } from "prism-react-renderer";
import type { Config } from "@docusaurus/types";
import type * as Preset from "@docusaurus/preset-classic";
import { execSync } from "node:child_process";
import math from "remark-math";
import katex from "rehype-katex";

/** @type {import("@docusaurus/types").Config} */
const config = {
const config: Config = {
title: "ut.code(); Learn",
tagline: "ut.code(); 公式学習教材",
url: "https://learn.utcode.net/",
Expand Down Expand Up @@ -40,11 +41,10 @@ const config = {
presets: [
[
"@docusaurus/preset-classic",
/** @type {import('@docusaurus/preset-classic').Options} */
{
docs: {
showLastUpdateTime: true,
sidebarPath: "./sidebars.js",
sidebarPath: "./sidebars.ts",
editUrl: "https://github.com/ut-code/utcode-learn/blob/master/",
remarkPlugins: [math],
rehypePlugins: [katex],
Expand All @@ -58,10 +58,9 @@ const config = {
gtag: process.env.GOOGLE_ANALYTICS_TRACKING_ID && {
trackingID: process.env.GOOGLE_ANALYTICS_TRACKING_ID,
},
},
} satisfies Preset.Options,
],
],
/** @type {import("@docusaurus/preset-classic").ThemeConfig} */
themeConfig: {
docs: {
sidebar: {
Expand Down Expand Up @@ -110,7 +109,7 @@ const config = {
],
copyright: `Copyright © ${new Date().getFullYear()} ut.code();. Built with Docusaurus.`,
},
},
} satisfies Preset.ThemeConfig,
};

export default config;
62 changes: 60 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
},
"dependencies": {
"@docusaurus/core": "^3.9.1",
"@docusaurus/plugin-content-docs": "^3.9.1",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sidebars.tsでインポートしているため入れました。

"@docusaurus/preset-classic": "^3.9.1",
"@docusaurus/theme-mermaid": "^3.9.1",
"@easyops-cn/docusaurus-search-local": "^0.52.1",
Expand Down Expand Up @@ -48,7 +49,11 @@
"node": ">=18.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^3.9.1",
"@docusaurus/tsconfig": "^3.9.1",
"@docusaurus/types": "^3.9.1",
"@types/react-slick": "^0.23.13",
"prettier": "^3.6.2"
"prettier": "^3.6.2",
"typescript": "^5.9.3"
}
}
5 changes: 0 additions & 5 deletions sidebars.js

This file was deleted.

7 changes: 7 additions & 0 deletions sidebars.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import type { SidebarsConfig } from "@docusaurus/plugin-content-docs";

const sidebars: SidebarsConfig = {
sidebar: [{ type: "autogenerated", dirName: "." }],
};

export default sidebars;
Loading