Global handle function for Remix/React Router v7

Open
#18 0 comments 0 reactions 0 assignees View on GitHub

@mateussilva92 is already working on this.

Since Jan 6, 2026.

  • #19 by @mateussilva92 — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
react, typescript
Domain
web-dev

Research direction

Start by reading the sitemap generation behavior for individual route handle functions and the proposed root.tsx handle path. Verify how Remix/React Router v7 routes are processed and whether a root handle is used only when a route has no sitemap handle. Done means shared logic can cover all routes without duplicating alternate-language logic in each route.

Written by the indexing model from the issue text.

Description

Currently, sitemap generation for Remix / React Router v7 only supports handle functions defined on individual routes.

This works well when route-specific logic is needed, but there’s no way to apply shared logic across all routes.

A common example is generating alternate language links: every route may need the same set of alternates, yet today this logic has to be duplicated in each route’s handle.

One possible approach to support this use case would be to allow using the handle from root.tsx, which would run if the individual route doesn't have sitemap handle to be processed.

Let me know if this approach makes sense for the project.

I've already opened a PR for this, is shows best the approach taken,

Dominant language
TypeScript
Stars
96
Forks
9
PR merge metrics
No merged PRs in 30d

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from code-forge-io/seo-tools

All issues in code-forge-io/seo-tools

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.