simple-content-site 2.3.0 → 2.3.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/content.config.ts +5 -5
- package/nuxt.config.ts +2 -1
- package/package.json +1 -2
package/content.config.ts
CHANGED
|
@@ -7,6 +7,9 @@ const { options } = useNuxt()
|
|
|
7
7
|
const cwd = joinURL(options.rootDir, 'content')
|
|
8
8
|
// @ts-expect-error cannot be typed?
|
|
9
9
|
const locales = options.i18n?.locales
|
|
10
|
+
// todo: might be required for diff strategies for the collections
|
|
11
|
+
// const defaultLocale = options.i18n?.defaultLocale
|
|
12
|
+
// const i18nStrategy = options.i18n?.strategy || 'prefix_except_default'
|
|
10
13
|
|
|
11
14
|
const variantEnum = z.enum(['solid', 'outline', 'subtle', 'soft', 'ghost', 'link'])
|
|
12
15
|
const colorEnum = z.enum(['primary', 'secondary', 'neutral', 'error', 'warning', 'success', 'info'])
|
|
@@ -83,10 +86,9 @@ const createFooterSchema = () => z.object({
|
|
|
83
86
|
right: z.array(createLinkSchema()),
|
|
84
87
|
})
|
|
85
88
|
|
|
86
|
-
let collections: Record<string, DefinedCollection>
|
|
89
|
+
let collections: Record<string, DefinedCollection> = {}
|
|
87
90
|
|
|
88
91
|
const buildI18nCollections = () => {
|
|
89
|
-
collections = {}
|
|
90
92
|
for (const locale of locales) {
|
|
91
93
|
const code = (typeof locale === 'string' ? locale : locale.code).replace('-', '_')
|
|
92
94
|
|
|
@@ -94,7 +96,7 @@ const buildI18nCollections = () => {
|
|
|
94
96
|
type: 'page',
|
|
95
97
|
source: {
|
|
96
98
|
cwd,
|
|
97
|
-
include: `${code}
|
|
99
|
+
include: `${code}/**/*.{md,yml}`,
|
|
98
100
|
prefix: `/${code}`,
|
|
99
101
|
exclude: [
|
|
100
102
|
`${code}/header.yml`,
|
|
@@ -109,7 +111,6 @@ const buildI18nCollections = () => {
|
|
|
109
111
|
source: {
|
|
110
112
|
cwd,
|
|
111
113
|
include: `${code}/header.yml`,
|
|
112
|
-
prefix: `/${code}`,
|
|
113
114
|
},
|
|
114
115
|
schema: createHeaderSchema(),
|
|
115
116
|
})
|
|
@@ -119,7 +120,6 @@ const buildI18nCollections = () => {
|
|
|
119
120
|
source: {
|
|
120
121
|
cwd,
|
|
121
122
|
include: `${code}/footer.yml`,
|
|
122
|
-
prefix: `/${code}`,
|
|
123
123
|
},
|
|
124
124
|
schema: createFooterSchema(),
|
|
125
125
|
})
|
package/nuxt.config.ts
CHANGED
|
@@ -22,7 +22,8 @@ export default defineNuxtConfig({
|
|
|
22
22
|
.map((id) => {
|
|
23
23
|
return id
|
|
24
24
|
.replace(/^@nuxt\/content > /, 'simple-content-site > @nuxt/content > ')
|
|
25
|
-
.replace(/^nuxt-studio > /, 'simple-content-site > nuxt-studio > ')
|
|
25
|
+
// .replace(/^nuxt-studio > /, 'simple-content-site > nuxt-studio > ')
|
|
26
|
+
// .replace(/^@nuxtjs\/i18n > /, 'simple-content-site > @nuxtjs/i18n > ')
|
|
26
27
|
},
|
|
27
28
|
)
|
|
28
29
|
})
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "simple-content-site",
|
|
3
3
|
"description": "Nuxt layer for simple website with basic functions.",
|
|
4
|
-
"version": "2.3.
|
|
4
|
+
"version": "2.3.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./nuxt.config.ts",
|
|
7
7
|
"repository": {
|
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
"minimark": "^0.2.0",
|
|
40
40
|
"motion-v": "^1.7.4",
|
|
41
41
|
"nuxt-og-image": "^5.1.13",
|
|
42
|
-
"nuxt-studio": "^1.1.0",
|
|
43
42
|
"pkg-types": "^2.3.0",
|
|
44
43
|
"scule": "^1.3.0",
|
|
45
44
|
"tailwindcss": "^4.1.17",
|