PHengLEI-docs/docusaurus.config.js

178 lines
5.4 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
import("@easyops-cn/docusaurus-search-local").PluginOptions;
/** @type {import('@docusaurus/types').DocusaurusConfig} */
module.exports = {
title: '风雷',
tagline:'风雷帮助中心',
url: 'https://docs.osredm.com',
baseUrl: '/phenglei',
// url: 'http://127.0.0.1:3000',
// baseUrl: '/',
onBrokenLinks: 'ignore',
onBrokenMarkdownLinks: 'ignore',
favicon: 'img/icon.ico',
organizationName: 'luffyZh', // Usually your GitHub org/user name.
projectName: 'docusaurus-luffyzh-website', // Usually your repo name.
scripts: [],
// stylesheets: ['styles/dark-mode.css'],
themeConfig: {
metadata:[
{name:"Keywords",content:"风雷,phenglei,PHengLEI,风雷帮助中心"},
{name:"hostname",content:"https://www.osredm.com/PHengLEI"},
{property:"og:site_name",content:"PHengLEI"},
{property:"og:image:alt",content:"专注于风雷软件研发及开源社区生态建设为实现我国CFD软件自主可控、自立自强贡献拳头力量"}
],
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
zoom: {
selector: '.markdown :not(em) > img',
config: {
background: {
light: 'rgb(255, 255, 255)',
dark: 'rgb(50, 50, 50)',
},
},
},
colorMode: {
defaultMode: 'light',
disableSwitch: false,
respectPrefersColorScheme: true,
},
navbar: {
style:"dark",
title: '',
logo: {
// width: '35px',
alt: 'PHengLEI',
src: 'img/fenglei.png',
href:"https://osredm.com/"
// srcDark: 'img/logo-dark.png',
},
items: [
{
type: 'doc',
docId: 'intro',
position: 'left',
label: '帮助中心'
},
// {
// href: 'https://github.com/boxyhq',
// position: 'right',
// className: 'header-github-link',
// },
],
},
footer: {
style: 'dark',
// logo:{
// src:"img/hongshan.png"
// },
// links: [
// {
// title: '社区',
// items: [
// {
// label: '网站首页',
// to: 'https://osredm.com',
// },
// {
// label: '关于我们',
// to: 'https://osredm.com/aboutus',
// },
// {
// label: '教学实践',
// to: 'https://osredm.com/educoder',
// },
// {
// label: '合作伙伴',
// to: 'https://forum.trustie.net/forums/5030/detail',
// },
// ],
// },
// {
// title: '支持与服务',
// items: [
// {
// label: 'API文档',
// to: 'https://forgeplus.trustie.net/docs/api',
// },
// {
// label: 'Git常用命令',
// to: 'https://git-scm.com',
// },
// {
// label: '引擎使用手册',
// to: 'https://forum.gitlink.org.cn/forums/7487/detail',
// },
// {
// label: '服务协议',
// to: 'https://forum.trustie.net/forums/5029/detail',
// },
// ],
// },
// {
// title: '加入我们',
// items: [
// {
// label: '官网邮箱:@',
// to:"https://osredm.com"
// },
// {
// label:'QQ群',
// to:'https://osredm.com'
// },
// {
// label:'公众号',
// to:'https://osredm.com'
// }
// ],
// },
// ],
//${new Date().getFullYear()}
copyright: `<p style="display:flex;align-items:center;justify-content:center"><img src="/phenglei/img/email.png" width="18px"/>support@osredm.com<img src="/phenglei/img/position.png" style="margin-left:20px" width="15px"/>北京市海淀区西三环北路72号</p><p style="display:flex;align-items:center;justify-content:center">版权所有:红山开源社区<img src="/phenglei/img/police.png" style="width:16px;border-radius:10px;margin-right:5px;margin-left:30px"/>京公网安备 11010802034576 号京ICP备2021005060-1</p>`,
},
},
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
// sidebarPath: require.resolve('./sidebars.js'),
editUrl:'https://osredm.com/osredm/PHengLEI-docs/tree/master/',
routeBasePath: "/",
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
],
],
themes: [
// ... Your other themes.
[
require.resolve("@easyops-cn/docusaurus-search-local"),
{
// ... Your options.
// `hashed` is recommended as long-term-cache of index file is possible.
hashed: true,
language: ["en", "zh"],
highlightSearchTermsOnTargetPage: true,
blogRouteBasePath: "/",
explicitSearchResultPath: true,
// For Docs using Chinese, The `language` is recommended to set to:
// ```
// language: ["en", "zh"],
// ```
},
],
],
i18n: {
defaultLocale: 'zh-cn',
locales: ['zh-cn'],
},
};