174 lines
4.1 KiB
JavaScript
Executable File
174 lines
4.1 KiB
JavaScript
Executable File
// @ts-check
|
||
// `@type` JSDoc注释允许编辑器自动完成和类型检查
|
||
// (与`@ts-check`配对使用时)。
|
||
// 有多种等效的声明Docusaurus配置的方式。
|
||
// 参见:https://docusaurus.io/docs/api/docusaurus-config
|
||
|
||
import { themes as prismThemes } from 'prism-react-renderer';
|
||
|
||
|
||
/** @type {import('@docusaurus/types').Config} */
|
||
const config = {
|
||
scripts: [
|
||
|
||
],
|
||
title: 'EST', // 网站标题
|
||
tagline: '优信测资源平台', // 网站副标题
|
||
favicon: 'img/favicon.ico', // 网站图标
|
||
|
||
// 设置网站的生产URL
|
||
url: 'http://0.0.0.0',
|
||
// 设置网站在哪个路径下访问
|
||
// 对于GitHub pages部署,通常是'/<projectName>/'
|
||
baseUrl: '/',
|
||
|
||
|
||
onBrokenLinks: 'throw',
|
||
onBrokenMarkdownLinks: 'warn',
|
||
|
||
// 即使您不使用国际化,您也可以使用此字段设置有用的元数据,例如html语言。例如,如果您的网站是中文,您可能想将"en"替换为"zh-Hans"。
|
||
i18n: {
|
||
defaultLocale: 'zh-Hans', // 默认语言环境
|
||
locales: ['zh-Hans'], // 支持的语言环境
|
||
},
|
||
|
||
presets: [
|
||
[
|
||
'classic',
|
||
/** @type {import('@docusaurus/preset-classic').Options} */
|
||
({
|
||
docs: {
|
||
|
||
sidebarCollapsed: true,
|
||
sidebarPath: './sidebars.js', // 侧边栏配置文件路径
|
||
path:'docs',
|
||
|
||
|
||
},
|
||
|
||
|
||
blog: false,
|
||
// 如需要开启博客注释上面一行 打开下方代码
|
||
// blog: {
|
||
// blogTitle:'版本更新',
|
||
// showReadingTime: false,
|
||
// blogSidebarTitle: '版本更新',
|
||
|
||
// },
|
||
|
||
theme: {
|
||
customCss: './src/css/custom.css', // 自定义CSS文件路径
|
||
},
|
||
|
||
}),
|
||
],
|
||
],
|
||
|
||
themeConfig:
|
||
|
||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
||
({
|
||
customCss: require.resolve('./src/css/custom.css'),
|
||
|
||
//导航栏
|
||
navbar: {
|
||
title: 'EST', // 导航栏标题
|
||
logo: {
|
||
alt: 'EST Logo', // 导航栏Logo的alt文本
|
||
src: 'img/logo.svg', // 导航栏Logo的路径
|
||
},
|
||
items: [
|
||
{
|
||
type: 'docSidebar',
|
||
sidebarId: 'tutorialSidebar',
|
||
position: 'left',
|
||
label: '布线测试',
|
||
},
|
||
{
|
||
to: '/FlukeMoniPage',
|
||
position: 'left',
|
||
label: 'Fluke测试仪模拟器',
|
||
},
|
||
{
|
||
type: 'docSidebar',
|
||
sidebarId: 'WLANSidebar',
|
||
position: 'left',
|
||
label: 'Wi-Fi测试',
|
||
},
|
||
{
|
||
to: '/NetAllyMoniPage',
|
||
position: 'left',
|
||
label: 'NetAlly测试仪模拟器',
|
||
},
|
||
{
|
||
to: '/Office',
|
||
position: 'left',
|
||
label: '办公场景',
|
||
},
|
||
{
|
||
to: '/Industry',
|
||
position: 'left',
|
||
label: '工业场景',
|
||
},
|
||
{
|
||
to: '/DataCenter',
|
||
position: 'left',
|
||
label: '数据中心场景',
|
||
},
|
||
{
|
||
to: '/Competition',
|
||
position: 'left',
|
||
label: '竞赛模式',
|
||
},
|
||
{
|
||
to: '/CompetitionAdmin',
|
||
position: 'left',
|
||
label: '竞赛控制台',
|
||
},
|
||
{
|
||
to: '/Control',
|
||
position: 'right',
|
||
label: '控制台',
|
||
},
|
||
{
|
||
to: '/login',
|
||
position: 'right',
|
||
label: '登入/登出',
|
||
}
|
||
],
|
||
},
|
||
//侧边栏可隐藏
|
||
docs: {
|
||
sidebar: {
|
||
hideable: true,
|
||
autoCollapseCategories: true,
|
||
},
|
||
},
|
||
|
||
//页脚
|
||
footer: {
|
||
style: 'dark',
|
||
copyright : `
|
||
<p>版权所有 © 2024-${new Date().getFullYear()} 优信测 <a class="foot-text-white" ></a></p>
|
||
`,
|
||
|
||
},
|
||
prism: {
|
||
theme: prismThemes.github,
|
||
darkTheme: prismThemes.dracula,
|
||
|
||
},
|
||
|
||
|
||
colorMode: {
|
||
defaultMode: 'light',
|
||
disableSwitch: true,
|
||
},
|
||
|
||
}),
|
||
|
||
trailingSlash: false, // 禁用尾部斜杠
|
||
};
|
||
|
||
export default config;
|