Skip to content

fix: add per-page metadata and 404 for unknown slugs - #89

Merged
calebephrem merged 1 commit into
open-devhub:mainfrom
Rockykln:fix/page-metadata-and-404
Nov 15, 2026
Merged

calebephrem merged 1 commit into
open-devhub:mainfrom
Rockykln:fix/page-metadata-and-404

Conversation

@Rockykln

Copy link
Copy Markdown
Contributor

What does this PR do?

Blog posts and pages didn't set their own metadata, so all of them used the root title ("DevHub | Code. Create. Collaborate.") and the same link preview. They now set title, description, canonical URL and Open Graph / Twitter tags from their front matter. Blog posts also get date, authors and tags. The site banner is kept, since openGraph and twitter replace the root values instead of merging.

Unknown slugs like /blog/does-not-exist showed the 404 page but with a 200 status, because notFound() ran inside the Suspense boundary after the response had already started. The slug is now checked before the Suspense boundary. Both routes also got generateStaticParams, so posts and pages are prerendered at build time.

Closes

No related issue.

Type of change(s)

  • Bug fix
  • New feature
  • Documentation update
  • Style / UI change
  • Refactor (no functional change)
  • Performance improvement
  • Other

Checklist

  • I've tested this change locally and it works as expected
  • bun run lint or npm run lint completes without warnings or errors
  • bun run build or npm run build completes successfully
  • My commit messages follow Conventional Commits (e.g. feat: ..., fix: ..., chore: ...)
  • I've updated relevant documentation (README, comments, etc.) if needed
  • I've removed any temporary debugging code (e.g. console.log)

Anything else the reviewer should know?

/blog, /partners and /rules still use the default title. I left them out to keep this PR small and can add them in a follow-up if you want.

Blog posts and pages now get their own title, description and
Open Graph tags. Unknown slugs return a 404 instead of a 200.

@calebephrem calebephrem left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@calebephrem
calebephrem merged commit a4be7c9 into open-devhub:main Nov 15, 2026
3 checks passed
@calebephrem

Copy link
Copy Markdown
Member

thx for contributing!

This branch was successfully deployed

1 active deployment
Preview — d67364ea Deployed Nov 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants