codesite2git: README.md: download URLs link to page only, not raw

This commit is contained in:
mappu 2020-05-04 18:08:48 +12:00
parent 5079427678
commit 847b213fe2
1 changed files with 6 additions and 1 deletions

View File

@ -139,7 +139,12 @@ mtime=".$this->lastupdate."
$ret .= "## Download\n\n";
}
foreach($render_downloads as $filename) {
$ret .= "- [⬇️ {$filename}](raw/branch/master/dist-archive/{$filename}) ";
// It's possible to make a general URL that links directly to the raw download endpoint
// But because our markdown is rendered in context of the repo, we can't properly make a relative link
// We could make an absolute link, but that's probably a bad idea w.r.t. any future Git migrations
// Just link to the file in-repo although it won't be a RAW download link
$ret .= "- [⬇️ {$filename}](dist-archive/".rawurlencode($filename).") "; // raw/branch/master/dist-archive/{$filename}
$ret .= "*(".fbytes(filesize($this->dir.$filename)).")*\n";
}