Closed gregoriopellegrino closed 4 years ago
That sounds like a good idea 😃
We would have to do a client-side redirect since this is a static site. Leaving this note here to reference best practices.
This is where we get the latest release from github, used right now on the homepage, but could be used on a /download-latest
page too:
https://github.com/daisy/epubcheck-website/blob/master/src/_data/githubRelease.js
Btw the link is here: https://daisy.github.io/epubcheck-website/download-latest/
Great, I see it is a JS script. Do you think would it possible to make something server-side (I know it is a static website).
My idea is to have in the guide something like:
wget https://daisy.github.io/epubcheck-website/download-latest/
To be able to make all the "installation" from CLI.
In any case it is not urgent and we can leave the issue open for a later version.
What if the installation guide has a link directly to the github file download? E.g.
wget https://github.com/w3c/epubcheck/releases/download/v4.2.2/epubcheck-4.2.2.zip
To generate the above, in the markdown file, you would just write:
`wget {{ githubRelease.latest.url }}`
githubRelease.latest
is a javascript function which uses the GitHub API to get a link to the latest download.
Then, every time the site is built (presumably with each EPUBCheck release), the link would get updated.
We may not be able to do a server-side redirect (even in its final location, we might not have fine-grained control over the server settings).
This githubRelease.latest
is the same function used by the landing page and the /download-latest
page (which is a meta refresh
redirect, not JS).
Great, I've added other two properties: name
and filename
I think it would be really useful to have a direct link, like epubchek.org/download-latest, that points to the download file of the latest version of EPUBcheck (right now it would be https://github.com/w3c/epubcheck/releases/download/v4.2.2/epubcheck-4.2.2.zip ).
This would simplify part of the explanation for the installation (issue #7 )