Having a link to latest spec


#1

e.g. http://spec.commonmark.org/latest instead of http://spec.commonmark.org/0.27/

What do you think? Where can I contribute to make it happen?


#2

GitHub pages doesn’t allow redirects using .htaccess.
I tried adding a symlink from latest/ to 0.27/.
That worked, though you need /latest/ (with the
trailing slash).

However, I reverted this experiment, because I’m
worried about broken links if people link to the
/latest/… URLs and a new version of the spec
is released. We have to balance the broken links
problem against the one extra step needed to get to
the latest version of the spec.

I’m open to ideas.


#3

How about making /latest a seperate page which redirects to /0.27 (using JavaScript) when the page is loaded?


#4

+++ Chris Alley [Apr 23 17 13:27 ]:

How about making /latest a seperate page which redirects to /0.27
(using JavaScript) when the page is loaded?

Sounds like a good idea. As long as the page is dynamically
generated, I can have the update script change where it
links to.

I’m no js expert, so if you want to suggest some code, that
would be welcome.


#5

I had a quick look at the spec website repo. It looks like you already implemented this approach in 2015, but using the URL http://spec.commonmark.org/current instead.


#6

Oh, yes, I forgot about that. Clearly the Makefile
was set up wrong, so this wasn’t being updated and
still pointed to 0.21.

I’ve fixed that now, I think.


#7

Thanks @chrisalley and @jgm

It would also be nice to have HTTPS for the spec, e.g. https://spec.commonmark.org/0.27/

I see you are using NGINX, using Let’s Encrypt you would have free certificates: https://www.nginx.com/blog/free-certificates-lets-encrypt-and-nginx/


#8

+++ Dorian [Apr 24 17 17:38 ]:

It would also be nice to have HTTPS for the spec, e.g.
[4]https://spec.commonmark.org/0.27/

I see you are using NGINX, using Let’s Encrypt you would have free
certificates:
[5]https://www.nginx.com/blog/free-certificates-lets-encrypt-and-nginx/

Not sure how to do that in this case, since the site is a
GitHub Pages site. The Settings tab in GitHub says that
https is “unavailable for your site because you have a
custom domain configured (spec.commonmark.org).”


#9

You can use Cloudflare, It’s how I do it on Doma.io

Dorian


#10

To be clear, following steps like https://blog.cloudflare.com/secure-and-fast-github-pages-with-cloudflare/ worked well for me in the past, too.


#11

Why is https needed for the spec?