Skip to content

Commit

Permalink
chore(deps): Docusaurus v3! (#534)
Browse files Browse the repository at this point in the history
* chore(deps): Docusaurus v3!

* prettify code

* fix misinterpretation of `<` (U+003C)
  • Loading branch information
qwerzl authored Sep 25, 2023
1 parent 8e1c47e commit 6afa114
Show file tree
Hide file tree
Showing 5 changed files with 3,703 additions and 925 deletions.
2 changes: 1 addition & 1 deletion docs/about-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license: Creative Commons Attribution 4.0 International License

### 我们的名字

**C 社 << Computerization << 世外信息化社** 我们的全称是 Computerization,世外信息化社;不过我们更喜欢被称之为 C 社,一是因为简洁明快,二也是因为与 C 语言同名(笑)
**C 社 {'<<'} Computerization {'<<'} 世外信息化社** 我们的全称是 Computerization,世外信息化社;不过我们更喜欢被称之为 C 社,一是因为简洁明快,二也是因为与 C 语言同名(笑)

### 我们对 CS 的看法

Expand Down
234 changes: 120 additions & 114 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,128 +1,134 @@
const remarkMath = require("remark-math");
const rehypeKatex = require("rehype-katex");
const githubTheme = require("prism-react-renderer/themes/github");
const draculaTheme = require("prism-react-renderer/themes/dracula");

module.exports = {
title: "Computerization",
tagline: "C社 << Computerization << 世外信息化社",
url: "https://computerization.io",
baseUrl: "/",
favicon: "img/favicon/favicon.ico",
trailingSlash: true,
i18n: {
defaultLocale: "zh-Hans",
locales: ["zh-Hans", "en"],
localeConfigs: {
"zh-Hans": {
label: "中文(简体)",
},
en: {
label: "English",
},
},
},
plugins: ["alumni"],
themeConfig: {
announcementBar: {
id: "join_us",
content:
'<b>🎉 C社2023届开始招新啦</b>! <a target="_blank" rel="noopener noreferrer" href="https://mp.weixin.qq.com/s/K-qGy7XPybCxq0WBl9DV0A">了解更多</a>',
backgroundColor: "#22292f",
textColor: "#FFFFFF",
isCloseable: false,
},
navbar: {
title: "世外信息化社",
logo: {
alt: "Computerization Logo",
src: "img/logo.svg",
srcDark: "img/logo.svg",
},

items: [
{ to: "alumni", label: "往届成员", position: "left" },
{ to: "docs/about-us", label: "文档", position: "left" },
{ to: "blog", label: "博客", position: "left" },
{
type: "localeDropdown",
position: "right",
module.exports = async function createConfigAsync() {
return {
title: "Computerization",
tagline: "C社 << Computerization << 世外信息化社",
url: "https://computerization.io",
baseUrl: "/",
favicon: "img/favicon/favicon.ico",
trailingSlash: true,
i18n: {
defaultLocale: "zh-Hans",
locales: ["zh-Hans", "en"],
localeConfigs: {
"zh-Hans": {
label: "中文(简体)",
},
{
href: "https://github.com/Computerization",
label: "GitHub",
position: "right",
en: {
label: "English",
},
],
},
},
footer: {
style: "dark",
links: [
{
title: "文档",
items: [
{
label: "文档",
to: "docs/about-us",
},
],
},
{
title: "社区",
items: [
{
label: "GitHub",
href: "https://github.com/Computerization",
},
],
plugins: ["alumni"],
themeConfig: {
announcementBar: {
id: "join_us",
content:
'<b>🎉 C社2023届开始招新啦</b>! <a target="_blank" rel="noopener noreferrer" href="https://mp.weixin.qq.com/s/K-qGy7XPybCxq0WBl9DV0A">了解更多</a>',
backgroundColor: "#22292f",
textColor: "#FFFFFF",
isCloseable: false,
},
navbar: {
title: "世外信息化社",
logo: {
alt: "Computerization Logo",
src: "img/logo.svg",
srcDark: "img/logo.svg",
},
{
title: "社交",
items: [
{
label: "博客",
to: "blog",
},
],

items: [
{ to: "alumni", label: "往届成员", position: "left" },
{ to: "docs/about-us", label: "文档", position: "left" },
{ to: "blog", label: "博客", position: "left" },
{
type: "localeDropdown",
position: "right",
},
{
href: "https://github.com/Computerization",
label: "GitHub",
position: "right",
},
],
},
footer: {
style: "dark",
links: [
{
title: "文档",
items: [
{
label: "文档",
to: "docs/about-us",
},
],
},
{
title: "社区",
items: [
{
label: "GitHub",
href: "https://github.com/Computerization",
},
],
},
{
title: "社交",
items: [
{
label: "博客",
to: "blog",
},
],
},
],
logo: {
alt: "Computerization Logo",
src: "img/logo.svg",
},
],
logo: {
alt: "Computerization Logo",
src: "img/logo.svg",
copyright: `世外信息化社 © ${new Date().getFullYear()} 版权所有. 使用 Docusaurus 搭建.`,
},
prism: {
theme: githubTheme,
darkTheme: draculaTheme,
},
copyright: `世外信息化社 © ${new Date().getFullYear()} 版权所有. 使用 Docusaurus 搭建.`,
},
prism: {
theme: githubTheme,
darkTheme: draculaTheme,
},
},
stylesheets: [
{
href: "https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css",
type: "text/css",
integrity:
"sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X",
crossorigin: "anonymous",
},
],
presets: [
[
"classic",
stylesheets: [
{
docs: {
sidebarPath: require.resolve("./sidebars.js"),
remarkPlugins: [remarkMath],
rehypePlugins: [[rehypeKatex, { strict: false }]],
},
blog: {
remarkPlugins: [remarkMath],
rehypePlugins: [[rehypeKatex, { strict: false }]],
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
href: "https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css",
type: "text/css",
integrity:
"sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X",
crossorigin: "anonymous",
},
],
],
presets: [
[
"classic",
{
docs: {
sidebarPath: require.resolve("./sidebars.js"),
remarkPlugins: [(await import("remark-math")).default],
rehypePlugins: [
(await import("rehype-katex")).default,
{ strict: false },
],
},
blog: {
remarkPlugins: [(await import("remark-math")).default],
rehypePlugins: [
(await import("rehype-katex")).default,
{ strict: false },
],
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
},
],
],
};
};
2 changes: 1 addition & 1 deletion i18n/en/docusaurus-plugin-content-docs/current/about-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ We are a refined CS community always working behind the scenes to provide commun

### Our Name

**C 社 << Computerization << 世外信息化社** Our full name is the Computerization club, 世外信息化社; But we would prefer to be called Computerization (in Chinese, C 社), since it's more concise, plus it has the same name as the C Programming Language (\*Laugh\*) Our English name, though, is always Computerization.
**C 社 {'<<'} Computerization {'<<'} 世外信息化社** Our full name is the Computerization club, 世外信息化社; But we would prefer to be called Computerization (in Chinese, C 社), since it's more concise, plus it has the same name as the C Programming Language (\*Laugh\*) Our English name, though, is always Computerization.

### Our opinion on CS

Expand Down
23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@
"prepare": "husky install"
},
"dependencies": {
"@docusaurus/core": "latest",
"@docusaurus/preset-classic": "latest",
"@docusaurus/theme-classic": "latest",
"@mdx-js/react": "1.6.22",
"@docusaurus/core": "3.0.0-beta.0",
"@docusaurus/preset-classic": "3.0.0-beta.0",
"@docusaurus/theme-classic": "3.0.0-beta.0",
"@mdx-js/react": "2.3.0",
"clsx": "2.0.0",
"docusaurus-plugin-alumni": "0.0.0",
"prism-react-renderer": "1.3.3",
"react": "18.1.0",
"react-dom": "18.1.0",
"rehype-katex": "5.0.0",
"remark-math": "3.0.1"
"react": "18.0.0",
"react-dom": "18.0.0",
"rehype-katex": "^6.0.3",
"remark-math": "^5.1.1"
},
"browserslist": {
"production": [
Expand All @@ -44,9 +44,10 @@
]
},
"devDependencies": {
"@docusaurus/module-type-aliases": "latest",
"@docusaurus/types": "latest",
"@tsconfig/docusaurus": "2.0.0",
"@docusaurus/eslint-plugin": "3.0.0-beta.0",
"@docusaurus/module-type-aliases": "3.0.0-beta.0",
"@docusaurus/tsconfig": "3.0.0-beta.0",
"@docusaurus/types": "3.0.0-beta.0",
"@types/node": "18.17.17",
"@types/react": "18.0.12",
"@typescript-eslint/eslint-plugin": "5.27.1",
Expand Down
Loading

0 comments on commit 6afa114

Please sign in to comment.