NitWikit/docusaurus.config.js

161 lines
4.1 KiB
JavaScript
Raw Normal View History

2024-03-23 13:25:49 +08:00
// @ts-check
2024-04-04 10:58:19 +08:00
// `@type` JSDoc annotations allow editor autocompletion and type checking
// (when paired with `@ts-check`).
// There are various equivalent ways to declare your Docusaurus config.
// See: https://docusaurus.io/docs/api/docusaurus-config
2024-03-23 13:25:49 +08:00
2024-04-04 10:58:19 +08:00
import { themes as prismThemes } from "prism-react-renderer";
2024-03-23 13:25:49 +08:00
/** @type {import('@docusaurus/types').Config} */
const config = {
2024-04-04 10:58:19 +08:00
customFields: {
// 标题前缀
titlePrefix: "主页",
// 开始按钮文字
start: "快速开始 🥵",
},
2024-06-23 14:30:32 +08:00
title: '笨蛋 MC 开服教程',
tagline: '一群笨蛋们写的 Minecraft 开服教程',
2024-03-23 13:25:49 +08:00
favicon: 'img/favicon.ico',
// Set the production url of your site here
2024-06-15 17:01:52 +08:00
url: 'https://yizhan.wiki',
2024-03-23 13:25:49 +08:00
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
规范化 + 修复 (#81) * 规范化 (1/2) * 链接更新 * docs(contributor): contrib-readme-action has updated readme * Move plugin.yml.md * docs(contributor): contrib-readme-action has updated readme * Rename "扩展阅读" to "杂项" * Fix links * docs(contributor): contrib-readme-action has updated readme * Rename "反作弊" * docs(contributor): contrib-readme-action has updated readme * docs(contributor): contrib-readme-action has updated readme * Move 进阶教程 to 杂项 * docs(contributor): contrib-readme-action has updated readme * docs(contributor): contrib-readme-action has updated readme * Fix * docs(contributor): contrib-readme-action has updated readme * docs(contributor): contrib-readme-action has updated readme * Fix Build * docs(contributor): contrib-readme-action has updated readme * Fix again (我谢谢你啊小杰) * docs(contributor): contrib-readme-action has updated readme * Fix * docs(contributor): contrib-readme-action has updated readme * 你个老6 * 好烦 * 你别一直触发 * 删除多余文件 * Fix #82 & Optimize * 服务器核心移动到正式开服中 * Fix Build * exp * Update * Move Script to plugin * Update * Optimize * preparation * process * start * Fix * 1 * 2 * 3 * 4 * 5 * Fix build * a * a * c * 不搞了 * a * a * c * Fix * ow * 尝试支持Velcel和Pages共同作用 * Update modules * Update * 排序 * 移动 反作弊 * Move * Move deploy * c * Fix * Correct * 排序 * move todo --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-10 10:26:44 +08:00
baseUrl: process.env.BASE_URL ?? '/',
2024-03-23 13:25:49 +08:00
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'postyizhan', // Usually your GitHub org/user name.
2024-06-23 14:30:32 +08:00
projectName: '笨蛋式指南', // Usually your repo name.
2024-03-23 13:25:49 +08:00
2024-04-04 10:58:19 +08:00
onBrokenLinks: 'warn',
2024-03-23 13:25:49 +08:00
onBrokenMarkdownLinks: 'warn',
// Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'zh-Hans',
locales: ['zh-Hans'],
2024-03-23 13:25:49 +08:00
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
routeBasePath: '/',
editUrl: 'https://github.com/postyizhan/NitWikit/tree/main'
2024-03-23 13:25:49 +08:00
},
blog: false,
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
navbar: {
2024-04-05 10:34:50 +08:00
title: 'NitWikit',
2024-03-23 13:25:49 +08:00
logo: {
alt: 'Logo',
2024-05-11 20:43:30 +08:00
src: 'img/book.png',
2024-03-23 13:25:49 +08:00
},
hideOnScroll: false,
items: [
{
type: 'doc',
docId: 'intro',
position: 'left',
label: '开始',
},
// 搜索框
{
type: 'search',
position: 'right',
},
2024-04-04 10:58:19 +08:00
// Github
2024-03-23 13:25:49 +08:00
{
2024-04-05 10:34:50 +08:00
href: "https://github.com/postyizhan/NitWikit",
2024-04-04 10:58:19 +08:00
className: "header-github-link",
position: "right",
2024-03-23 13:25:49 +08:00
},
{
type: 'localeDropdown',
position: 'right',
},
],
},
// 底部链接
footer: {
style: 'dark',
links: [
{
title: '文档',
items: [
{
label: '开始',
to: '/intro',
},
],
},
{
title: '交流',
items: [
{
label: 'QQ群',
href: 'https://qm.qq.com/q/dENGavSflK',
},
],
},
{
2024-03-24 06:13:12 +08:00
title: '文档仓库',
2024-03-23 13:25:49 +08:00
items: [
{
label: 'GitHub',
2024-04-05 10:34:50 +08:00
href: 'https://github.com/postyizhan/NitWikit',
2024-03-23 13:25:49 +08:00
},
],
},
],
// 底部版权信息
2024-04-04 10:58:19 +08:00
copyright: `Copyright © ${new Date().getFullYear()} <b>postyizhan</b>, All Rights Reserved.`,
2024-03-23 13:25:49 +08:00
},
// 深浅主题
prism: {
2024-04-04 10:58:19 +08:00
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
2024-03-23 13:25:49 +08:00
},
// 颜色随系统切换
colorMode: {
respectPrefersColorScheme: true,
},
}),
2024-04-04 10:58:19 +08:00
themes: [
[
require.resolve("@easyops-cn/docusaurus-search-local"),
{
hashed: true,
2024-06-23 14:30:32 +08:00
language: ["zh"],
2024-04-04 10:58:19 +08:00
highlightSearchTermsOnTargetPage: true,
explicitSearchResultPath: true,
indexBlog: false,
docsRouteBasePath: "/"
},
2024-03-23 13:25:49 +08:00
],
2024-04-04 10:58:19 +08:00
],
2024-03-23 13:25:49 +08:00
};
2024-06-15 12:21:33 +08:00
export default config;