代码拉取完成,页面将自动刷新
/**
* Copyright (c) 2022 Peking University and Peking University Institute for Computing and Digital Economy
* SCOW is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v2 for more details.
*/
import { Options } from "@docusaurus/preset-classic";
import { Config } from "@docusaurus/types";
import { join, resolve } from "path";
import { themes } from "prism-react-renderer";
import { plugin, variables } from "./plugins/var";
const config: Config = {
title: "SCOW",
tagline: "Super Computing On Web",
url: variables.DOCS_URL,
baseUrl: variables.BASE_PATH,
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
favicon: "img/favicon.ico",
organizationName: variables.ORGANIZATION_NAME,
projectName: variables.PROJECT_NAME,
trailingSlash: false,
i18n: {
defaultLocale: "zh",
locales: ["zh"],
},
plugins: [
[require.resolve("@cmfcmf/docusaurus-search-local"), {
language: "zh",
}],
// make webpack resolve react from docs node_modules
// https://github.com/facebook/docusaurus/issues/8091#issuecomment-1269112001
() => ({
name: "resolve-react",
configureWebpack() {
return {
resolve: {
alias: {
// assuming root node_modules is up from "./packages/<your-docusaurus>
react: resolve("node_modules/react"),
},
},
};
},
}),
],
presets: [
[
"@docusaurus/preset-classic",
({
docs: {
sidebarPath: require.resolve("./sidebars.js"),
editUrl: join(variables.REPO_URL, "/edit/main/website/"),
beforeDefaultRemarkPlugins: [plugin],
},
blog: {
showReadingTime: true,
editUrl: join(variables.REPO_URL, "/edit/main/website/blog/"),
beforeDefaultRemarkPlugins: [plugin],
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
}) satisfies Options,
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: "",
logo: {
alt: "SCOW Logo",
src: "img/logo.svg",
srcDark: "img/logo_dark.svg",
},
items: [
{
type: "doc",
docId: "info/index",
position: "left",
sidebarId: "info",
label: "功能介绍",
},
{
type: "doc",
docId: "deploy/index",
position: "left",
sidebarId: "deploy",
label: "部署和配置",
},
{
type: "doc",
docId: "integration/index",
position: "left",
sidebarId: "deploy",
label: "与SCOW集成",
},
{
type: "doc",
docId: "hpccluster/index",
position: "left",
sidebarId: "hpccluster",
label: "slurm集群部署实践",
},
{
type: "doc",
docId: "contribution/index",
position: "left",
sidebarId: "contribution",
label: "贡献指南",
},
{
type: "doc",
docId: "refs/index",
position: "left",
sidebarId: "refs",
label: "配置参考",
},
{
to: "blog",
label: "博客",
position: "left",
},
{
href: variables.REPO_URL,
label: "Repo",
position: "right",
},
],
},
footer: {
style: "dark",
links: [
{
title: "Docs",
items: [
{
label: "Intro",
to: "docs/info",
},
],
},
{
title: "Community",
items: [],
},
{
title: "More",
items: [
{
label: "Blog",
to: "blog",
},
{
label: "Repo",
href: variables.REPO_URL,
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} 北京大学计算与数字经济研究院. Built with Docusaurus.`,
},
prism: {
theme: themes.github,
darkTheme: themes.dracula,
},
}),
};
export default config;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。