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-29 13:53:08 +08:00
markdown : {
mermaid : true ,
} ,
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>/'
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' ,
2024-06-30 21:54:36 +08:00
onBrokenAnchors : 'warn' ,
2024-03-23 13:25:49 +08:00
// 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".
2024-08-05 22:56:28 +08:00
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 : '/' ,
2024-06-23 22:06:26 +08:00
editUrl : 'https://github.com/postyizhan/NitWikit/tree/main' ,
showLastUpdateAuthor : true ,
showLastUpdateTime : true ,
2024-03-23 13:25:49 +08:00
} ,
blog : false ,
theme : {
customCss : require . resolve ( './src/css/custom.css' ) ,
} ,
} ) ,
] ,
] ,
2024-07-07 22:18:05 +08:00
plugins : [
[
'@docusaurus/plugin-content-docs' ,
{
id : 'docs-java' ,
path : 'docs-java' ,
2024-07-14 10:17:23 +08:00
routeBasePath : 'Java' ,
2024-07-09 17:14:10 +08:00
editUrl : 'https://github.com/postyizhan/NitWikit/tree/main' ,
2024-07-07 22:18:05 +08:00
sidebarPath : require . resolve ( './sidebars.js' ) ,
editCurrentVersion : true ,
showLastUpdateAuthor : true ,
showLastUpdateTime : true ,
} ,
] ,
[
'@docusaurus/plugin-content-docs' ,
{
id : 'docs-bedrock' ,
path : 'docs-bedrock' ,
2024-07-14 10:17:23 +08:00
routeBasePath : 'Bedrock' ,
2024-07-09 17:14:10 +08:00
editUrl : 'https://github.com/postyizhan/NitWikit/tree/main' ,
2024-07-07 22:18:05 +08:00
sidebarPath : require . resolve ( './sidebars.js' ) ,
editCurrentVersion : true ,
showLastUpdateAuthor : true ,
showLastUpdateTime : true ,
} ,
] ,
] ,
2024-03-23 13:25:49 +08:00
themeConfig :
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
( {
2024-07-29 13:15:49 +08:00
// 标题渲染范围
tableOfContents : {
minHeadingLevel : 2 ,
maxHeadingLevel : 5 ,
} ,
2024-03-23 13:25:49 +08:00
// Replace with your project's social card
2024-06-23 22:48:40 +08:00
// sidebar自动折叠
docs : {
sidebar : {
autoCollapseCategories : true ,
} ,
} ,
2024-03-23 13:25:49 +08:00
image : 'img/docusaurus-social-card.jpg' ,
2024-07-01 09:23:11 +08:00
metadata : [
2024-07-07 22:18:05 +08:00
{ name : '开服教程' , content : '一群笨蛋们写的 Minecraft 开服教程' } ,
{ name : 'MC教程' , content : '一群笨蛋们写的 Minecraft 开服教程' } ,
2024-07-01 09:23:11 +08:00
] ,
2024-03-23 13:25:49 +08:00
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' ,
2024-07-31 13:03:49 +08:00
label : '通用' ,
2024-03-23 13:25:49 +08:00
} ,
2024-07-07 22:18:05 +08:00
{
type : 'docSidebar' ,
sidebarId : 'tutorialSidebar' ,
position : 'left' ,
2024-07-15 18:38:05 +08:00
label : 'Java' ,
2024-07-07 22:18:05 +08:00
docsPluginId : 'docs-java'
} ,
{
type : 'docSidebar' ,
sidebarId : 'tutorialSidebar' ,
position : 'left' ,
2024-07-15 18:38:05 +08:00
label : 'Bedrock' ,
2024-07-07 22:18:05 +08:00
docsPluginId : 'docs-bedrock'
} ,
2024-03-23 13:25:49 +08:00
// 搜索框
{
type : 'search' ,
position : 'right' ,
} ,
2024-07-29 12:43:08 +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
} ,
2024-08-05 22:56:28 +08:00
// 顶部导航栏显示切换语言按钮
// {
// type: 'localeDropdown',
// position: 'right',
// },
2024-03-23 13:25:49 +08:00
] ,
} ,
// 底部链接
footer : {
style : 'dark' ,
links : [
{
title : '文档' ,
items : [
{
label : '开始' ,
to : '/intro' ,
} ,
2024-07-24 10:50:16 +08:00
{
label : 'GitHub' ,
href : 'https://github.com/postyizhan/NitWikit' ,
} ,
2024-03-23 13:25:49 +08:00
] ,
} ,
{
title : '交流' ,
items : [
{
label : 'QQ群' ,
href : 'https://qm.qq.com/q/dENGavSflK' ,
} ,
] ,
} ,
{
2024-07-24 10:50:16 +08:00
title : '友链' ,
2024-03-23 13:25:49 +08:00
items : [
{
2024-07-24 10:50:16 +08:00
label : '服主资源导航页' ,
href : 'http://nav.yumc.fun' ,
} ,
{
label : 'CSKB 日冕知识库' ,
href : 'https://kb.corona.studio' ,
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-08-07 19:01:28 +08:00
// 搜索
algolia : {
// The application ID provided by Algolia
appId : 'D1KV1BYF3B' ,
// Public API key: it is safe to commit it
apiKey : '4bb3573e59f2c49f30f057ce54edab3f' ,
indexName : 'yizhan' ,
// Optional: see doc section below
contextualSearch : true ,
// Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them.
externalUrlRegex : 'external\\.com|domain\\.com' ,
// Optional: Replace parts of the item URLs from Algolia. Useful when using the same search index for multiple deployments using a different baseUrl. You can use regexp or string in the `from` param. For example: localhost:3000 vs myCompany.com/docs
replaceSearchResultPathname : {
from : '/docs/' , // or as RegExp: /\/docs\//
to : '/' ,
} ,
// Optional: Algolia search parameters
searchParameters : { } ,
// Optional: path for search page that enabled by default (`false` to disable it)
searchPagePath : 'search' ,
// Optional: whether the insights feature is enabled or not on Docsearch (`false` by default)
insights : false ,
} ,
2024-03-23 13:25:49 +08:00
} ) ,
2024-04-04 10:58:19 +08:00
themes : [
2024-08-09 19:21:57 +08:00
'@docusaurus/theme-mermaid'
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 ;