Skip to content

Commit 88f2d17

Browse files
authored
docs: change configurations to make v2 the main docs (#9729)
* docs: change configurations to make v2 the main docs * move api routes to top level * remove api prefix * update opengraph images * show v1 link * add redirect to v1
1 parent 471f7e4 commit 88f2d17

File tree

40 files changed

+115
-128
lines changed

40 files changed

+115
-128
lines changed

www/apps/api-reference/.env.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ NEXT_PUBLIC_DOCS_ALGOLIA_INDEX_NAME=
44
NEXT_PUBLIC_API_ALGOLIA_INDEX_NAME=
55
NEXT_PUBLIC_ALGOLIA_API_KEY=
66
NEXT_PUBLIC_ALGOLIA_APP_ID=
7-
NEXT_PUBLIC_ENV=
7+
NEXT_PUBLIC_ENV=development # change to production when running npm start
88
NEXT_PUBLIC_BASE_URL=
99
NEXT_PUBLIC_DOCS_URL=
1010
NEXT_PUBLIC_UI_URL=

www/apps/api-reference/app/_mdx/admin.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@ If you click on the workflow, you'll view a reference of that workflow, includin
838838

839839
This is useful if you want to extend an API route and pass additional data or perform custom actions.
840840

841-
Refer to [this guide](https://docs.medusajs.com/v2/customization/extend-models/extend-create-product) to find an example of extending an API route.
841+
Refer to [this guide](https://docs.medusajs.com/customization/extend-models/extend-create-product) to find an example of extending an API route.
842842

843843
<Feedback
844844
event="survey_api-ref"

www/apps/api-reference/app/_mdx/client-libraries.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import DownloadFull from "@/components/DownloadFull"
44

55
<H3 className="!mt-0">Just Getting Started?</H3>
66

7-
Check out the [Medusa v2 Documentation](https://docs.medusajs.com/v2).
7+
Check out the [Medusa v2 Documentation](https://docs.medusajs.com).
88

99
<Space bottom={8} />
1010

@@ -16,7 +16,7 @@ To use Medusa's JS SDK library, install the following packages in your project (
1616
npm install @medusajs/js-sdk@latest @medusajs/types@latest
1717
```
1818

19-
Learn more about the JS SDK in [this documentation](https://docs.medusajs.com/v2/resources/js-sdk).
19+
Learn more about the JS SDK in [this documentation](https://docs.medusajs.com/resources/js-sdk).
2020

2121
### Download Full Reference
2222

www/apps/api-reference/app/_mdx/store.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ and associate placed orders with the specified sales channel.
270270

271271
{/* TODO add v2 links */}
272272

273-
Create a publishable API key either using the [admin REST APIs](https://docs.medusajs.com/v2/api/admin#api-keys_postapikeys), or using the Medusa Admin.
273+
Create a publishable API key either using the [admin REST APIs](https://docs.medusajs.com/api/admin#api-keys_postapikeys), or using the Medusa Admin.
274274

275275
### How to Use a Publishable API Key
276276

@@ -839,7 +839,7 @@ If you click on the workflow, you'll view a reference of that workflow, includin
839839

840840
This is useful if you want to extend an API route and pass additional data or perform custom actions.
841841

842-
Refer to [this guide](https://docs.medusajs.com/v2/customization/extend-models/extend-create-product) to find an example of extending an API route.
842+
Refer to [this guide](https://docs.medusajs.com/customization/extend-models/extend-create-product) to find an example of extending an API route.
843843

844844
<Feedback
845845
event="survey_api-ref"

www/apps/api-reference/app/api/algolia/route.ts renamed to www/apps/api-reference/app/algolia/route.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import OpenAPIParser from "@readme/openapi-parser"
22
import algoliasearch from "algoliasearch"
3-
import type { ExpandedDocument, Operation } from "../../../types/openapi"
3+
import type { ExpandedDocument, Operation } from "../../types/openapi"
44
import path from "path"
5-
import getSectionId from "../../../utils/get-section-id"
5+
import getSectionId from "../../utils/get-section-id"
66
import { NextResponse } from "next/server"
77
import { JSDOM } from "jsdom"
8-
import getUrl from "../../../utils/get-url"
8+
import getUrl from "../../utils/get-url"
99
import { capitalize } from "docs-ui"
1010

1111
export async function GET() {
File renamed without changes.
File renamed without changes.
-91.9 KB
Loading

www/apps/api-reference/app/api/schema/route.ts renamed to www/apps/api-reference/app/schema/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { NextResponse } from "next/server"
22
import path from "path"
33
import { existsSync } from "fs"
4-
import getSchemaContent from "../../../utils/get-schema-content"
4+
import getSchemaContent from "../../utils/get-schema-content"
55

66
export async function GET(request: Request) {
77
const { searchParams } = new URL(request.url)
File renamed without changes.

0 commit comments

Comments
 (0)