Ai
1 Star 0 Fork 0

北京大学计算与数字经济研究院/SCOW

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
docusaurus.config.ts 4.79 KB
一键复制 编辑 原始数据 按行查看 历史
/**
* 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;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/pku_icode/SCOW.git
git@gitee.com:pku_icode/SCOW.git
pku_icode
SCOW
SCOW
master

搜索帮助