Repository navigation
fix: OG image fonts, per-request gateway, NuxtImg everywhere, config tidy-up - #246
Merged
Merged
Conversation
…them During prerender, nuxt-og-image resolves /_fonts/* only from .output/public, which Nuxt has not populated yet, so every OG image fell back to Inter. Files outside /_fonts/ are read from public/ directly. Move the PP Neue Machina files to public/fonts, convert them from OTF to WOFF2 (1.5 MB to 640 KB; nuxt-og-image decodes them for satori), and cache them for 30 days. The OG title uses weight 700 because that is the weight @nuxt/fonts assigns to Ultrabold, and the OG converter only picks exact weight matches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jordan Jones <git@svcs.ok8.sh>
The page shows the requesting hostname, but prerendering baked in `localhost` until hydration. Render it per request and drop its OG image, which required prerendering. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jordan Jones <git@svcs.ok8.sh>
- drop `future.compatibilityVersion: 4`, the default on Nuxt 4 - drop `turnstile.siteKey` read from process.env at build; container builds never had it, and the runtime keys already come from NUXT_PUBLIC_TURNSTILE_SITE_KEY / NUXT_TURNSTILE_SECRET_KEY - disable server sourcemaps - remove Cloudflare-specific comments Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jordan Jones <git@svcs.ok8.sh>
Use <NuxtImg> for the remaining raw <img> tags in the Discord and game cards so every image goes through @nuxt/image, and drop the stale Cloudflare note from the image config. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jordan Jones <git@svcs.ok8.sh>
kashalls
force-pushed
the
claude/nuxt-config-tuning
branch
from
October 5, 2026 06:36
2aef845 to
50c66c6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to the Nuxt config review: these are the remaining items after #245.
Fonts and OG images (
fix(fonts))/_fonts/*only from.output/public. Nuxt hasn't copied public assets there yet when prerender runs, so every build warnednot found in mapping or cacheand the images fell back to Inter. Files outside/_fonts/are read frompublic/directly, so the fonts now live inpublic/fonts/._og-static-fonts/)./fonts/**is now cached for 30 days. It's not markedimmutable, because the filenames aren't content-hashed.@nuxt/fontsregisters Ultrabold as 700, and the OG converter only picks fonts whose weight matches exactly. It's the same Ultrabold face; before this, the title rendered in bold Inter.Gateway (
fix(gateway))/gatewayshows the requesting hostname, but it was prerendered, so the HTML saidlocalhostuntil hydration (and always did for crawlers and users without JS). It's nowprerender: falseand rendered per request. Its OG image is dropped, becausezeroRuntimeOG images require prerendering.Config cleanup (
chore(config))future.compatibilityVersion: 4; it's the default on Nuxt 4.turnstile.siteKey: process.env.NUXT_TURNSTILE_SITE_KEY. It's read at build, and container builds never had it. The module already registers both keys in runtime config (verified in the built output), so setNUXT_PUBLIC_TURNSTILE_SITE_KEYandNUXT_TURNSTILE_SECRET_KEYin the container environment.sourcemap: { server: false }.nonroot.NuxtImg everywhere (
refactor)<img>tags in the Discord and game cards with<NuxtImg>.@nuxt/imagestays;UAvataralready renders throughNuxtImgwhen it's installed.none(passthrough), so the image URLs are unchanged. Switching toipxfor real resizing on the Node server would be a separate change, and would need the Blizzard/Overwatch hosts added todomains.Testing
nuxt build: no OG font warnings;_og-static-fontsnow containsPPNeueMachinaInktrap-Regular.ttfand-Ultrabold.ttf, and I checked the rendered OG PNG by eye./gatewayplus its payload and OG image are no longer prerendered)./,/blog,/blog/hello-world,/gatewayand/api/githubreturn 200./gatewaywithHost: nothing.example.comrenders that hostname./fonts/*.woff2is served asfont/woff2withcache-control: public, max-age=2592000.NuxtImg(data-nuxt-img), and there are no raw<img>tags. The game APIs don't send CORS headers forlocalhost, so that check ran with web security disabled.🤖 Generated with Claude Code