[PR #8486] [MERGED] docs(metadata): centralize SEO metadata with createMetadata helper #8008

Closed
opened 2026-03-13 13:56:32 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/8486
Author: @0-Sandy
Created: 3/7/2026
Status: Merged
Merged: 3/9/2026
Merged by: @himself65

Base: canaryHead: add-metadata


📝 Commits (4)

  • 0338a0e refactor(metadata): add createMetadata helper
  • 24d861e fix: fixed small bugs and formated code
  • e06a8ed fix(docs): move RSS alternative to blog pages only
  • 2ecc914 style: format code

📊 Changes

12 files changed (+95 additions, -65 deletions)

View changed files

📝 landing/app/blog/[[...slug]]/page.tsx (+5 -4)
📝 landing/app/blog/layout.tsx (+21 -8)
📝 landing/app/careers/page.tsx (+3 -2)
📝 landing/app/changelog/page.tsx (+4 -3)
📝 landing/app/community/page.tsx (+3 -2)
📝 landing/app/docs/[[...slug]]/page.tsx (+3 -2)
📝 landing/app/enterprise/page.tsx (+3 -2)
📝 landing/app/layout.tsx (+3 -32)
📝 landing/app/products/[tab]/page.tsx (+2 -1)
landing/lib/metadata.ts (+47 -0)
📝 landing/lib/rss.ts (+1 -1)
📝 landing/lib/utils.ts (+0 -8)

📄 Description

This PR adds createMetadata helper to keep metadata configuration in one place.

Changes

  • Added a createMetadata helper
  • Updated pages and layouts to use the helper
  • Moved baseUrl to the new metadata module
  • Added an RSS alternate so browsers can discover the blog feed

Summary by cubic

Centralized SEO metadata with a createMetadata helper to enforce site-wide defaults (Open Graph/Twitter, icons, base URL) and expose RSS via metadata alternates on blog pages only.

  • Refactors

    • Adopted createMetadata in blog (layout and pages), docs, products tabs, careers, community, enterprise, changelog, and root layout.
    • Moved baseUrl to lib/metadata; lib/rss now imports it; removed from lib/utils.
    • Added page-specific overrides where needed (e.g., blog openGraph.url and OG/Twitter images).
  • Bug Fixes

    • Limited RSS alternates to blog pages and aligned OG/Twitter defaults and fallback metadata across pages.

Written for commit 2ecc914b74. Summary will update on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/8486 **Author:** [@0-Sandy](https://github.com/0-Sandy) **Created:** 3/7/2026 **Status:** ✅ Merged **Merged:** 3/9/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `add-metadata` --- ### 📝 Commits (4) - [`0338a0e`](https://github.com/better-auth/better-auth/commit/0338a0ed14b5c4a455c76ade7148afe492c58065) refactor(metadata): add createMetadata helper - [`24d861e`](https://github.com/better-auth/better-auth/commit/24d861ea19e391f20c99b17f03df4616b8181354) fix: fixed small bugs and formated code - [`e06a8ed`](https://github.com/better-auth/better-auth/commit/e06a8edbb06c53e6badc3a129bd628c7522826b9) fix(docs): move RSS alternative to blog pages only - [`2ecc914`](https://github.com/better-auth/better-auth/commit/2ecc914b74c9a1944cd9c3853fce94fffbe85eb7) style: format code ### 📊 Changes **12 files changed** (+95 additions, -65 deletions) <details> <summary>View changed files</summary> 📝 `landing/app/blog/[[...slug]]/page.tsx` (+5 -4) 📝 `landing/app/blog/layout.tsx` (+21 -8) 📝 `landing/app/careers/page.tsx` (+3 -2) 📝 `landing/app/changelog/page.tsx` (+4 -3) 📝 `landing/app/community/page.tsx` (+3 -2) 📝 `landing/app/docs/[[...slug]]/page.tsx` (+3 -2) 📝 `landing/app/enterprise/page.tsx` (+3 -2) 📝 `landing/app/layout.tsx` (+3 -32) 📝 `landing/app/products/[tab]/page.tsx` (+2 -1) ➕ `landing/lib/metadata.ts` (+47 -0) 📝 `landing/lib/rss.ts` (+1 -1) 📝 `landing/lib/utils.ts` (+0 -8) </details> ### 📄 Description This PR adds `createMetadata` helper to keep metadata configuration in one place. ### Changes - Added a `createMetadata` helper - Updated pages and layouts to use the helper - Moved `baseUrl` to the new metadata module - Added an RSS alternate so browsers can discover the blog feed <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Centralized SEO metadata with a `createMetadata` helper to enforce site-wide defaults (Open Graph/Twitter, icons, base URL) and expose RSS via metadata alternates on blog pages only. - **Refactors** - Adopted `createMetadata` in blog (layout and pages), docs, products tabs, careers, community, enterprise, changelog, and root layout. - Moved `baseUrl` to `lib/metadata`; `lib/rss` now imports it; removed from `lib/utils`. - Added page-specific overrides where needed (e.g., blog `openGraph.url` and OG/Twitter images). - **Bug Fixes** - Limited RSS alternates to blog pages and aligned OG/Twitter defaults and fallback metadata across pages. <sup>Written for commit 2ecc914b74c9a1944cd9c3853fce94fffbe85eb7. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 13:56:32 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#8008