Skip to content

Commit ca425ed

Browse files
committed
Fix policy overview index
1 parent ab76827 commit ca425ed

8 files changed

+1701
-75
lines changed

package-lock.json

+1,679-66
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"posthog-js": "^1.205.1",
3131
"react": "^19.0.0",
3232
"react-dom": "^19.0.0",
33-
"zudoku": "^0.32.3"
33+
"zudoku": "^0.33.0"
3434
},
3535
"devDependencies": {
3636
"@types/json-schema": "7.0.15",

scripts/generate-policies.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ In addition to the built-in policies, Zuplo is [fully programmable](/docs/polici
351351

352352
await fs.mkdir(policyDir, { recursive: true });
353353
await fs.writeFile(
354-
path.join(policyDir, "index.mdx"),
354+
path.join(policyDir, "overview.mdx"),
355355
await prettier.format(policyIndex, { parser: "mdx" }),
356356
);
357357

sidebar.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ export const policies: SidebarEntry = [
389389
{
390390
type: "category",
391391
label: "Overview",
392-
items: ["policies/index", "articles/policies"],
392+
items: ["policies/overview", "articles/policies"],
393393
},
394394
{
395395
type: "category",

sidebar.zudoku.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"icon": "blocks",
5353
"items": [
5454
"dev-portal/zudoku/custom-plugins",
55-
"dev-portal/zudoku/api-keys"
55+
"dev-portal/zudoku/extending/events"
5656
]
5757
},
5858
{
@@ -62,9 +62,10 @@
6262
"items": [
6363
"dev-portal/zudoku/components/callout",
6464
"dev-portal/zudoku/components/icons",
65-
"dev-portal/zudoku/components/shadcn",
65+
"dev-portal/zudoku/components/stepper",
66+
"dev-portal/zudoku/components/syntax-highlight",
6667
"dev-portal/zudoku/components/playground",
67-
"dev-portal/zudoku/components/syntax-highlight"
68+
"dev-portal/zudoku/components/shadcn"
6869
]
6970
}
7071
]

src/components.tsx

+5-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ export const mdxComponents = {
2626
/>
2727
),
2828
img: (props: any) => {
29+
let srcSet;
30+
2931
if (
32+
process.env.NODE_ENV === "production" &&
3033
props.src &&
3134
!props.srcSet &&
3235
!props.src.endsWith(".svg") &&
@@ -37,7 +40,7 @@ export const mdxComponents = {
3740
? new URL(props.src).pathname
3841
: props.src;
3942

40-
props.srcSet = [
43+
srcSet = [
4144
`https://cdn.zuplo.com/cdn-cgi/image/fit=contain,width=640,format=auto${path} 640w`,
4245
`https://cdn.zuplo.com/cdn-cgi/image/fit=contain,width=960,format=auto${path} 960w`,
4346
`https://cdn.zuplo.com/cdn-cgi/image/fit=contain,width=1280,format=auto${path} 1280w`,
@@ -48,7 +51,7 @@ export const mdxComponents = {
4851
}
4952
}
5053

51-
return <img {...props} />;
54+
return <img {...props} srcSet={srcSet} />;
5255
},
5356
PolicyOverview,
5457
EnterpriseFeature,

vercel.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,12 @@
460460
},
461461
{
462462
"source": "/docs/overview/policies{/}?",
463-
"destination": "/docs/policies/index",
463+
"destination": "/docs/policies/overview",
464+
"permanent": true
465+
},
466+
{
467+
"source": "/docs/policies/index{/}?",
468+
"destination": "/docs/policies/overview",
464469
"permanent": true
465470
},
466471
{

zudoku.config.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ const config: ZudokuConfig = {
3030
from: "/",
3131
to: "/articles/what-is-zuplo",
3232
},
33+
{
34+
from: "/policies/index",
35+
to: "/policies/overview",
36+
},
3337
],
3438
theme: {
3539
dark: {

0 commit comments

Comments
 (0)