From 847b213fe2ca267290eedbb7d346b01a419b0289 Mon Sep 17 00:00:00 2001 From: mappu Date: Mon, 4 May 2020 18:08:48 +1200 Subject: [PATCH] codesite2git: README.md: download URLs link to page only, not raw --- codesite2git | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/codesite2git b/codesite2git index a957787..95e4367 100755 --- a/codesite2git +++ b/codesite2git @@ -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"; }