Skip to content

Commit

Permalink
feat: migrate to nuxt-og-image (#1400)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored May 13, 2024
1 parent dff402c commit ad3e0b3
Show file tree
Hide file tree
Showing 30 changed files with 1,247 additions and 448 deletions.
2 changes: 1 addition & 1 deletion budget.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
{
"resourceType": "stylesheet",
"budget": 12.9
"budget": 13
}
],
"resourceCounts": [
Expand Down
24 changes: 23 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default defineNuxtConfig({
future: { nativeSWR: true },
prerender: {
crawlLinks: true,
routes: ['/', '/og/og.jpg', '/rss.xml', '/voted', '/work', '/feedback'],
routes: ['/', '/rss.xml', '/voted', '/work', '/feedback'],
},
hooks: {
'prerender:generate' (route) {
Expand Down Expand Up @@ -196,7 +196,29 @@ export default defineNuxtConfig({
},
},

site: {
url: 'https://roe.dev',
},

ogImage: {
compatibility: {
runtime: {
'css-inline': false,
'chromium': false,
'resvg': false,
'satori': false,
'sharp': false,
},
prerender: {},
},
fonts: [
'Barlow:400',
'Barlow:600',
],
},

modules: [
'nuxt-og-image',
'@nuxt/eslint',
'nuxt-time',
'@nuxt/test-utils/module',
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"test": "vitest run test/unit",
"test:types": "nuxi prepare && vue-tsc --noEmit",
"test:e2e": "playwright test test/e2e",
"test:e2e:update": "docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.43.0-focal npx playwright test test/e2e --update-snapshots",
"test:e2e:update": "docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.44.0-focal npx playwright test test/e2e --update-snapshots",
"postinstall": "nuxt prepare && pnpm simple-git-hooks install && npx playwright install"
},
"lint-staged": {
Expand Down Expand Up @@ -52,6 +52,7 @@
"masto": "^6.7.7",
"mlly": "^1.7.0",
"nuxt": "3.11.2",
"nuxt-og-image": "3.0.0-rc.53",
"nuxt-time": "^0.1.3",
"partykit": "0.0.104",
"partysocket": "^1.0.1",
Expand Down
Loading

0 comments on commit ad3e0b3

Please sign in to comment.