Skip to content

Commit 64b03ab

Browse files
committed
fix: fix og iamge cache
1 parent 4e65dba commit 64b03ab

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

app/components/OgImage/ShareCard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const props = withDefaults(
88
theme?: 'light' | 'dark'
99
color?: string
1010
}>(),
11-
{ theme: 'light' },
11+
{ theme: 'dark' },
1212
)
1313
1414
const t = computed(() => SHARE_CARD_THEMES[props.theme])

nuxt.config.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,13 @@ export default defineNuxtConfig({
128128
'/api/registry/package-meta/**': { isr: 300 },
129129
'/:pkg/.well-known/skills/**': { isr: 3600 },
130130
'/:scope/:pkg/.well-known/skills/**': { isr: 3600 },
131-
'/__og-image__/**': getISRConfig(60),
131+
'/__og-image__/**': {
132+
isr: {
133+
expiration: 60,
134+
passQuery: true,
135+
allowQuery: ['theme', 'color'],
136+
},
137+
},
132138
'/_avatar/**': { isr: 3600, proxy: 'https://www.gravatar.com/avatar/**' },
133139
'/opensearch.xml': { isr: true },
134140
'/oauth-client-metadata.json': { prerender: true },

0 commit comments

Comments
 (0)