Global handle function for Remix/React Router v7

未关闭
#18 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

@mateussilva92 已经在做这个了。

开始于 2026年1月6日。

  • #19 来自 @mateussilva92 —— 未关闭

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
react, typescript
领域
web-dev

调研方向

首先阅读单个 route handle 函数的 sitemap 生成行为以及提议的 root.tsx handle 路径。验证 Remix/React Router v7 路由的处理方式,以及只有在某个路由没有 sitemap handle 时才使用 root handle。完成标准是共享逻辑能够覆盖所有路由,而无需在每个路由中重复备用语言逻辑。

由索引模型根据 Issue 内容生成。

描述

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,

主要语言
TypeScript
星标
96
派生
9
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

code-forge-io/seo-tools 的其他 Issue

查看 code-forge-io/seo-tools 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。