Skip to content

Commit 952eb99

Browse files
authored
Fix docs build (#1447)
1 parent 5f430e3 commit 952eb99

File tree

8 files changed

+12
-13
lines changed

8 files changed

+12
-13
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.DS_Store
2-
.astro
32
dist
43
node_modules
54

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ Contributions are appreciated and welcome! See the appropriate guide for each pa
2323
## ♥️ Thanks
2424

2525
- Thanks to [dozens of lovely, smart contributors](https://github.com/drwpow/openapi-typescript/graphs/contributors) that made this library possible
26-
- Thanks to [Astro](https://astro.build/) for the docs site
26+
- Thanks to [Vitepress](https://vitepress.dev/) for the docs site
2727
- Thanks to [Cloudflare Pages](https://pages.cloudflare.com/) for docs site hosting
2828
- Thanks to [Algolia](https://www.algolia.com/) for the docs site search

docs/.vitepress/config.ts

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ export default defineConfig({
66
title: "OpenAPI TS",
77
description: "Consume OpenAPI 3.0 & 3.1 schemas in TypeScript",
88
cleanUrls: true,
9+
srcExclude: ["**/*/CONTRIBUTRING.md", "**/*/README.md"],
10+
ignoreDeadLinks: [/CODE_OF_CONDUCT/],
911
/** @see https://vitepress.dev/reference/default-theme-config */
1012
themeConfig: {
1113
siteTitle: false,

docs/6.x/advanced.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Advanced usage and various topics.
1111

1212
Fetching data can be done simply and safely using an **automatically-typed fetch wrapper**:
1313

14-
- [openapi-fetch](./openapi-fetch) (recommended)
14+
- [openapi-fetch](/openapi-fetch/) (recommended)
1515
- [openapi-typescript-fetch](https://www.npmjs.com/package/openapi-typescript-fetch) by [@ajaishankar](https://github.com/ajaishankar)
1616

1717
::: tip
@@ -78,7 +78,7 @@ describe("My API test", () => {
7878

7979
:::
8080

81-
_Note: this example uses a vanilla `fetch()` function, but any fetch wrapper—including [openapi-fetch](/openapi-fetch)—could be dropped in instead without any changes._
81+
_Note: this example uses a vanilla `fetch()` function, but any fetch wrapper—including [openapi-fetch](/openapi-fetch/)—could be dropped in instead without any changes._
8282

8383
And the magic that produces this would live in a `test/utils.ts` file that can be copy + pasted where desired (hidden for simplicity):
8484

docs/6.x/introduction.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ type ErrorResponse =
7676

7777
From here, you can use these types for any of the following (but not limited to):
7878

79-
- Using an OpenAPI-supported fetch client (like [openapi-fetch](/openapi-fetch))
79+
- Using an OpenAPI-supported fetch client (like [openapi-fetch](/openapi-fetch/))
8080
- Asserting types for other API requestBodies and responses
8181
- Building core business logic based on API types
8282
- Validating mock test data is up-to-date with the current schema

docs/README.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# openapi-typescript Docs
22

3-
Docs site powered by [Astro](https://github.com/withastro/astro), a modern static site generator.
3+
Docs site powered by [Vitepress](https://vitepress.dev/), an ergonomic docs site template powered by Vite.
44

55
Lives at [https://openapi-ts.pages.dev](https://openapi-ts.pages.dev).
66

@@ -13,13 +13,11 @@ pnpm 1
1313
pnpm run dev
1414
```
1515

16-
That will launch the docs site at `http://localhost:3000`.
16+
That will launch the docs site at `http://localhost:5173`.
1717

1818
## Editing
1919

20-
All content lives in the [content/](./src/content) directory, in `.md` files that should be familiar to edit to most.
21-
22-
For the non-markdown bits, please see the [Astro Documentation](https://docs.astro.build/en/getting-started/).
20+
All content lives in `.md` files that feature normal Markdown content [with powerful Vitepress extensions](https://vitepress.dev/guide/markdown).
2321

2422
## Contributing
2523

docs/advanced.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Advanced usage and various topics.
1111

1212
Fetching data can be done simply and safely using an **automatically-typed fetch wrapper**:
1313

14-
- [openapi-fetch](./openapi-fetch) (recommended)
14+
- [openapi-fetch](/openapi-fetch/) (recommended)
1515
- [openapi-typescript-fetch](https://www.npmjs.com/package/openapi-typescript-fetch) by [@ajaishankar](https://github.com/ajaishankar)
1616

1717
::: tip
@@ -89,7 +89,7 @@ describe("My API test", () => {
8989

9090
:::
9191

92-
_Note: this example uses a vanilla `fetch()` function, but any fetch wrapper—including [openapi-fetch](/openapi-fetch)—could be dropped in instead without any changes._
92+
_Note: this example uses a vanilla `fetch()` function, but any fetch wrapper—including [openapi-fetch](/openapi-fetch/)—could be dropped in instead without any changes._
9393

9494
And the magic that produces this would live in a `test/utils.ts` file that can be copy + pasted where desired (hidden for simplicity):
9595

docs/introduction.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ type ErrorResponse =
7070

7171
From here, you can use these types for any of the following (but not limited to):
7272

73-
- Using an OpenAPI-supported fetch client (like [openapi-fetch](/openapi-fetch))
73+
- Using an OpenAPI-supported fetch client (like [openapi-fetch](/openapi-fetch/))
7474
- Asserting types for other API requestBodies and responses
7575
- Building core business logic based on API types
7676
- Validating mock test data is up-to-date with the current schema

0 commit comments

Comments
 (0)