From a09dbca8001f311861af064b4fe853c1e6db8da7 Mon Sep 17 00:00:00 2001 From: Archicratia Date: Tue, 20 Jan 2026 16:39:45 +0100 Subject: [PATCH] p0: legacy hash fallback without rewriting URL --- src/layouts/EditionLayout.astro | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/layouts/EditionLayout.astro b/src/layouts/EditionLayout.astro index a2ac6ba..9e7ee9c 100644 --- a/src/layouts/EditionLayout.astro +++ b/src/layouts/EditionLayout.astro @@ -92,7 +92,8 @@ const GITEA_REPO = import.meta.env.PUBLIC_GITEA_REPO ?? ""; const replacement = document.querySelector(`[id^="${prefix}"]`); if (!replacement) return; - history.replaceState(null, "", `${window.location.pathname}#${replacement.id}`); + console.warn("[anchors] legacy hash fallback used:", `#${oldId}`, "→", `#${replacement.id}`); + // On ne réécrit PAS le hash : on garde la citabilité historique visible. replacement.scrollIntoView({ block: "start" }); })();