Skip to content

Commit 19e16e9

Browse files
committed
add grouping to sidebar
1 parent f66e902 commit 19e16e9

12 files changed

+281
-2025
lines changed

apps/website/docs/guide/01-installation.mdx renamed to apps/website/docs/guide/01-getting-started/01-introduction.mdx

+6-23
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
---
2-
title: Installation
3-
description: Learn how to install CommandKit.
2+
title: Introduction
3+
description: A brief intro to CommandKit
44
---
55

6-
import Tabs from '@theme/Tabs';
7-
import TabItem from '@theme/TabItem';
8-
9-
# Installation
6+
:::info
7+
The following documentation is for the upcoming v1 release of CommandKit and currently incomplete. To get support for v0.1.10, use [this guide](/docs/guide/installation).
8+
:::
109

1110
<div
1211
align="center"
@@ -45,20 +44,4 @@ import TabItem from '@theme/TabItem';
4544
</div>
4645
</div>
4746

48-
To install CommandKit, run one of the following commands based on your preferred package manager:
49-
50-
```bash npm2yarn
51-
npm install commandkit
52-
```
53-
54-
## Development version
55-
56-
To install the development version of CommandKit, run one of the following commands:
57-
58-
```bash npm2yarn
59-
npm install commandkit@dev
60-
```
61-
62-
:::warning
63-
The development version is likely to have bugs.
64-
:::
47+
CommandKit is a powerful framework for building Discord bots.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: Setup CommandKit
3+
description: Setup a new CommandKit project manually, or using the create-commandkit CLI
4+
---
5+
6+
You can quickly setup a new CommandKit project using `create-commandkit` — a command-line utility used for creating new discord.js applications with CommandKit. To get started, run the following command:
7+
8+
```bash npm2yarn
9+
npx create-commandkit@latest
10+
```
11+
12+
This will start the CLI in the current directory which will help you quickly setup a base CommandKit project.
13+
14+
## Development version
15+
16+
If you'd like to try the latest development builds, you can use the `@dev` tag when setting up a CommandKit project using the CLI.
17+
18+
:::warning
19+
The development version is likely to have bugs.
20+
:::
21+
22+
```bash npm2yarn
23+
npx create-commandkit@dev
24+
```

apps/website/docs/guide/03-getting-started.mdx renamed to apps/website/docs/guide/01-getting-started/03-setup-commandkit-manually.mdx

+4-15
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
11
---
2-
title: Getting Started
3-
description: Get started with CommandKit.
2+
title: Setup CommandKit manually
3+
description: Learn how to install CommandKit.
44
---
55

6-
# Getting Started
7-
8-
CommandKit is a powerful framework for building Discord bots. In this guide, we'll walk you through the process of getting started with CommandKit.
9-
10-
## Prerequisites
11-
12-
Before you begin, make sure you have installed `discord.js` and `commandkit` in your project.
13-
14-
## Building a simple bot
15-
16-
:::info
17-
It is recommended to use `modules` instead of `commonjs` for commandkit projects. CommandKit will allow you to use both `require` and `import` in `modules` projects.
18-
:::
6+
import Tabs from '@theme/Tabs';
7+
import TabItem from '@theme/TabItem';
198

209
First of all, create a `commandkit.config.ts` at the root of your project. This file is used to configure CommandKit and its plugins.
2110

apps/website/docs/guide/04-buttonkit.mdx renamed to apps/website/docs/guide/02-components/01-buttonkit.mdx

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
---
2-
title: Using ButtonKit
2+
title: ButtonKit
33
description: ButtonKit is an enhanced version of the native Discord.js ButtonBuilder, designed to simplify the process of creating and handling button interactions in your Discord bot.
44
---
55

66
import Tabs from '@theme/Tabs';
77
import TabItem from '@theme/TabItem';
88

9-
# Using ButtonKit
10-
119
ButtonKit extends Discord.js's [`ButtonBuilder`](https://discord.js.org/docs/packages/builders/1.9.0/ButtonBuilder:Class) to provide a simpler way to handle button interactions. It adds methods like `onClick()` to handle button clicks without manually setting up collectors.
1210

1311
## Basic Usage

apps/website/docs/guide/05-modalkit.mdx renamed to apps/website/docs/guide/02-components/02-modalkit.mdx

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
---
2-
title: Using ModalKit
2+
title: ModalKit
33
description: ModalKit is an enhanced version of the native Discord.js ModalBuilder, designed to simplify the process of creating and handling modal submissions in your Discord bot.
44
---
55

66
import Tabs from '@theme/Tabs';
77
import TabItem from '@theme/TabItem';
88

