S(GH)PA: The Single-Page App Hack For GitHub Pages






 



 


For some time now, I’ve wanted the ability to route paths for a GitHub Pages website to its index.html for handling as a single-page app (SPA). This is table-stakes because such apps require all requests to be routed to one HTML file, unless you want to copy the same file across all of your routes every time you make a change to the project. Currently, GitHub Pages doesn’t offer a route-handling solution; the Pages system is intended to be a flat, simple mechanism for serving basic project content.

The Single-Page App Hack For GitHub Pages

In case you weren’t aware, GitHub does provide one morsel of customization for your project website: the ability to add a 404.html file and have it served as your custom error page. I took a first stab at an SPA hack simply by duplicating my index.html file and renaming the copy to 404.html.

The post S(GH)PA: The Single-Page App Hack For GitHub Pages appeared first on Smashing Magazine.

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

dodici − tre =

Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.