@dargmuesli/nuxt-vio 1.12.0 → 1.14.0
Sign up to get free protection for your applications and to get access to all the features.
- package/app.config.ts +0 -4
- package/components/VioApp.vue +12 -8
- package/nuxt.config.ts +22 -11
- package/package.json +4 -4
- package/utils/constants.ts +0 -17
package/app.config.ts
CHANGED
@@ -1,19 +1,15 @@
|
|
1
1
|
import { useSeoMeta } from '@unhead/vue'
|
2
2
|
|
3
|
-
import { SITE_NAME } from './utils/constants'
|
4
|
-
|
5
3
|
export default defineAppConfig({
|
6
4
|
seoMeta: {
|
7
5
|
twitterSite: '@dargmuesli',
|
8
6
|
},
|
9
|
-
siteName: SITE_NAME,
|
10
7
|
themeColor: '#202020',
|
11
8
|
})
|
12
9
|
|
13
10
|
declare module '@nuxt/schema' {
|
14
11
|
interface AppConfigInput {
|
15
12
|
seoMeta?: Parameters<typeof useSeoMeta>[0]
|
16
|
-
siteName: string
|
17
13
|
themeColor?: string
|
18
14
|
}
|
19
15
|
}
|
package/components/VioApp.vue
CHANGED
@@ -3,7 +3,6 @@
|
|
3
3
|
<NuxtLayout>
|
4
4
|
<!-- `NuxtLayout` can't have mulitple child nodes (https://github.com/nuxt/nuxt/issues/21759) -->
|
5
5
|
<div>
|
6
|
-
<SeoKit :site-description="siteDescription" :language="locale" />
|
7
6
|
<NuxtPage />
|
8
7
|
<CookieControl :locale="locale" />
|
9
8
|
</div>
|
@@ -15,19 +14,17 @@
|
|
15
14
|
export interface Props {
|
16
15
|
siteDescription: string
|
17
16
|
ogImageAlt: string
|
17
|
+
ogImageComponent?: string
|
18
18
|
}
|
19
|
-
const props = withDefaults(defineProps<Props>(), {
|
19
|
+
const props = withDefaults(defineProps<Props>(), {
|
20
|
+
ogImageComponent: undefined,
|
21
|
+
})
|
20
22
|
|
21
23
|
const { locale } = useI18n()
|
22
24
|
const cookieControl = useCookieControl()
|
23
25
|
|
24
26
|
const { loadingIds, indicateLoadingDone } = useLoadingDoneIndicator('app')
|
25
27
|
|
26
|
-
// data
|
27
|
-
const ogImageOptions = {
|
28
|
-
alt: props.ogImageAlt,
|
29
|
-
}
|
30
|
-
|
31
28
|
// computations
|
32
29
|
const isLoading = computed(() => !!loadingIds.value.length)
|
33
30
|
|
@@ -47,7 +44,14 @@ watch(
|
|
47
44
|
)
|
48
45
|
|
49
46
|
// initialization
|
50
|
-
|
47
|
+
updateSiteConfig({
|
48
|
+
description: props.siteDescription,
|
49
|
+
})
|
50
|
+
defineOgImage({
|
51
|
+
alt: props.ogImageAlt,
|
52
|
+
component: props.ogImageComponent,
|
53
|
+
description: props.siteDescription,
|
54
|
+
})
|
51
55
|
useAppLayout()
|
52
56
|
useFavicons()
|
53
57
|
</script>
|
package/nuxt.config.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { dirname, join } from 'node:path'
|
2
2
|
import { fileURLToPath } from 'node:url'
|
3
3
|
|
4
|
-
import {
|
4
|
+
import { SITE_NAME } from './utils/constants'
|
5
5
|
|
6
6
|
const currentDir = dirname(fileURLToPath(import.meta.url))
|
7
7
|
|
@@ -28,12 +28,12 @@ export default defineNuxtConfig({
|
|
28
28
|
title: SITE_NAME, // fallback data to prevent invalid html at generation
|
29
29
|
},
|
30
30
|
},
|
31
|
-
extends: ['nuxt-seo-kit'],
|
32
31
|
modules: [
|
33
32
|
'@dargmuesli/nuxt-cookie-control',
|
34
33
|
'@nuxtjs/html-validator',
|
35
34
|
'@nuxtjs/i18n',
|
36
35
|
'@nuxtjs/tailwindcss',
|
36
|
+
'nuxt-seo-kit-module',
|
37
37
|
],
|
38
38
|
nitro: {
|
39
39
|
compressPublicAssets: true,
|
@@ -43,10 +43,6 @@ export default defineNuxtConfig({
|
|
43
43
|
googleAnalyticsId: '', // set via environment variable `NUXT_PUBLIC_GOOGLE_ANALYTICS_ID` only
|
44
44
|
isInProduction: process.env.NODE_ENV === 'production',
|
45
45
|
isTesting: false,
|
46
|
-
...{
|
47
|
-
siteName: SITE_NAME,
|
48
|
-
siteUrl: BASE_URL,
|
49
|
-
}, // TODO: remove once http://localhost:3000/api/__site-config__/debug shows correct data without this extension.
|
50
46
|
},
|
51
47
|
},
|
52
48
|
typescript: {
|
@@ -111,7 +107,20 @@ export default defineNuxtConfig({
|
|
111
107
|
detectBrowserLanguage: false, // Enabling browser language detection does not generate (!) other languages than the default one.
|
112
108
|
langDir: 'locales',
|
113
109
|
lazy: true,
|
114
|
-
locales:
|
110
|
+
locales: [
|
111
|
+
{
|
112
|
+
code: 'en',
|
113
|
+
file: 'en.json',
|
114
|
+
name: 'English',
|
115
|
+
iso: 'en', // Will be used as catchall locale by default.
|
116
|
+
},
|
117
|
+
{
|
118
|
+
code: 'de',
|
119
|
+
file: 'de.json',
|
120
|
+
name: 'Deutsch',
|
121
|
+
iso: 'de',
|
122
|
+
},
|
123
|
+
],
|
115
124
|
vueI18n: {
|
116
125
|
fallbackWarn: false, // TODO: don't show incorrect warnings (https://github.com/intlify/vue-i18n-next/issues/776)
|
117
126
|
},
|
@@ -119,11 +128,13 @@ export default defineNuxtConfig({
|
|
119
128
|
linkChecker: {
|
120
129
|
failOn404: false, // TODO: enable (https://github.com/harlan-zw/nuxt-seo-kit/issues/4#issuecomment-1434522124)
|
121
130
|
},
|
122
|
-
|
123
|
-
// debug: process.env.NODE_ENV === 'development',
|
124
|
-
// name: SITE_NAME,
|
131
|
+
seoKit: {
|
125
132
|
splash: false,
|
126
|
-
|
133
|
+
},
|
134
|
+
site: {
|
135
|
+
debug: process.env.NODE_ENV === 'development',
|
136
|
+
name: SITE_NAME,
|
137
|
+
url: BASE_URL,
|
127
138
|
},
|
128
139
|
tailwindcss: {
|
129
140
|
cssPath: join(currentDir, './assets/css/tailwind.css'),
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dargmuesli/nuxt-vio",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.14.0",
|
4
4
|
"type": "module",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -44,14 +44,14 @@
|
|
44
44
|
"@nuxtjs/i18n": "8.0.0-beta.10",
|
45
45
|
"@nuxtjs/tailwindcss": "6.8.0",
|
46
46
|
"@tailwindcss/typography": "0.5.9",
|
47
|
-
"nuxt-seo-kit": "
|
47
|
+
"nuxt-seo-kit-module": "2.0.0-beta.5",
|
48
48
|
"sweetalert2": "11.7.20",
|
49
49
|
"vue-gtag": "2.0.1"
|
50
50
|
},
|
51
51
|
"devDependencies": {
|
52
52
|
"@commitlint/cli": "17.6.7",
|
53
53
|
"@commitlint/config-conventional": "17.6.7",
|
54
|
-
"@intlify/eslint-plugin-vue-i18n": "3.0.0-next.
|
54
|
+
"@intlify/eslint-plugin-vue-i18n": "3.0.0-next.3",
|
55
55
|
"@nuxtjs/eslint-config-typescript": "12.0.0",
|
56
56
|
"eslint": "8.45.0",
|
57
57
|
"eslint-config-prettier": "8.8.0",
|
@@ -67,7 +67,7 @@
|
|
67
67
|
"stylelint-config-standard": "34.0.0",
|
68
68
|
"stylelint-no-unsupported-browser-features": "7.0.0",
|
69
69
|
"typescript": "5.1.6",
|
70
|
-
"vue-tsc": "1.8.
|
70
|
+
"vue-tsc": "1.8.8"
|
71
71
|
},
|
72
72
|
"pnpm": {
|
73
73
|
"overrides": {
|
package/utils/constants.ts
CHANGED
@@ -1,18 +1 @@
|
|
1
|
-
import { LocaleObject } from '@nuxtjs/i18n/dist/runtime/composables'
|
2
|
-
|
3
|
-
export const CYPRESS_BASE_URL = 'http://localhost:3000'
|
4
|
-
export const LOCALES: LocaleObject[] = [
|
5
|
-
{
|
6
|
-
code: 'en',
|
7
|
-
file: 'en.json',
|
8
|
-
name: 'English',
|
9
|
-
iso: 'en', // Will be used as catchall locale by default.
|
10
|
-
},
|
11
|
-
{
|
12
|
-
code: 'de',
|
13
|
-
file: 'de.json',
|
14
|
-
name: 'Deutsch',
|
15
|
-
iso: 'de',
|
16
|
-
},
|
17
|
-
]
|
18
1
|
export const SITE_NAME = 'Vio'
|