9-
# Using ModalKit
10-
119
ModalKit is an enhanced version of the native Discord.js [`ModalBuilder`](https://discord.js.org/docs/packages/builders/1.9.0/ModalBuilder:Class), designed to simplify the process of creating and handling modal submissions in your Discord bot.
1210

1311
## Creating and handling modals

apps/website/docs/guide/02-create-commandkit.mdx

-42
This file was deleted.

apps/website/docs/guide/06-using-cli.mdx renamed to apps/website/docs/guide/03-using-cli.mdx

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ title: Using CommandKit CLI
33
description: Learn how to use CommandKit CLI to start, build, and manage your bot application.
44
---
55

6-
# Using CommandKit CLI
7-
86
CommandKit CLI allows you to start, build, and manage your bot application. It also includes features such as HMR during development, anti-crash, etc. so you can be rest assured your bot won't crash and go offline during production.
97

108
To get a list of the available CLI commands, run the following command inside your project directory:

apps/website/docs/guide/07-commandkit-config.mdx renamed to apps/website/docs/guide/04-commandkit-config.mdx

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ title: CommandKit config file
33
description: Learn how to configure CommandKit CLI for your project.
44
---
55

6-
# CommandKit Configuration
7-
86
CommandKit CLI can be configured using `commandkit.config` file in the root of your project directory (for example, by `package.json`). You can use either of the following files:
97

108
- `commandkit.config.js`

apps/website/docs/guide/08-caching.mdx renamed to apps/website/docs/guide/05-caching.mdx

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ title: Caching
33
description: A guide on how to implement caching in your bot using CommandKit.
44
---
55

6-
# Caching
7-
86
Caching is a technique used to store data in a temporary storage to reduce the time it takes to fetch the data from the original source. This can be useful in Discord bots to reduce the number of database queries or external API calls.
97

108
CommandKit provides an easy way to implement caching in your bot without having to worry about the underlying implementation. This guide will show you how to use the caching feature in CommandKit.

apps/website/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"docgen": "tsx ./scripts/docgen.ts"
1717
},
1818
"dependencies": {
19-
"@docusaurus/core": "3.6.3",
20-
"@docusaurus/preset-classic": "3.6.3",
19+
"@docusaurus/core": "3.7.0",
20+
"@docusaurus/preset-classic": "3.7.0",
2121
"@docusaurus/theme-search-algolia": "^3.7.0",
2222
"@mdx-js/react": "^3.0.0",
2323
"clsx": "^2.0.0",
@@ -26,10 +26,10 @@
2626
"react-dom": "^18.0.0"
2727
},
2828
"devDependencies": {
29-
"@docusaurus/module-type-aliases": "3.6.3",
30-
"@docusaurus/remark-plugin-npm2yarn": "^3.6.3",
31-
"@docusaurus/tsconfig": "3.6.3",
32-
"@docusaurus/types": "3.6.3",
29+
"@docusaurus/module-type-aliases": "3.7.0",
30+
"@docusaurus/remark-plugin-npm2yarn": "^3.7.0",
31+
"@docusaurus/tsconfig": "3.7.0",
32+
"@docusaurus/types": "3.7.0",
3333
"autoprefixer": "^10.4.20",
3434
"micro-docgen": "^0.3.5",
3535
"postcss": "^8.4.49",

apps/website/sidebars.ts

+19-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,30 @@
11
import type { SidebarsConfig } from '@docusaurus/plugin-content-docs';
22

33
const sidebars: SidebarsConfig = {
4+
// NOTE: The number prefixed in the folder/file names are ignored by Docusaurus.
5+
// E.g.: guide/01-getting-started/01-introduction.mdx will have go under `items` as guide/getting-started/introduction
46
guide: [
57
{
6-
type: 'autogenerated',
7-
dirName: 'guide',
8+
type: 'category',
9+
label: 'Getting Started',
10+
items: [
11+
'guide/getting-started/introduction',
12+
'guide/getting-started/setup-commandkit',
13+
'guide/getting-started/setup-commandkit-manually',
14+
],
815
},
9-
],
10-
api: [
1116
{
12-
type: 'autogenerated',
13-
dirName: 'api-reference',
17+
type: 'category',
18+
label: 'Components',
19+
items: [
20+
'guide/components/buttonkit',
21+
'guide/components/modalkit',
22+
//
23+
],
1424
},
25+
'guide/using-cli',
26+
'guide/commandkit-config',
27+
'guide/caching',
1528
],
1629
};
1730

0 commit comments

Comments
 (0)