@movk/nuxt-docs 1.5.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/app/app.config.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ButtonProps } from '@nuxt/ui'
1
+ import type { ExtendedButtonProps } from './types'
2
2
 
3
3
  export default defineAppConfig({
4
4
  toaster: {
@@ -44,17 +44,31 @@ export default defineAppConfig({
44
44
  to: '/',
45
45
  search: true,
46
46
  colorMode: true,
47
- links: [] as ButtonProps[]
47
+ links: [] as ExtendedButtonProps[]
48
48
  },
49
49
  footer: {
50
50
  credits: `Copyright © 2024 - ${new Date().getFullYear()}`,
51
- socials: [] as ButtonProps[]
51
+ socials: [] as ExtendedButtonProps[]
52
52
  },
53
53
  toc: {
54
54
  title: '页面导航',
55
55
  bottom: {
56
56
  title: '社区',
57
- links: [] as ButtonProps[]
57
+ links: [] as ExtendedButtonProps[]
58
+ }
59
+ },
60
+ github: {
61
+ rootDir: '',
62
+ dateFormat: {
63
+ locale: 'zh-CN',
64
+ options: {
65
+ year: 'numeric',
66
+ month: 'numeric',
67
+ day: 'numeric',
68
+ hour: '2-digit',
69
+ minute: '2-digit',
70
+ timeZone: 'Asia/Shanghai'
71
+ }
58
72
  }
59
73
  }
60
74
  })
@@ -1,5 +1,9 @@
1
1
  import type { ButtonProps } from '@nuxt/ui'
2
2
 
3
+ export interface ExtendedButtonProps extends ButtonProps {
4
+ label?: string
5
+ }
6
+
3
7
  declare module 'nuxt/schema' {
4
8
  interface AppConfig {
5
9
  vercelAnalytics: {
@@ -17,17 +21,17 @@ declare module 'nuxt/schema' {
17
21
  to: string
18
22
  search: boolean
19
23
  colorMode: boolean
20
- links: ButtonProps[]
24
+ links: ExtendedButtonProps[]
21
25
  }
22
26
  footer: {
23
27
  credits: string
24
- socials: ButtonProps[]
28
+ socials: ExtendedButtonProps[]
25
29
  }
26
30
  toc: {
27
31
  title: string
28
32
  bottom: {
29
33
  title: string
30
- links: ButtonProps[]
34
+ links: ExtendedButtonProps[]
31
35
  }
32
36
  }
33
37
  github: {
package/modules/config.ts CHANGED
@@ -70,7 +70,19 @@ export default defineNuxtModule({
70
70
  'nuxt-og-image',
71
71
  '@nuxtjs/plausible',
72
72
  '@nuxt/ui',
73
- new RegExp(`${componentsPath.replace(/[/\\]/g, '[/\\\\]')}/(?!content/(ComponentEmits|ComponentProps|ComponentSlots|ComponentExample|CommitChangelog|PageLastCommit)\\.vue$)`)
73
+ (component: { filePath: string }) => {
74
+ const allowedComponents = [
75
+ 'CommitChangelog.vue',
76
+ 'ComponentEmits.vue',
77
+ 'ComponentExample.vue',
78
+ 'ComponentProps.vue',
79
+ 'ComponentSlots.vue',
80
+ 'PageLastCommit.vue',
81
+ 'Motion.vue'
82
+ ]
83
+ return component.filePath.startsWith(componentsPath)
84
+ && !allowedComponents.some(name => component.filePath.endsWith(`/content/${name}`))
85
+ }
74
86
  ],
75
87
  metaFields: {
76
88
  type: false,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@movk/nuxt-docs",
3
3
  "type": "module",
4
- "version": "1.5.0",
4
+ "version": "1.5.1",
5
5
  "private": false,
6
6
  "description": "An elegant documentation theme for Nuxt, powered by Nuxt UI and Nuxt Content.",
7
7
  "author": "YiXuan <mhaibaraai@gmail.com>",