Merge pull request 'fix(scripts): קישור "מקור" שבר על SCRIPTS.md בנתיב' (#285) from worktree-fix-scripts-source-link into main
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 46s
G12 Leak-Guard / leak-guard (push) Successful in 4s
Lint — undefined names / undefined-names (push) Successful in 10s

This commit was merged in pull request #285.
This commit is contained in:
2026-06-17 04:55:32 +00:00

View File

@@ -216,8 +216,12 @@ function ScriptTable({
<TableBody>
{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/<name> and 404s on Gitea).
const href = giteaBase
? `${giteaBase.replace(/\/$/, "")}/${s.name}`
? `${giteaBase.replace(/\/[^/]+$/, "")}/${s.name}`
: null;
return (
<TableRow