You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-6Lines changed: 12 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,13 +15,19 @@ yarn dev # run docs locally
15
15
16
16
### Adding a new document
17
17
18
-
All content can be located under the [pages](/pages) directory. The directory structure directly informs the website URL structure, so consider that when placing your new document.
18
+
All documentation content is defined by the [`docsStructure`](/src/routing/docs-structure.ts) object. This file is the single source of truth for the docs site structure, navigation, and URL mapping. When running `yarn dev` or `yarn build`, the route indexing script will search the paths described, first for an index.md, then for a PATHNAME.md file if an index.md file isn't found (i.e. it will look first for /overview/introduction/index.md, then /overview/introduction.md if index isn't found).
19
19
20
-
All of our documents are in standard Markdown (.md) file format. If you are including an image, add it to [public/assets] using the same directory structure as pages.
20
+
The indexing script will reconcile routes into the generated [`routes.json`](/generated/routes.json), which needs to be committed to git so changes can be confirmed/tracked. A github workflow will confirm that route changes have been committed (though lastmod timestamps are ignored, as these lag behind by one commit)
21
21
22
-
Finally, make sure to add your new document to the NavData.tsx file located [here](/src/NavData.tsx).
22
+
To add a new document:
23
+
- Update [`docsStructure`](/src/routing/docs-structure.ts) to include your new pages/sections. The order and nesting in this object will determine the sidebar navigation and the URL path.
23
24
24
-
### Updating structure
25
+
- Add your new Markdown (`.md`) file to the corresponding location in the [`pages`](/pages) directory.
25
26
26
-
If you are making any changes to the documentation structure or organization, you'll likely need to set up page redirects. These can be added in [next.config.js](next.config.js). Make sure to
27
-
look for internal usages throughout all the documents on the site to make sure that there are no broken links.
27
+
- If you include images, place them in [`public/assets`](/public/assets) using a directory structure that matches your document's location in `pages`.
28
+
29
+
### Updating structure and redirects
30
+
31
+
If you change the documentation structure (e.g., move, rename, or remove pages), you may need to add redirects to prevent broken links. Redirects are managed directly in [`docs-structure.ts`](/src/routing/docs-structure.ts) via the `redirects` array at the bottom of the file. Redirects on a path already defined by `docsStructure` will override where it reconciles to, which can be confirmed in [`routes.json`](/generated/routes.json)
32
+
33
+
Whenever you update the structure or add redirects, review internal links throughout the documentation to ensure there are no broken references.
0 commit comments