Closed felixguendling closed 8 years ago
Yeah, we should have something like a travis job that builds gh-pages from a master branch.
This is an excellent idea. I think it makes sense to host them here on GitHub. Seems unlikely we will get them put back up on elm-lang.org
I think it's better to do it after renaming the library from elm-community/elm-webgl
to elm-community/webgl
#16
why?
There's no telling how long the rename will take, since it will need to wait for whitelisting, similarly to https://github.com/elm-community/elm-linear-algebra/issues/12. Self-hosting the WebGL examples will be quick to accomplish and will be a big improvement in the documentation.
@nphollon because people may link to it. I don't like the idea of creating temporary urls. Another option may be to publish it from the elm-community github pages.
That's a good point. Putting the examples on elm-community.github.io sounds like a good way of getting this fixed as quickly as possible. Can we get some feedback from the core @elm-community members? (@rgrempel)
I guess that the nice thing about using gh-pages here is that it is sort of self-contained. But I do understand the concern about the planned rename and what that would do for URLs. If I remember correctly, Github automatically redirects most things, but not gh-pages. It would really be ideal if there were some way to redirect the gh-pages approach once the name change occurs.
What would putting the examples on elm-community.github.io entail? Would it be some kind of automated build script that commits something to that repository? How would setting up the permissions for that compare to setting up the permissions for committing to gh-pages here? Or could we commit the examples to the elm-community.github.io repository manually (and not necessarily update them on every single new commit)?
It looks like we might be able to set up manual redirects using https://help.github.com/articles/redirects-on-github-pages/
I know nothing about Jekyll, so I don't know how viable this solution is.
I'm not sure whether that would let us redirect from a different repository -- it might be only for redirecting within a single repository.
There is another approach that might work well, though. It looks like you can use a custom DNS domain to serve gh-pages ... the page I saw is here:
https://help.github.com/articles/using-a-custom-domain-with-github-pages/
I did happen to register elm-community.org, in case we ever needed it. So, I wonder whether I could set things up so that, for instance, webgl.elm-community.org pointed to the gh-pages for this repository? I think that might give us the best of both worlds -- that is, the simplicity of gh-pages, and a stable URL.
While I'm doing that, I suppose I may as well also make elm-community.org itself point to elm-community.github.io
Let me know if that sounds like a good plan.
I think that sounds like a good plan. @w0rm @felixguendling ?
That would be great.
@nphollon it's a good plan!
I can work on this on the weekend. My colleague has done a similar thing in order to deploy our elm-street-404 game https://github.com/zalando/elm-street-404/blob/master/gh-pages.sh
@felixguendling @rgrempel I added a simple shell script that compiles the examples and pushes them to the gh-pages branch
Actually, the examples are working http://elm-community.github.io/elm-webgl/cube.html
but we need CNAME for elm-community.github.io
Looks great! Thank you! Does someone still have the link images?
Old URLs:
Cannot find "Crate".
But the others are still available on web.archive.org: https://web.archive.org/web/20140521090540/http://elm-lang.org/screenshot/WebGL/Triangle.jpg https://web.archive.org/web/20140521090540/http://elm-lang.org/screenshot/WebGL/Cube.jpg https://web.archive.org/web/20140521090540/http://elm-lang.org/screenshot/WebGL/Thwomp.jpg https://web.archive.org/web/20140521090540/http://elm-lang.org/screenshot/WebGL/FirstPerson.jpg
But I'm not sure whether Git is a good option for binary files.
Same applies here: it's probably better to link to a stable URL providing these images.
@felixguendling I updated my pull request with screenshots and fixed the readme
If you still need them, the screenshots (including Crate.jpg) can be found at https://github.com/elm-lang/elm-lang.org/tree/cd1e6e139d12c17d5186594d7577ee4f6bd52a1d/resources/screenshot/WebGL
Thanks, @w0rm already included them in the pull request #28: https://github.com/elm-community/elm-webgl/pull/28/files
I think this will really improve the first impression for new comers. Currently, the page doesn't look very appealing (dead links, images not loading).
What would be the next step? Someone needs to check the PR and the domain needs to point to the right location, as @rgrempel described (probably webgl.elm-community.org).
I don't mind merging this as it is now and publishing the new version with fixed docs.
I have now added the CNAME file to the gh-pages
branch, with contents of webgl.elm-community.org
, and made the required DNS entry. So, now, a link of the following kind should work:
I moved examples into subfolder and modified the gh-pages script to setup the domain name.
Published version 3.0.2, that has screenshots which link to the compiled examples
The example links on the README frontpage are dead (404). I think it would make sense to move them to GitHub (or reactivate them on elm-lang.org) or remove them.