Skip to content

Commit 2059845

Browse files
brittonhayesclaude
andauthored
Update docs: add LLM context, AI context menu, refresh content and styling (#188)
- Add docusaurus-plugin-llms for llms.txt and llms-full.txt generation - Add AiContextMenu component with theme overrides for DocItem and ApiItem - Rewrite introduction page with clearer structure (base URL, auth, rate limiting) - Remove outdated GraphQL docs and status page reference - Clean up FAQ (remove stale contribution links, add sidebar positioning) - Remove search-local theme, remove FAQ from navbar, update sidebar ordering - Refresh custom CSS with updated design tokens and component styles Co-authored-by: Britton Hayes <brittonhayes@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent fcd2309 commit 2059845

File tree

13 files changed

+2926
-1834
lines changed

13 files changed

+2926
-1834
lines changed

docs/faq.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
sidebar_position: 2
3+
---
4+
15
# FAQ
26

37
### A monster, spell, subclass, etc. is missing from the API / Database. Can I add it?
@@ -14,15 +18,6 @@ The SRD, or Systems Reference Document, contains guidelines for publishing conte
1418

1519
The Open Game License (OGL) is a public copyright license by Wizards of the Coast that may be used by tabletop role-playing game developers to grant permission to modify, copy, and redistribute some of the content designed for their games, notably game mechanics. However, they must share-alike copies and derivative works. [More information about the OGL can be found here.](https://en.wikipedia.org/wiki/Open_Game_License)
1620

17-
### Can I support this project? Where can I contribute to this project?
18-
19-
Yes! Please! This is a evolving API and having fresh ideas are always welcome! You can open an issue in either repo, open a PR for changes, or just discuss with other users in this discord.
20-
21-
Additionally, there is a separate Docker image for each repo so you only have to run as much as you need.
22-
23-
[The repo for the data lives here.](https://github.com/bagelbits/5e-database)
24-
[The repo for the API lives here.](https://github.com/bagelbits/5e-srd-api)
25-
2621
### Can this API be self hosted?
2722

2823
Yes it can! You can also host the data yourself if you don't want to use the API at all. You can also make changes and add extra data if you like. However, it is up to you to merge in new changes to the data and API.

docs/graphql.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

docs/introduction.md

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,47 @@ sidebar_position: 1
44

55
# Introduction
66

7-
### :arrow_right: [Skip to the tutorials](/docs/tutorials/)
7+
Welcome to the D&D 5e SRD API, the Dungeons & Dragons 5th Edition API.
88

9-
*If you wanna skip right into the tutorial, go ahead. We don't mind!*
9+
This documentation will help you familiarize yourself with the resources available and how to consume them with HTTP requests. Read through the getting started [tutorial](/docs/tutorials/) before you dive in.
1010

11-
### :wave: Welcome
11+
## Base URL
1212

13-
Welcome to the D&D 5e SRD API, the Dungeons & Dragons 5th Edition API!
13+
All API requests are made to the following base URL:
1414

15-
This documentation should help you familiarize yourself with the resources available and how to consume them with HTTP requests. Read through the [Tutorial](/docs/tutorials/) getting started section before you dive in.
15+
```
16+
https://www.dnd5eapi.co/api
17+
```
1618

17-
Most of your problems should be solved just by reading through it.
19+
## Authentication
1820

19-
### :lock: Authentication
21+
This is a completely open API. **No authentication is required to query and get data.** This also means that we've limited what you can do to just `GET`-ing the data.
2022

21-
This is a completely open API. **No authentication is required to query and get data**. This also means that we've limited what you can do to just `GET`-ing the data.
23+
## Rate Limits
2224

23-
If you find a mistake in the data, feel free to [message us](https://discord.gg/TQuYTv7)!
25+
There is a limit of 10,000 requests per second per IP. This is subject to change if something more practical needs to be enforced.
2426

25-
### :smile: Chat
27+
## GraphQL
2628

27-
Come hang out with us [on Discord](https://discord.gg/TQuYTv7)! We're friendly and would love to hear what you make with the API!
29+
This API also supports [GraphQL](https://graphql.org/). The GraphQL endpoint is:
2830

29-
### :handshake: Contribute
31+
```
32+
https://www.dnd5eapi.co/graphql
33+
```
34+
35+
See the [GraphQL tutorial](/docs/tutorials/beginner/graphql) for examples and how to use the Apollo sandbox explorer.
36+
37+
## Community
38+
39+
Come hang out with us [on Discord](https://discord.gg/TQuYTv7). We're friendly and would love to hear what you make with the API.
40+
41+
## Contributing
3042

3143
This API is built from two repositories:
3244

33-
- The repo containing the data lives here: https://github.com/5e-bits/5e-database
34-
- The repo with the API implementation lives here: https://github.com/5e-bits/5e-srd-api
45+
- [5e-database](https://github.com/5e-bits/5e-database) — the data
46+
- [5e-srd-api](https://github.com/5e-bits/5e-srd-api) — the API implementation
47+
48+
This is an evolving API and fresh ideas are always welcome. You can open an issue in either repo, open a PR for changes, or discuss with other users on Discord.
3549

36-
This is a evolving API and having fresh ideas are always welcome! You can
37-
open an issue in either repo, open a PR for changes, or just discuss with
38-
other users in this Discord.
50+
If you find a mistake in the data, feel free to [let us know](https://discord.gg/TQuYTv7).

docs/reference/status-page.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

docusaurus.config.ts

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,7 @@ const config: Config = {
1616
markdown: {
1717
mermaid: true,
1818
},
19-
themes: [
20-
[
21-
require.resolve("@easyops-cn/docusaurus-search-local"),
22-
/** @type {import("@easyops-cn/docusaurus-search-local").PluginOptions} */
23-
{
24-
searchBarShortcutHint: false,
25-
},
26-
],
27-
"@docusaurus/theme-mermaid",
28-
],
19+
themes: ["@docusaurus/theme-mermaid"],
2920

3021
// Even if you don't use internationalization, you can use this field to set
3122
// useful metadata like html lang. For example, if your site is Chinese, you
@@ -50,7 +41,21 @@ const config: Config = {
5041
],
5142
],
5243

53-
plugins: [require.resolve("./src/plugins/dynamic-tutorials-list")],
44+
plugins: [
45+
require.resolve("./src/plugins/dynamic-tutorials-list"),
46+
[
47+
"docusaurus-plugin-llms",
48+
{
49+
generateLLMsTxt: true,
50+
generateLLMsFullTxt: true,
51+
generateMarkdownFiles: true,
52+
docsDir: "docs",
53+
title: "D&D 5e SRD API Documentation",
54+
description:
55+
"REST + GraphQL API for the 5e SRD database. Includes guides, tutorials, API reference, and schema documentation.",
56+
},
57+
],
58+
],
5459

5560
themeConfig: {
5661
languageTabs: [
@@ -179,12 +184,6 @@ const config: Config = {
179184
position: "left",
180185
dropdownActiveClassDisabled: true,
181186
},
182-
{
183-
type: "doc",
184-
docId: "faq",
185-
position: "left",
186-
label: "FAQ",
187-
},
188187
{
189188
to: "https://5e-bits.github.io/dnd-uptime",
190189
label: "Status",

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"@easyops-cn/docusaurus-search-local": "^0.55.1",
2222
"@mdx-js/react": "^3.1.1",
2323
"clsx": "^2.0.0",
24+
"docusaurus-plugin-llms": "^0.3.0",
2425
"docusaurus-preset-openapi": "^0.8.0",
2526
"prism-react-renderer": "^2.4.0",
2627
"react": "^19.2.4",

sidebars.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import type { SidebarsConfig } from "@docusaurus/plugin-content-docs";
1313
const sidebars: SidebarsConfig = {
1414
referenceSidebar: [
1515
"introduction",
16-
"tutorials/index",
16+
"faq",
1717
{
1818
type: "category",
1919
label: "Reference",

0 commit comments

Comments
 (0)