File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
packages/nimiq-vitepress-theme/src Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 11import type { Theme } from 'vitepress'
22
3- export interface NimiqVitepressSidebar {
3+ export interface NimiqVitepressSidebar < T extends `/${ string } /` = any > {
44 label ?: string
55 items : {
66 text : string
7- link ?: string
7+ link ?: `${ T } ${ string } `
88 icon : string
9- items ?: { text : string , link : string } [ ]
9+ items ?: { text : string , link : `${ T } ${ string } ` } [ ]
1010 } [ ]
1111}
1212
13- export interface NimiqVitepressThemeNav {
13+ export interface NimiqVitepressThemeNav < T extends `/${ string } /` = any > {
1414 /**
1515 * The string displayed in the selector.
1616 */
1717 text : string
1818 /**
1919 * The path to the sub-module. If you want to link to the root of the module, use `/`.
20+ * Needs to match the folder name in your vitepress project.
2021 */
2122 subpath : string
2223 icon ?: string
23- defaultPageLink : string
24+ /**
25+ * The default page link for the module. This is used to open the page when the module is selected.
26+ * You need to use something like `/your-page/` or `/your-page/not-index-page`.
27+ */
28+ defaultPageLink : T
2429 description ?: string
25- sidebar : NimiqVitepressSidebar [ ]
30+ sidebar : NimiqVitepressSidebar < T > [ ]
2631}
2732
2833export interface NimiqVitepressThemeConfig {
You can’t perform that action at this time.
0 commit comments