Skip to content

Refactor metadata templates and update page titles/descriptions#3516

Open
tom2drum wants to merge 8 commits into
mainfrom
tom2drum/metadata-desc-updates
Open

Refactor metadata templates and update page titles/descriptions#3516
tom2drum wants to merge 8 commits into
mainfrom
tom2drum/metadata-desc-updates

Conversation

@tom2drum

@tom2drum tom2drum commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Description and Related Issue(s)

Refactors the metadata generation system and updates page-level SEO copy. Page <h1> titles no longer include the chain name (that context moves to server-rendered meta titles); per-route descriptions are more specific; and the template system is consolidated into a single map with optional enhanced variants.

Proposed Changes

  • Unified metadata templates — Merged title.ts and description.ts into templates/index.ts with per-route default and optional enhanced title/description templates.
  • compileValue enhancement — Accepts { default, enhanced? } objects and uses the enhanced template when all its placeholders are populated from API data.
  • Placeholder renames%network_name%%chain_name%, %network_title%%chain_explorer_title%, %network_gwei%%gwei_name%, %id_cap%%id_formatted%.
  • Page-specific descriptions — Replaced the generic default description on list/index pages (e.g. /txs, /blocks, /gas-tracker) with route-specific copy.
  • Page title simplification — Removed conditional chain-prefixed <PageTitle> titles across index pages (transactions, tokens, gas tracker, user ops, etc.); chain context is handled in meta titles.
  • SEO enhanced data scopeNEXT_PUBLIC_SEO_ENHANCED_DATA_ENABLED now only pre-renders meta titles server-side; removed h1 injection behavior from page components. Gas tracker FAQ is always shown.
  • Tests — Expanded metadata snapshot tests for address and stats detail routes with/without enhanced data.

Environment variable changes

  • NEXT_PUBLIC_OG_ENHANCED_DATA_ENABLED - Changed default value from false to true

Documentation-only updates in docs/ENVS.md (no validator changes):

  • NEXT_PUBLIC_OG_DESCRIPTION — Example placeholder updated from %network_title% to %chain_name% to match the new template parameter naming.
  • NEXT_PUBLIC_SEO_ENHANCED_DATA_ENABLED — Description updated to reflect that the flag only pre-renders page titles server-side (h1 injection removed).

Checklist for PR author

  • I have tested these changes locally.
  • I added tests to cover any new functionality, following this guide
  • Whenever I fix a bug, I include a regression test to ensure that the bug does not reappear silently.
  • If I have added a feature or functionality that is not privacy-compliant (e.g., tracking, analytics, third-party services), I have disabled it for private mode.
  • If I have added, changed, renamed, or removed an environment variable
    • I updated the list of environment variables in the documentation
    • I made the necessary changes to the validator script according to the guide
    • I added "ENVs" label to this pull request

@tom2drum tom2drum added the ENVs label Jun 9, 2026
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. To trigger a review, include @coderabbitai review in the PR description. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 72d90678-0fe2-4b9c-8526-e3c5bccbfc65

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

tom2drum and others added 4 commits June 9, 2026 15:17
* change default value for NEXT_PUBLIC_OG_ENHANCED_DATA_ENABLED to "true"

* add "add-new-page" skill for scaffolding new pages

Adds an interactive agent skill that scaffolds a new page (index /
detail / general) from per-type templates and wires it into navigation,
metadata, server guard, route types, and analytics. Layout-only: data
fetching, pagination, filtering, sorting and action bars are left as
TODOs and out of scope.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* add tabs support to add-new-page skill

Step 0 now decides layout (tabs or not); tabbed pages get a RoutedTabs
shell plus one content body per tab, each in its own kebab-case
sub-folder (mirroring src/slices/tx/pages/details). Adds PageWithTabs
and GeneralInfo templates and the details-tab-comes-first rule.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* [skip ci] tweaks

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant