diff --git a/web-ui/src/app/scripts/page.tsx b/web-ui/src/app/scripts/page.tsx index 70508f0..9a4c359 100644 --- a/web-ui/src/app/scripts/page.tsx +++ b/web-ui/src/app/scripts/page.tsx @@ -216,8 +216,12 @@ function ScriptTable({ {rows.map((s) => { const disabled = s.status === "archive" || s.status === "deleted"; + // giteaBase is the SCRIPTS.md *file* URL (…/scripts/SCRIPTS.md); the + // per-script "מקור" link needs the scripts/ *directory*, so strip the + // trailing filename before appending the script name (else the link + // becomes …/scripts/SCRIPTS.md/ and 404s on Gitea). const href = giteaBase - ? `${giteaBase.replace(/\/$/, "")}/${s.name}` + ? `${giteaBase.replace(/\/[^/]+$/, "")}/${s.name}` : null; return (