Skip to content

Commit 7e6dbad

Browse files
committed
feat(deps): use nuxt-og-image v6
1 parent 4ca425f commit 7e6dbad

File tree

18 files changed

+522
-127
lines changed

18 files changed

+522
-127
lines changed

app/components/OgImage/Package.d.vue.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

app/pages/about.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ useSeoMeta({
1818
twitterDescription: () => $t('about.meta_description'),
1919
})
2020
21-
defineOgImageComponent('Default', {
21+
defineOgImage('Default', {
2222
primaryColor: '#60a5fa',
2323
title: 'About npmx',
2424
description: 'a fast, modern browser for the **npm registry**',

app/pages/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ useSeoMeta({
3232
twitterDescription: () => $t('seo.home.description'),
3333
})
3434
35-
defineOgImageComponent('Default', {
35+
defineOgImage('Default', {
3636
primaryColor: '#60a5fa',
3737
title: 'npmx',
3838
description: 'a fast, modern browser for the **npm registry**',

app/pages/org/[org].vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ useSeoMeta({
144144
twitterDescription: () => `npm packages published by the ${orgName.value} organization`,
145145
})
146146
147-
defineOgImageComponent('Default', {
148-
title: () => `@${orgName.value}`,
149-
description: () => (packageCount.value ? `${packageCount.value} packages` : 'npm organization'),
147+
defineOgImage('Default', {
148+
title: `@${orgName.value}`,
149+
description: packageCount.value ? `${packageCount.value} packages` : 'npm organization',
150150
primaryColor: '#60a5fa',
151151
})
152152
</script>

app/pages/package-code/[...path].vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,9 @@ useSeoMeta({
297297
twitterDescription: () => `Browse source code for ${packageName.value}@${version.value}`,
298298
})
299299
300-
defineOgImageComponent('Default', {
301-
title: () => `${pkg.value?.name ?? 'Package'} - Code`,
302-
description: () => pkg.value?.license ?? '',
300+
defineOgImage('Default', {
301+
title: `${pkg.value?.name ?? 'Package'} - Code`,
302+
description: pkg.value?.license ?? '',
303303
primaryColor: '#60a5fa',
304304
})
305305
</script>

app/pages/package-docs/[...path].vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ useSeoMeta({
107107
twitterDescription: () => pkg.value?.license ?? '',
108108
})
109109
110-
defineOgImageComponent('Default', {
111-
title: () => `${pkg.value?.name ?? 'Package'} - Docs`,
112-
description: () => pkg.value?.license ?? '',
110+
defineOgImage('Default', {
111+
title: `${pkg.value?.name ?? 'Package'} - Docs`,
112+
description: pkg.value?.license ?? '',
113113
primaryColor: '#60a5fa',
114114
})
115115

app/pages/package/[[org]]/[name].vue

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ import { useModal } from '~/composables/useModal'
1818
import { useAtproto } from '~/composables/atproto/useAtproto'
1919
import { togglePackageLike } from '~/utils/atproto/likes'
2020
21-
defineOgImageComponent('Package', {
22-
name: () => packageName.value,
23-
version: () => requestedVersion.value ?? '',
24-
primaryColor: '#60a5fa',
25-
})
26-
2721
const router = useRouter()
2822
2923
const header = useTemplateRef('header')
@@ -48,6 +42,13 @@ onMounted(() => {
4842
})
4943
5044
const { packageName, requestedVersion, orgName } = usePackageRoute()
45+
46+
defineOgImage('Package', {
47+
name: packageName.value,
48+
version: requestedVersion.value || '',
49+
primaryColor: '#60a5fa',
50+
})
51+
5152
const selectedPM = useSelectedPackageManager()
5253
const activePmId = computed(() => selectedPM.value ?? 'npm')
5354

app/pages/privacy.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ useSeoMeta({
88
description: () => $t('privacy_policy.welcome', { app: 'npmx' }),
99
})
1010
11-
defineOgImageComponent('Default', {
12-
title: () => $t('privacy_policy.title'),
13-
description: () => $t('privacy_policy.welcome', { app: 'npmx' }),
11+
defineOgImage('Default', {
12+
title: $t('privacy_policy.title'),
13+
description: $t('privacy_policy.welcome', { app: 'npmx' }),
1414
})
1515
1616
const router = useRouter()

0 commit comments

Comments
 (0)