Skip to content

Commit 355db24

Browse files
committed
Work around _meta validation
1 parent dd4d7fe commit 355db24

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

patches/nextra.patch

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,17 @@ index 239d72f5921e2d1b7359e569ae5b74c12d7c9d8a..ebeb619da1e3ccb7722e9388c92c1e21
1010
const Image = forwardRef((props, ref) => {
1111
const ComponentToUse = typeof props.src === "object" ? NextImage : "img";
1212
diff --git a/dist/client/normalize-pages.js b/dist/client/normalize-pages.js
13-
index 15afee0c1de26f47d781f423e5ec32e33ad925d3..a0cefcd27a794dcfa84f901734240adf9c1f30f4 100644
13+
index 15afee0c1de26f47d781f423e5ec32e33ad925d3..fefd01736bd2b778df275bf50ac48384d5f63845 100644
1414
--- a/dist/client/normalize-pages.js
1515
+++ b/dist/client/normalize-pages.js
16-
@@ -92,6 +92,7 @@ function normalizePages({
17-
item.items
18-
)) {
19-
if (!value.href && children.every((i) => i.name !== key)) {
20-
+ console.log({value})
21-
throw new Error(
22-
`Validation of "_meta" file has failed.
23-
The field key "${metaKey}.items.${key}" in \`_meta\` file refers to a page that cannot be found, remove this key from "_meta" file.`
16+
@@ -103,7 +103,9 @@ The field key "${metaKey}.items.${key}" in \`_meta\` file refers to a page that
17+
}
18+
if (item) continue;
19+
if (typeof window === "undefined") {
20+
- const isValid = metaItem.type === "separator" || metaItem.type === "menu" || metaItem.href;
21+
+ const isValid = metaItem.type === "separator" || metaItem.type === "menu" || metaItem.href
22+
+ // workaround
23+
+ || metaKey === 'conf';
24+
if (!isValid) {
25+
throw new Error(
26+
`Validation of "_meta" file has failed.

pnpm-lock.yaml

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)