Skip to content

Commit 2806452

Browse files
committed
fix(docs): Fix internal links
Make links to upgrade-guides work, and rename some other index links and routes
1 parent be86892 commit 2806452

File tree

16 files changed

+405
-159
lines changed

16 files changed

+405
-159
lines changed

docs/docs/cli-commands.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ Some generators require that their argument be a model in your `schema.prisma`.
449449
450450
### TypeScript generators
451451
452-
If your project is configured for TypeScript (see the [TypeScript docs](typescript/index)), the generators will automatically detect and generate `.ts`/`.tsx` files for you
452+
If your project is configured for TypeScript (see the [TypeScript docs](typescript)), the generators will automatically detect and generate `.ts`/`.tsx` files for you
453453
454454
**Undoing a Generator with a Destroyer**
455455
@@ -2095,7 +2095,7 @@ If you have not setup the CedarJS server file, it will be setup:
20952095
20962096
### setup tsconfig
20972097
2098-
Add a `tsconfig.json` to both the web and api sides so you can start using [TypeScript](typescript/index).
2098+
Add a `tsconfig.json` to both the web and api sides so you can start using [TypeScript](typescript).
20992099
21002100
```
21012101
yarn redwood setup tsconfig

docs/docs/contributing-walkthrough.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The best (and most fun) way to learn Redwood and the underlying tools and techno
4040
**Docs and How To**
4141

4242
- Start with the [Introduction](https://github.com/cedarjs/cedar/blob/main/README.md) Doc
43-
- And browse through [How To's](how-to/index)
43+
- And browse through [How To's](how-to)
4444

4545
### GitHub (and Git)
4646

docs/docs/introduction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ We warmly welcome you!
3535
As you can probably tell from the sidebar, CedarJS's docs are organized into three sections:
3636

3737
- [Tutorial](tutorial/foreword.md)
38-
- [Reference](index)
39-
- [How To](how-to/index)
38+
- [Reference](reference)
39+
- [How To](how-to)
4040

4141
The order isn't arbitrary.
4242
This is more or less the learning journey we have in mind for you.

docs/docusaurus.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import fileExtSwitcher from './src/remark/file-ext-switcher.mjs'
88

99
const config: Config = {
1010
customFields: {
11-
defaultDocsLandingPage: 'index', // redirects here when hitting /docs/
11+
defaultDocsLandingPage: 'introduction', // redirects here when hitting /docs/
1212
defaultSectionLandingPages: {
1313
// map of what is considered the first article in each section
1414
// section: id

docs/netlify.toml

Lines changed: 7 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,13 @@ to = "/docs/how-to/:splat"
208208
status = 301
209209

210210
[[redirects]]
211-
from = "/docs/how-to"
212-
to = "/docs/how-to/index"
211+
from = "/docs/how-to/index"
212+
to = "/docs/how-to"
213+
status = 301
214+
215+
[[redirects]]
216+
from = "/docs/typescript/index"
217+
to = "/docs/typescript"
213218
status = 301
214219

215220
[[redirects]]
@@ -222,104 +227,6 @@ from = "/dbauth"
222227
to = "/docs/authentication#self-hosted-auth-installation-and-setup"
223228
status = 301
224229

225-
# v1.0-v1.5 redirects
226-
227-
[[redirects]]
228-
from = "/docs/1.0/*"
229-
to = "/docs/1.x/:splat"
230-
status = 301
231-
232-
[[redirects]]
233-
from = "/docs/1.1/*"
234-
to = "/docs/1.x/:splat"
235-
status = 301
236-
237-
[[redirects]]
238-
from = "/docs/1.2/*"
239-
to = "/docs/1.x/:splat"
240-
status = 301
241-
242-
[[redirects]]
243-
from = "/docs/1.3/*"
244-
to = "/docs/1.x/:splat"
245-
status = 301
246-
247-
[[redirects]]
248-
from = "/docs/1.4/*"
249-
to = "/docs/1.x/:splat"
250-
status = 301
251-
252-
[[redirects]]
253-
from = "/docs/1.5/*"
254-
to = "/docs/1.x/:splat"
255-
status = 301
256-
257-
# v2.0-v2.2 redirects
258-
259-
[[redirects]]
260-
from = "/docs/2.0/*"
261-
to = "/docs/2.x/:splat"
262-
status = 301
263-
264-
[[redirects]]
265-
from = "/docs/2.1/*"
266-
to = "/docs/2.x/:splat"
267-
status = 301
268-
269-
[[redirects]]
270-
from = "/docs/2.2/*"
271-
to = "/docs/2.x/:splat"
272-
status = 301
273-
274-
# v3.0-v3.2 redirects
275-
276-
[[redirects]]
277-
from = "/docs/3.0/*"
278-
to = "/docs/3.x/:splat"
279-
status = 301
280-
281-
[[redirects]]
282-
from = "/docs/3.1/*"
283-
to = "/docs/3.x/:splat"
284-
status = 301
285-
286-
[[redirects]]
287-
from = "/docs/3.2/*"
288-
to = "/docs/3.x/:splat"
289-
status = 301
290-
291-
# v4 redirects
292-
293-
[[redirects]]
294-
from = "/docs/4.0/*"
295-
to = "/docs/4.x/:splat"
296-
status = 301
297-
298-
[[redirects]]
299-
from = "/docs/4.1/*"
300-
to = "/docs/4.x/:splat"
301-
status = 301
302-
303-
[[redirects]]
304-
from = "/docs/4.2/*"
305-
to = "/docs/4.x/:splat"
306-
status = 301
307-
308-
[[redirects]]
309-
from = "/docs/4.3/*"
310-
to = "/docs/4.x/:splat"
311-
status = 301
312-
313-
[[redirects]]
314-
from = "/docs/4.4/*"
315-
to = "/docs/4.x/:splat"
316-
status = 301
317-
318-
[[redirects]]
319-
from = "/docs/4.5/*"
320-
to = "/docs/4.x/:splat"
321-
status = 301
322-
323230
# v5 redirects
324231

325232
[[redirects]]
@@ -347,43 +254,6 @@ from = "/docs/5.4/*"
347254
to = "/docs/5.x/:splat"
348255
status = 301
349256

350-
# v6.0-v6.6 redirects
351-
352-
[[redirects]]
353-
from = "/docs/6.0/*"
354-
to = "/docs/:splat"
355-
status = 301
356-
357-
[[redirects]]
358-
from = "/docs/6.1/*"
359-
to = "/docs/:splat"
360-
status = 301
361-
362-
[[redirects]]
363-
from = "/docs/6.2/*"
364-
to = "/docs/:splat"
365-
status = 301
366-
367-
[[redirects]]
368-
from = "/docs/6.3/*"
369-
to = "/docs/:splat"
370-
status = 301
371-
372-
[[redirects]]
373-
from = "/docs/6.4/*"
374-
to = "/docs/:splat"
375-
status = 301
376-
377-
[[redirects]]
378-
from = "/docs/6.5/*"
379-
to = "/docs/:splat"
380-
status = 301
381-
382-
[[redirects]]
383-
from = "/docs/6.6/*"
384-
to = "/docs/:splat"
385-
status = 301
386-
387257
# Redirects for "Configuring Fastify" after the server file was released in v7
388258

389259
[[redirects]]

docs/sidebars.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ module.exports = {
7272
link: {
7373
type: 'generated-index',
7474
title: 'Reference',
75-
slug: '/index',
75+
slug: '/reference',
7676
},
7777
items: [
7878
'a11y',
@@ -207,7 +207,7 @@ module.exports = {
207207
link: {
208208
type: 'generated-index',
209209
title: 'TypeScript',
210-
slug: 'typescript/index',
210+
slug: 'typescript',
211211
},
212212
items: [
213213
{
@@ -242,7 +242,7 @@ module.exports = {
242242
link: {
243243
type: 'generated-index',
244244
title: 'How To',
245-
slug: '/how-to/index',
245+
slug: '/how-to',
246246
},
247247
items: [
248248
{
@@ -253,7 +253,12 @@ module.exports = {
253253
},
254254
{
255255
type: 'category',
256-
label: 'Upgrade Guide',
256+
label: 'Upgrade Guides',
257+
link: {
258+
type: 'generated-index',
259+
title: 'Upgrade Guides',
260+
slug: '/upgrade-guides',
261+
},
257262
items: [
258263
{
259264
type: 'autogenerated',

docs/src/pages/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Link from '@docusaurus/Link'
55
import useBaseUrl from '@docusaurus/useBaseUrl'
66
import Layout from '@theme/Layout'
77

8-
import sidebars from '../../sidebars'
8+
import sidebars from '../../sidebars.js'
99

1010
import styles from './styles.module.css'
1111

@@ -145,7 +145,8 @@ export default function Home() {
145145
typeof section === 'string'
146146
? section
147147
: section.link?.slug?.replace(/^\//, '') ||
148-
section.items?.at(0)?.id
148+
section.items?.at(0)?.id ||
149+
section.items?.at(0)?.dirName
149150

150151
return (
151152
<li key={linkTarget}>
File renamed without changes.

docs/versioned_docs/version-0.11/cli-commands.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ Some generators require that their argument be a model in your `schema.prisma`.
449449
450450
### TypeScript generators
451451
452-
If your project is configured for TypeScript (see the [TypeScript docs](typescript/index)), the generators will automatically detect and generate `.ts`/`.tsx` files for you
452+
If your project is configured for TypeScript (see the [TypeScript docs](typescript)), the generators will automatically detect and generate `.ts`/`.tsx` files for you
453453
454454
**Undoing a Generator with a Destroyer**
455455
@@ -2095,7 +2095,7 @@ If you have not setup the CedarJS server file, it will be setup:
20952095
20962096
### setup tsconfig
20972097
2098-
Add a `tsconfig.json` to both the web and api sides so you can start using [TypeScript](typescript/index).
2098+
Add a `tsconfig.json` to both the web and api sides so you can start using [TypeScript](typescript).
20992099
21002100
```
21012101
yarn redwood setup tsconfig

docs/versioned_docs/version-0.11/contributing-walkthrough.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The best (and most fun) way to learn Redwood and the underlying tools and techno
4040
**Docs and How To**
4141

4242
- Start with the [Introduction](https://github.com/cedarjs/cedar/blob/main/README.md) Doc
43-
- And browse through [How To's](how-to/index)
43+
- And browse through [How To's](how-to)
4444

4545
### GitHub (and Git)
4646

0 commit comments

Comments
 (0)