跳到主要内容

文档

[INFO] Inside that directory, you can run several commands:

`npm start`
Starts the development server.

`npm run build`
Bundles your website into static files for production.

`npm run serve`
Serves the built website locally.

`npm run deploy`
Publishes the website to GitHub pages.

We recommend that you begin by typing:

`cd PokemonWiki`
`npm start`

Happy building awesome websites!

配置

侧边栏

sidebarsPokemon.ts
// Pokemon侧边栏配置

/**
* @type {import('@docusaurus/plugin-content-docs').SidebarsConfig}
*/
const sidebars = {
// =====================
// Pokémon指南
// =====================
guideSidebar: [
{
type: 'category',
label: '第三世代',
// link: {
// type: 'doc',
// id: 'gen3/index', // 索引
// },
items: [
'gen3/rs',
'gen3/frlg',
'gen3/e',
],
},
{
type: 'category',
label: '第八世代',
// link: {
// type: 'doc',
// id: 'gen8/index', // 索引
// },
items: [
'gen8/swsh',
'gen8/la',
'gen8/bdsp',
],
},
{
type: 'category',
label: '第九世代',
// link: {
// type: 'doc',
// id: 'gen9/index', // 索引
// },
items: [
'gen9/sv',
'gen9/za',
],
},
],

// =====================
// Pokémon缎带
// =====================
ribbonSidebar: [
{
type: 'category',
label: '第八世代',
items: [
'gen8/swsh-ribbon',
'gen8/bdsp-ribbon',
'gen8/la-ribbon',
],
},
{
type: 'category',
label: '第九世代',
items: [
'gen9/sv-ribbon',
],
},
],

// =====================
// Pokémon乱数
// =====================
rngSidebar: [
{
type: 'category',
label: '第八世代',
items: [
'gen8/swsh-rng',
'gen8/bdsp-rng',
'gen8/la-rng',
],
},
{
type: 'category',
label: '第九世代',
items: [
'gen9/sv-rng',
],
},
],
};

module.exports = sidebars;

/pokemon/gen3/emerald.md
---
sidebar_label: '绿宝石'
---


/pokemon/gen3/index.md
---
# 索引页面
title: 第三世代
slug: /gen3
displayed_sidebar: guideSidebar # 强制指定显示侧边栏
---

这里是第三世代的概述内容...

import DocCardList from '@theme/DocCardList';

<DocCardList />

_category_.json
{
"label": "第三世代",
"position": 3,
"link": {
"type": "doc",
"id": "gen3/index"
}
}