Skip to content

Github Pages 404 Magic, well... maybe just sleight of hand. #76

nrn opened this Issue Jan 5, 2012 · 2 comments

2 participants

nrn commented Jan 5, 2012

I mentioned this on the pull request, but I think it deserves it's own day in the sun:

This is up temporarily as an example of how we could use the clients new ability to read it's own page list from the url to self host the projects page using gh-pages. It uses two static html files, index.html and 404.html, so that any request to the root folder gets index.html returned which includes the welcome-visitors page div, and any other arbitrary page url returns 404.html, which then reads the url and loads the appropriate json. It is a bit of a mess, having all the pages and info placed according to how the server expects to find them, but with no htaccess file or any other way to redirect urls, it's still possible to have a fully functioning read only SFW served.

The general work flow seems that it would be to have a local wiki on your machine that you edit to your hearts content, and a build script in the gh-pages repo that copies the pages over, adding .json to the end, as well as the javascript version of client.js and plugins, and then pushes it up to gh. Or something along those lines.

If you're interested I think this could be very nice way to do the video page, giving people a hands on read only example of what you are talking about while they watch.



Whoa, that's amazing. Now I get why moving this simple bit of logic, enumerating the wiki pages cited by a url, from the server to the client is so profound.

Two more client-side tweaks will complete this read-only utility: 1) remote references should go straight to the remote site (via CORS), not through the origin as a proxy, and, 2) edits should go immediately to html5 local storage.

nrn commented Jan 5, 2012

Thanks, I'm really happy with how that turned out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.