Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
FREEDOM251

Freedom251 › Blog › App Router

How Nakodo Routes Social Cards for 75 Pages—with a Separate Homepage Image

By Freedom251 Team · · 3 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Nakodo’s approach uses one Next.js route to generate social cards for 75 public URLs, while the homepage keeps its own opengraph-image file. The pattern reuses page metadata and avoids duplicating image-rendering code across many pages; it is a project-specific design, not a Next.js requirement.

How the split works

Daniel Pertu reported in an October 5, 2026 article that Nakodo’s sitemap contains 76 public URLs: 63 content entries and 12 hand-built pages, plus the homepage. In his account, the homepage is the exception; the other 75 use a centralized catch-all card route. These counts are reported by Pertu, not an independent audit. Read Pertu’s article.

As an Amazon Associate I earn from qualifying purchases.

The homepage uses Next.js’s opengraph-image file convention. For other pages, a project route maps a page path to an image path—for example, /pricing to /og/pricing. Pertu’s article shows the homepage’s og:image as https://nakodo.app/opengraph-image and the pricing image as https://nakodo.app/og/pricing. Those are examples reported in the article, not independently reproduced responses.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When to use each approach

Consideration Route-level image convention Centralized card route
Typical fit in this case A one-off homepage image Cards for many known pages
Page metadata reuse Can receive route parameters, according to current Next.js documentation Looks up each page’s existing registry data
Rendering code Suitable for a distinct image; separate files may repeat logic across many pages One renderer can serve multiple page paths
Path control Determined by the route-segment convention and app structure Can enumerate allowed paths with static params and reject unlisted ones
Route-specific logic Little for a single image; more files may be needed as pages grow Requires a path-to-record lookup and suitable fallback behavior

Next.js documents that an opengraph-image file can generate an Open Graph image for a route segment and connect it to that segment’s metadata. The framework also supports generated images with route parameters. A centralized route is therefore a choice to concentrate mapping and rendering—not a workaround for an unsupported framework feature. See the Next.js Open Graph and Twitter image documentation.

How the centralized route selects and builds a card

Reuse the page registry

Pertu’s implementation derives its card paths from the same registry that supplies page content. For a given path, it looks up the title using ogTitle when present and otherwise uses h1; a static-card fallback handles cases without a suitable page title. Reusing the registry avoids maintaining a second list of slugs and keeps card titles aligned with page data.

Enumerate pages at build time

The route uses generateStaticParams to list the paths for which cards should be built. It also sets dynamic = "force-static" and dynamicParams = false. Current Next.js documentation says static params can be generated at build time, and that setting dynamicParams to false makes unlisted dynamic paths return 404. The handler also checks for a missing title and returns 404 as a defensive measure. Consult the Next.js generateStaticParams documentation for the behavior in the current framework docs.

Pertu’s article gives example outcomes of 200 image/png for /og/pricing and /og/how-it-works, and 404 for /og/nonsense-page. These are examples stated in his article, not independently tested results.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Designing around renderer constraints

Use fonts the renderer can load

Pertu says the image renderer used by the project cannot read WOFF2 fonts, so the repository includes local TTF files for Besley, Archivo, and IBM Plex Mono. The fonts are read from disk rather than fetched remotely during builds. This is a constraint of the renderer described in the article, not a general Next.js restriction; check the font formats supported by the renderer in your own stack.

Make layout behavior explicit

The article also reports that the project’s layout engine needs explicit display: flex. Treat that as renderer-specific implementation experience. Verify layout support in the image-generation library you use rather than assuming browser CSS behavior transfers exactly.

Fit variable-length titles

Instead of using one font size for every page, the card renderer steps title size down by character count:

  • 76 pixels for titles of 36 characters or fewer
  • 64 pixels for titles from 37 through 60 characters
  • 54 pixels for titles longer than 60 characters

The card also shows the top-level section, derived from the first path segment, rather than printing a long URL path. That keeps the section label readable while the title remains the main variable element.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Version and evidence limits

The Next.js documentation cited here was last updated February 27, 2026. Pertu’s article does not state the installed Next.js version or deployment platform, and its URL counts and response examples have not been independently reproduced. Check the documentation for the version installed in your project before adopting the file convention, static-parameter behavior, or route settings.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

App RouterNext.jsOpen Graphsocial media imagesWeb development

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.