Skip to content

Commit c02a6a8

Browse files
committed
fix: convert remaining pages to defineOgImage API and sync with upstream
Convert brand.vue and translation-status.vue from defineOgImageComponent to defineOgImage with Page.takumi template. Remove conflicting generate:sprite script. Add html-validator ignore for OG image routes.
1 parent 52ed139 commit c02a6a8

File tree

5 files changed

+264
-33
lines changed

5 files changed

+264
-33
lines changed

app/pages/brand.vue

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@ useSeoMeta({
1010
twitterDescription: () => $t('brand.meta_description'),
1111
})
1212
13-
defineOgImageComponent('Default', {
14-
primaryColor: '#51c8fc',
15-
title: $t('brand.title'),
16-
description: $t('brand.meta_description'),
17-
})
13+
defineOgImage(
14+
'Page.takumi',
15+
{
16+
title: () => $t('brand.title'),
17+
description: () => $t('brand.meta_description'),
18+
},
19+
{ alt: () => `${$t('brand.title')} — npmx` },
20+
)
1821
1922
const logos = [
2023
{

app/pages/translation-status.vue

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ useSeoMeta({
88
description: () => $t('translation_status.welcome', { npmx: 'npmx' }),
99
})
1010
11-
defineOgImageComponent('Default', {
12-
title: () => $t('translation_status.title'),
13-
description: () => $t('translation_status.welcome', { npmx: 'npmx' }),
14-
})
11+
defineOgImage(
12+
'Page.takumi',
13+
{
14+
title: () => $t('translation_status.title'),
15+
description: () => $t('translation_status.welcome', { npmx: 'npmx' }),
16+
},
17+
{ alt: () => `${$t('translation_status.title')} — npmx` },
18+
)
1519
1620
const nuxt = useNuxtApp()
1721
const router = useRouter()

nuxt.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ export default defineNuxtConfig({
280280
options: {
281281
rules: { 'meta-refresh': 'off' },
282282
},
283+
ignore: [/\.(xml|rss|json)$/, /^\/_og\//],
283284
failOnError: true,
284285
},
285286

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"generate-pwa-icons": "pwa-assets-generator",
2525
"preview": "nuxt preview",
2626
"postinstall": "(pnpm rebuild @resvg/resvg-js || true) && vp run generate:lexicons && vp run generate:sprite && nuxt prepare && nuxt prepare --cwd docs && vp config",
27-
"generate:sprite": "node scripts/generate-file-tree-sprite.ts",
2827
"generate:fixtures": "node scripts/generate-fixtures.ts",
2928
"generate:jwk": "node scripts/gen-jwk.ts",
3029
"test": "vp test",

0 commit comments

Comments
 (0)