News for hackers. Stuff that matters.
Re:Single Page Apps for GitHub Pages by maxmcd on Wednesday July 06, 2016 @04:20PM (#12045627)
If you're already using React-Router a nice solution might be to infer all of the valid paths from the React-Router config and push valid pages for those paths to gh-pages. Would involve an unusual build step, but would get you valid 404 responses and avoid the redirect.
Re:Single Page Apps for GitHub Pages by teen on Wednesday July 06, 2016 @05:00PM (#12045871)
Aren't some wildcards? such as app/users/<username>
Re:Single Page Apps for GitHub Pages by maxmcd on Wednesday July 06, 2016 @11:42PM (#12047360)
Ah, whoops, yep, fair enough.
Re:Single Page Apps for GitHub Pages by giancarlostoro on Wednesday July 06, 2016 @03:53PM (#12045418)
MD-Wiki[0] kind of does this already doesn't it?

http://dynalon.github.io/mdwiki/#!index.md

Though there may be differences to this approach I'm unaware of.

Edit:

One notable difference between the GitHub SPA page is the URLs are SEO friendlier than MDWiki seems to be.

Re:Single Page Apps for GitHub Pages by adnanh on Wednesday July 06, 2016 @04:25PM (#12045657)
One could also enable hashtag navigation :-)
Re:Single Page Apps for GitHub Pages by oceanswave on Wednesday July 06, 2016 @05:29PM (#12046020)
yeah, my first thought too... not sure about the pros/cons regarding SEO
Re:Single Page Apps for GitHub Pages by hartator on Wednesday July 06, 2016 @04:36PM (#12045734)
I don't really see why this is GitHub Pages specific.
Re:Single Page Apps for GitHub Pages by rafrex on Wednesday July 06, 2016 @05:53PM (#12046124)
It's not. You can use it with any server that can serve a custom 404 page. I use it locally with http-server to work on react single pages apps that don't have a backend.
Re:Single Page Apps for GitHub Pages by slmyers on Wednesday July 06, 2016 @04:11PM (#12045548)
[angular-cli](https://github.com/angular/angular-cli) has a `push to github` hook. Never had any problems with it... not that I've used it a bunch either.

edit: To be clear it pushes to a gh-pages branch on the appropriate repo, ie, sets up an Angular2 SPA.

Re:Single Page Apps for GitHub Pages by fredgrott on Wednesday July 06, 2016 @05:43PM (#12046082)
maybe I am missing something..I just assumed that people were using tiddlywiki which a single app in form of a webpage itself
Re:Single Page Apps for GitHub Pages by skdd8 on Wednesday July 06, 2016 @04:21PM (#12045631)
This is cool, but the beauty of Jekyll is that you can add content in markdown easily and without much JSX/HTML manipulation. This is specially useful with adding blog-posts and tutorials

I am by no means defending Jekyll. I think it is an OK solutions for the problem in question. The only reason why I prefer it, is for the markdown (human friendly) formatting.