Skip to content

Commit ed01c39

Browse files
chore: sync docs/release-docs-staging with develop
2 parents 2b66867 + e070df1 commit ed01c39

14 files changed

Lines changed: 880 additions & 71 deletions

File tree

www/apps/book/app/sitemap.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
import { retrieveMdxPages } from "build-scripts"
21
import type { MetadataRoute } from "next"
3-
import path from "path"
42
import { config } from "../config"
3+
import { sitemapUrls } from "../generated/sitemap-urls.mjs"
54
import { basePathUrl } from "../utils/base-path-url"
65

76
export default function sitemap(): MetadataRoute.Sitemap {
8-
return retrieveMdxPages({
9-
basePath: path.resolve("app"),
10-
}).map((filePath) => ({
7+
return sitemapUrls.map((filePath) => ({
118
url: `${config.baseUrl}${basePathUrl(filePath)}`,
129
}))
1310
}
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
export const sitemapUrls = [
2+
"/learn/best-practices/third-party-sync",
3+
"/learn/build",
4+
"/learn/codemods",
5+
"/learn/codemods/replace-imports",
6+
"/learn/codemods/replace-zod-imports",
7+
"/learn/configurations/medusa-config/asymmetric-encryption",
8+
"/learn/configurations/medusa-config",
9+
"/learn/configurations/pnpm",
10+
"/learn/configurations/ts-aliases",
11+
"/learn/customization/custom-features/api-route",
12+
"/learn/customization/custom-features/module",
13+
"/learn/customization/custom-features",
14+
"/learn/customization/custom-features/workflow",
15+
"/learn/customization/customize-admin",
16+
"/learn/customization/customize-admin/route",
17+
"/learn/customization/customize-admin/widget",
18+
"/learn/customization/extend-features/define-link",
19+
"/learn/customization/extend-features/extend-create-product",
20+
"/learn/customization/extend-features",
21+
"/learn/customization/extend-features/query-linked-records",
22+
"/learn/customization/integrate-systems/handle-event",
23+
"/learn/customization/integrate-systems",
24+
"/learn/customization/integrate-systems/schedule-task",
25+
"/learn/customization/integrate-systems/service",
26+
"/learn/customization/next-steps",
27+
"/learn/customization/reuse-customizations",
28+
"/learn/debugging-and-testing/debug-workflows",
29+
"/learn/debugging-and-testing/feature-flags/create",
30+
"/learn/debugging-and-testing/feature-flags",
31+
"/learn/debugging-and-testing/instrumentation",
32+
"/learn/debugging-and-testing/logging/custom-logger",
33+
"/learn/debugging-and-testing/logging",
34+
"/learn/debugging-and-testing/testing-tools/integration-tests/api-routes",
35+
"/learn/debugging-and-testing/testing-tools/integration-tests",
36+
"/learn/debugging-and-testing/testing-tools/integration-tests/workflows",
37+
"/learn/debugging-and-testing/testing-tools/modules-tests",
38+
"/learn/debugging-and-testing/testing-tools",
39+
"/learn/deployment/general",
40+
"/learn/deployment",
41+
"/learn/fundamentals/admin/constraints",
42+
"/learn/fundamentals/admin/custom-injection-zones",
43+
"/learn/fundamentals/admin/environment-variables",
44+
"/learn/fundamentals/admin",
45+
"/learn/fundamentals/admin/routing",
46+
"/learn/fundamentals/admin/tips",
47+
"/learn/fundamentals/admin/translations",
48+
"/learn/fundamentals/admin/ui-routes",
49+
"/learn/fundamentals/admin/widgets",
50+
"/learn/fundamentals/api-routes/additional-data",
51+
"/learn/fundamentals/api-routes/cors",
52+
"/learn/fundamentals/api-routes/errors",
53+
"/learn/fundamentals/api-routes/http-methods",
54+
"/learn/fundamentals/api-routes/localization",
55+
"/learn/fundamentals/api-routes/middlewares",
56+
"/learn/fundamentals/api-routes/override",
57+
"/learn/fundamentals/api-routes",
58+
"/learn/fundamentals/api-routes/parameters",
59+
"/learn/fundamentals/api-routes/parse-body",
60+
"/learn/fundamentals/api-routes/protected-routes",
61+
"/learn/fundamentals/api-routes/responses",
62+
"/learn/fundamentals/api-routes/retrieve-custom-links",
63+
"/learn/fundamentals/api-routes/validation",
64+
"/learn/fundamentals/custom-cli-scripts",
65+
"/learn/fundamentals/custom-cli-scripts/seed-data",
66+
"/learn/fundamentals/data-models/big-numbers",
67+
"/learn/fundamentals/data-models/check-constraints",
68+
"/learn/fundamentals/data-models/indexes",
69+
"/learn/fundamentals/data-models/infer-type",
70+
"/learn/fundamentals/data-models/json-properties",
71+
"/learn/fundamentals/data-models/manage-relationships",
72+
"/learn/fundamentals/data-models",
73+
"/learn/fundamentals/data-models/properties",
74+
"/learn/fundamentals/data-models/relationships",
75+
"/learn/fundamentals/data-models/write-migration",
76+
"/learn/fundamentals/environment-variables",
77+
"/learn/fundamentals/events-and-subscribers/data-payload",
78+
"/learn/fundamentals/events-and-subscribers/emit-event",
79+
"/learn/fundamentals/events-and-subscribers/event-priority",
80+
"/learn/fundamentals/events-and-subscribers",
81+
"/learn/fundamentals/framework",
82+
"/learn/fundamentals/generated-types",
83+
"/learn/fundamentals/medusa-container",
84+
"/learn/fundamentals/module-links/custom-columns",
85+
"/learn/fundamentals/module-links/directions",
86+
"/learn/fundamentals/module-links/index-module",
87+
"/learn/fundamentals/module-links/link",
88+
"/learn/fundamentals/module-links",
89+
"/learn/fundamentals/module-links/query",
90+
"/learn/fundamentals/module-links/query-context",
91+
"/learn/fundamentals/module-links/read-only",
92+
"/learn/fundamentals/modules/commerce-modules",
93+
"/learn/fundamentals/modules/container",
94+
"/learn/fundamentals/modules/db-operations",
95+
"/learn/fundamentals/modules/infrastructure-modules",
96+
"/learn/fundamentals/modules/isolation",
97+
"/learn/fundamentals/modules/loaders",
98+
"/learn/fundamentals/modules/modules-directory-structure",
99+
"/learn/fundamentals/modules/multiple-services",
100+
"/learn/fundamentals/modules/options",
101+
"/learn/fundamentals/modules",
102+
"/learn/fundamentals/modules/service-constraints",
103+
"/learn/fundamentals/modules/service-factory",
104+
"/learn/fundamentals/plugins/create",
105+
"/learn/fundamentals/plugins",
106+
"/learn/fundamentals/scheduled-jobs/execution-number",
107+
"/learn/fundamentals/scheduled-jobs/interval",
108+
"/learn/fundamentals/scheduled-jobs",
109+
"/learn/fundamentals/workflows/add-workflow-hook",
110+
"/learn/fundamentals/workflows/compensation-function",
111+
"/learn/fundamentals/workflows/conditions",
112+
"/learn/fundamentals/workflows/constructor-constraints",
113+
"/learn/fundamentals/workflows/errors",
114+
"/learn/fundamentals/workflows/execute-another-workflow",
115+
"/learn/fundamentals/workflows/locks",
116+
"/learn/fundamentals/workflows/long-running-workflow",
117+
"/learn/fundamentals/workflows/multiple-step-usage",
118+
"/learn/fundamentals/workflows",
119+
"/learn/fundamentals/workflows/parallel-steps",
120+
"/learn/fundamentals/workflows/retry-failed-steps",
121+
"/learn/fundamentals/workflows/store-executions",
122+
"/learn/fundamentals/workflows/variable-manipulation",
123+
"/learn/fundamentals/workflows/workflow-hooks",
124+
"/learn/fundamentals/workflows/workflow-timeout",
125+
"/learn/installation/docker",
126+
"/learn/installation",
127+
"/learn/introduction/architecture",
128+
"/learn/introduction/build-with-llms-ai/agentic-skills",
129+
"/learn/introduction/build-with-llms-ai/ai-friendly-docs",
130+
"/learn/introduction/build-with-llms-ai/cloud-cli",
131+
"/learn/introduction/build-with-llms-ai/mcp-server",
132+
"/learn/introduction/build-with-llms-ai",
133+
"/learn/introduction/from-v1-to-v2",
134+
"/learn",
135+
"/learn/production/worker-mode",
136+
"/learn/resources/contribution-guidelines/admin-translations",
137+
"/learn/resources/contribution-guidelines/code",
138+
"/learn/resources/contribution-guidelines/docs",
139+
"/learn/resources/usage",
140+
"/learn/storefront-development",
141+
"/learn/update",
142+
"/start"
143+
]

www/apps/book/scripts/prepare.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
generateEditedDates,
66
generateLlmsFull,
77
generateSidebar,
8+
generateSitemapUrls,
89
copyMdxToPublic,
910
} from "build-scripts"
1011
import {
@@ -19,6 +20,7 @@ async function main() {
1920
await generateSidebar(sidebars, {
2021
addNumbering: true,
2122
})
23+
await generateSitemapUrls()
2224
const baseUrl =
2325
process.env.NEXT_PUBLIC_PROD_BASE_URL || process.env.NEXT_PUBLIC_BASE_URL
2426
const plugins = {

www/apps/resources/app/sitemap.ts

Lines changed: 2 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,10 @@
1-
import { retrieveMdxPages } from "build-scripts"
21
import type { MetadataRoute } from "next"
3-
import path from "path"
42
import { config } from "../config"
3+
import { sitemapUrls } from "../generated/sitemap-urls.mjs"
54
import { basePathUrl } from "../utils/base-path-url"
65

76
export default function sitemap(): MetadataRoute.Sitemap {
8-
const items = retrieveMdxPages({
9-
basePath: path.resolve("app"),
10-
}).map((filePath) => ({
7+
return sitemapUrls.map((filePath) => ({
118
url: `${config.baseUrl}${basePathUrl(filePath)}`,
129
}))
13-
14-
// add some references
15-
items.push(
16-
{
17-
url: `${config.baseUrl}${basePathUrl("/references/file-provider-module")}`,
18-
},
19-
{
20-
url: `${config.baseUrl}${basePathUrl("/references/file-service")}`,
21-
},
22-
{
23-
url: `${config.baseUrl}${basePathUrl("/references/locking-module-provider")}`,
24-
},
25-
{
26-
url: `${config.baseUrl}${basePathUrl("/references/locking-service")}`,
27-
},
28-
{
29-
url: `${config.baseUrl}${basePathUrl("/references/notification-provider-module")}`,
30-
},
31-
{
32-
url: `${config.baseUrl}${basePathUrl("/references/notification-service")}`,
33-
},
34-
{
35-
url: `${config.baseUrl}${basePathUrl("/references/event-service")}`,
36-
},
37-
{
38-
url: `${config.baseUrl}${basePathUrl("/references/cache-service")}`,
39-
},
40-
{
41-
url: `${config.baseUrl}${basePathUrl("/references/caching-module-provider")}`,
42-
},
43-
{
44-
url: `${config.baseUrl}${basePathUrl("/references/caching-service")}`,
45-
},
46-
{
47-
url: `${config.baseUrl}${basePathUrl("/references/file-service")}`,
48-
},
49-
{
50-
url: `${config.baseUrl}${basePathUrl("/references/auth/provider")}`,
51-
},
52-
{
53-
url: `${config.baseUrl}${basePathUrl("/references/fulfillment/provider")}`,
54-
},
55-
{
56-
url: `${config.baseUrl}${basePathUrl("/references/tax/provider")}`,
57-
},
58-
{
59-
url: `${config.baseUrl}${basePathUrl("/references/payment/provider")}`,
60-
}
61-
)
62-
63-
return items
6410
}

0 commit comments

Comments
 (0)