Skip to content

TomasHubelbauer/cra-location-hash-router

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRA location.hash router

WEB

In this repository I validate my idea for client+server routing solution using the URL fragments.

The idea is for cases where your SPA is served from a file server (like GitHub Pages) and you cannot set a catch-all route for index.html.

GitHub Pages has 404.html which can be abused to redirect to index.html, but it is not good for SEO indexing to return content with 404 responses. This solution doesn't produced nice URLs, it relies on the octothorpe character, but it works without the 404 and is simple to implement on the client side.

https://github.com/TomasHubelbauer/cra-location-search-router

To-Do

Fix the GitHub security alert

Set up GitHub Actions for the CRA and use as the GitHub Pages site

Refresh the CRA scaffold while I'm at it.