Skip to content

Commit 1b1f1fe

Browse files
authored
Docs Platform Migration (#7938)
* Mintlify migration * remove checklinks * Remove old changelog format * Added Next Gen Docs
1 parent 8e84442 commit 1b1f1fe

File tree

839 files changed

+23193
-14305
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

839 files changed

+23193
-14305
lines changed

.github/workflows/docs.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ jobs:
2222
with:
2323
node-version: 20
2424
cache: npm
25+
cache-dependency-path: tools/package-lock.json
2526

2627
- name: Install dependencies
2728
run: npm ci
29+
working-directory: tools
2830

2931
- name: Check Markdown Tables
30-
run: |
31-
shopt -s globstar
32-
npx markdown-table-formatter docs/**/*.{md,mdx} --check
33-
shell: bash
32+
run: npm run test:tables
33+
working-directory: tools

.github/workflows/test.yaml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,13 @@ jobs:
1919
with:
2020
node-version: 20
2121
cache: npm
22+
cache-dependency-path: tools/package-lock.json
2223
- run: npm ci
24+
working-directory: tools
2325
- run: npm run lint
26+
working-directory: tools
2427
- run: npm run build
25-
links:
26-
name: Check Links
27-
runs-on: ubuntu-latest
28-
steps:
29-
- uses: actions/checkout@v5
30-
- uses: actions/setup-node@v5
31-
with:
32-
node-version: 20
33-
cache: npm
34-
- run: npm ci
35-
- run: npm run test:links
28+
working-directory: tools
3629
mdx:
3730
name: Validate mdx
3831
runs-on: ubuntu-latest
@@ -42,5 +35,8 @@ jobs:
4235
with:
4336
node-version: 20
4437
cache: npm
38+
cache-dependency-path: tools/package-lock.json
4539
- run: npm ci
40+
working-directory: tools
4641
- run: npm run test:build
42+
working-directory: tools

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
node_modules/
44
dist/
55
.idea
6-
xml_output/
6+
xml_output/

.prettierignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

CONTRIBUTING.md

Lines changed: 8 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -22,82 +22,13 @@ See the [README](https://github.com/discord/discord-api-docs/blob/main/README.md
2222

2323
## Markdown Syntax
2424

25-
This repository uses special markdown syntax that helps style the resulting web version of the documentation.
25+
Our documentation uses standard [Markdown](https://www.markdownguide.org/basic-syntax/) syntax with some additional [MDX](https://mdxjs.com/) features.
2626

27-
### H6 Headings
27+
We also support the following formatting from Mintlify:
2828

29-
H6 headings should be used above tables and code blocks to properly label them.
30-
31-
### Linking
32-
33-
Links between docs can be achieved by using a hash symbol (#), plus the markdown file name, plus a slash, and finally the dash-separated anchor. For instance, to link to the above H6 heading section:
34-
35-
```md
36-
[Links to README.md H6](#README/h6-headings)
37-
```
38-
39-
### Alert Boxes
40-
41-
Alert boxes are created by placing a line with 3 colons (`:::`) before and after the text. The first 3 colons must be followed by a label specifying the alert box type. For example, to create a warning alert:
42-
43-
```
44-
:::warn
45-
Something that requires warning here
46-
:::
47-
```
48-
49-
Currently the following types are available: `info`, `warn`, `danger` and `preview`
50-
51-
![Available alert types](static/images/alerts.webp)
52-
53-
### MDX Components
54-
55-
There are a few reusable MDX components that can be used on pages with the `mdx` extension.
56-
57-
#### Collapsibles
58-
59-
Collapsibles allow you to show/hide content on a page that may be secondary to the page's primary content. They have four fields that can be set: `title`, `description`, `icon`, and an `open` flag (which makes the collapsible element open by default).
60-
61-
Available options for `icon`:
62-
63-
- `"list"`
64-
- `"view"`
65-
- `"question"`
66-
- `"code"`
67-
- `"warning"`
68-
69-
###### Example
70-
71-
![Collapsible MDX Component with the list icon](static/images/mdx-collapsible.webp)
72-
73-
```markdown
74-
<Collapsible title="Title" description="Description text" icon="list">
75-
Collapsed content
76-
</Collapsible>
77-
```
78-
79-
#### Buttons
80-
81-
Buttons are simply... clickable buttons. They take `href` and `color` as arguments, but currently we only use `"brand"` as a value for `color`.
82-
83-
###### Example
84-
85-
![Button MDX Component](static/images/mdx-button.webp)
86-
87-
```markdown
88-
<LinkButton to="https://discord.com/developers/docs/getting-started" color="brand" text="click the button!" />
89-
```
90-
91-
#### Cards
92-
93-
Cards let you display links in a card format. They accept two arguments, `title` and `link`.
94-
95-
###### Example
96-
97-
![Card MDX Component](static/images/mdx-card.webp)
98-
99-
```markdown
100-
<Card title="Card Title" link="https://discord.com/developers/docs/getting-started">
101-
This is the content inside of the card~
102-
</Card>
103-
```
29+
- [Format Text](https://www.mintlify.com/docs/create/text)
30+
- [Format Code](https://www.mintlify.com/docs/create/code)
31+
- [Images & Embeds](https://www.mintlify.com/docs/create/image-embeds)
32+
- [Files](https://www.mintlify.com/docs/create/files)
33+
- [Lists & Tables](https://www.mintlify.com/docs/create/list-table)
34+
- [Available Components](https://www.mintlify.com/docs/components/accordions)

README.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,36 @@
1-
# Discord API Documentation
1+
# Discord for Developers Documentation
22

3-
This repo contains the official Discord API documentation, which can be viewed online [HERE](https://discord.com/developers/docs/intro). Before submitting pull-requests, please remember to _fully_ read the [Contributing](CONTRIBUTING.md) guidelines.
3+
This repo contains the official Discord for Developers documentation, which can be viewed online [HERE](https://discord.com/developers/docs/intro). Before submitting pull-requests, please remember to _fully_ read the [Contributing](CONTRIBUTING.md) guidelines.
44

5-
This repository reflects the Discord API as it is meant to be accessed by third-party applications. It omits features and capabilities that are not generally available, or are not fully supported for third-party usage.
5+
This repository reflects the Discord Developer Platform as it is meant to be accessed by third-party applications. It omits features and capabilities that are not generally available, or are not fully supported for third-party usage.
66

77
We welcome your contributions!
88

9-
- Issue tracker: Discord API bugs
10-
- Discussions: Discord API feature and improvement requests
9+
- Issue tracker: [Discord API bugs](https://github.com/discord/discord-api-docs/issues)
10+
- Discussions: [Discord API feature and improvement requests](https://github.com/discord/discord-api-docs/discussions/categories/api-feature-requests-ideas)
1111
- Pull Requests: See [Contributing.md](https://github.com/discord/discord-api-docs/blob/main/CONTRIBUTING.md) for types of changes accepted and specific markdown syntax used in the documentation.
1212

13+
### Local Preview
14+
15+
Install the [Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview the documentation changes locally. To install, use the following command
16+
17+
```
18+
npm i -g mintlify
19+
```
20+
21+
Run the `mintlify dev` in the `discord` directory to see your changes locally.
22+
23+
```
24+
cd discord
25+
mintlify dev
26+
```
27+
28+
Your local browser should open automatically to the correct page, but if not, navigate to:
29+
30+
```
31+
http://localhost:3000/developers/docs/intro
32+
```
33+
1334
## Need some help?
1435

1536
Here are some Discord servers that can help you out with everything Discord API:

discord/.vale.ini

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Top level styles
2+
StylesPath = ./vale
3+
MinAlertLevel = suggestion
4+
IgnoredScopes = code, tt, img, url, a
5+
SkippedScopes = script, style, pre, figure, code
6+
7+
# Vocabularies
8+
Vocab = Mintlify, Discord
9+
10+
# This is required since Vale doesn't officially support MDX
11+
[formats]
12+
mdx = md
13+
14+
# MDX support
15+
[*.mdx]
16+
BasedOnStyles = Vale
17+
Vale.Terms = NO # Enforces really harsh capitalization rules, keep off
18+
19+
# `import ...`, `export ...`
20+
# `<Component ... />`
21+
# `<Component>...</Component>`
22+
# `{ ... }`
23+
# Words with underscores
24+
# Markdown links [text](url)
25+
# Content within square brackets (markdown link text)
26+
TokenIgnores = (?sm)((?:import|export) .+?$), \
27+
(?<!`)(<\w+ ?.+ ?\/>)(?!`), \
28+
(<[A-Z]\w+>.+?<\/[A-Z]\w+>), \
29+
(\w*_\w*), \
30+
(\[.+?\]\(.+?\)), \
31+
(\[.+?\])
32+
33+
# Exclude:
34+
# `<Component \n ... />`
35+
BlockIgnores = (?sm)^(<\w+\n .*\s\/>)$, \
36+
(?sm)^({.+.*})
37+
38+
CommentDelimiters = {/*, */}

0 commit comments

Comments
 (0)