Skip to content

Commit 9c2e340

Browse files
authored
Add manifest option "shortcut" (#2666)
1 parent d02ddef commit 9c2e340

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

docs/manifest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@
9898
[
9999
{
100100
"title": "View all guides",
101-
"href": "#nav_guides"
101+
"href": "/docs/guides/overview",
102+
"shortcut": true
102103
}
103104
]
104105
]

scripts/build-docs.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,7 @@ export async function build(config: BuildConfig, store: Store = createBlankStore
783783
target: item.target,
784784
// @ts-expect-error - It exists, up on line 481
785785
sdk: item.itemSDK ?? sdks,
786+
shortcut: item.shortcut,
786787
}
787788
}
788789

@@ -795,6 +796,7 @@ export async function build(config: BuildConfig, store: Store = createBlankStore
795796
icon: item.icon,
796797
target: item.target,
797798
sdk: item.sdk,
799+
shortcut: item.shortcut,
798800
}
799801
},
800802
// @ts-expect-error - This traverseTree function might just be the death of me

scripts/lib/manifest.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export type ManifestItem = {
4444
icon?: Icon
4545
target?: '_blank'
4646
sdk?: SDK[]
47+
shortcut?: boolean
4748
}
4849

4950
export type ManifestGroup = {
@@ -71,6 +72,7 @@ const createManifestSchema = (config: BuildConfig) => {
7172
icon: icon.optional(),
7273
target: z.enum(['_blank']).optional(),
7374
sdk: z.array(sdk).optional(),
75+
shortcut: z.boolean().optional(),
7476
})
7577
.strict()
7678

0 commit comments

Comments
 (0)