feat(site-migrator): add resolveIdTemplate for downstream id token resolution#906
Open
YusukeHirao wants to merge 1 commit into
Open
feat(site-migrator): add resolveIdTemplate for downstream id token resolution#906YusukeHirao wants to merge 1 commit into
YusukeHirao wants to merge 1 commit into
Conversation
…am id token resolution
rewritePageRefs が同一オリジンのページ参照に対して残す `{{<id>}}` token を、後段
ビルドツール側で実 URL に解決するための純関数を追加する。site-migrator 自身は
出力ディレクトリ構造やルーティング規約を知らないため、解決ロジックはここで API
として用意して呼び出し側に委ねる。
scaffold + kamado への組み込みは別 PR で対応。
This was referenced Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rewritePageRefsが残す{{<id>}}token を実 URL に解決する純関数resolveIdTemplateを追加。@example+ spec (8 ケース) + README 追記まで揃える。仕様メモ
{{42}}?q=foo#fragのような末尾?query#fragmentは idMap の URL の後ろにそのまま連結(マージしない、必要なら呼び出し側で前処理)。{{42}}のまま残しonUnresolved(42)を呼ぶ。リンク切れの早期検出が目的でフェイルセーフは行わない。{{name}}のような mustache は触らない。Follow-up
@d-zero/shared等への分割は別 issue で管理予定。Test plan
yarn lintyarn test(144/144 pass)🤖 Generated with Claude Code