adjust readme
This commit is contained in:
parent
4e0116b8d2
commit
134d09f77d
@ -4,7 +4,7 @@ A tiny unframework for making SPAs in Svelte.
|
||||
|
||||
## Overview
|
||||
|
||||
This library intercepts clicks on internal links and turns them into `history.pushState()` calls. The browser's `location` object is exposed through a Svelte store, which updates upon these intercepted clicks or on other `popstate` events. It also optionally provides a mechanism for hosts which do not support falling back to `index.html` for missing files.
|
||||
This library intercepts clicks on internal links and turns them into `history.pushState()` calls. The browser's `location` object is exposed through a Svelte store, which updates upon these intercepted clicks and upon `popstate` events. It also optionally provides a mechanism for hosts which do not support falling back to `index.html` for missing files.
|
||||
|
||||
## Setup
|
||||
|
||||
@ -12,7 +12,7 @@ If your host supports falling back to `index.html` for requests of all unknown f
|
||||
|
||||
### If your host does not support falling back to `index.html`
|
||||
|
||||
You'll use a custom 404 page that redirects to the root and encodes the original URL is a query parameter. The root page then rewrites the URL with `history.replaceState()`.
|
||||
You'll use a custom 404 page that redirects to the root and encodes the original URL in a query parameter. The root page then rewrites the URL using `history.replaceState()`.
|
||||
|
||||
Add [`404.html`](404.html) to your project at the appropriate path. Uncomment the lines at the top of [`location.js`](location.js) to handle the rewrite after the redirection.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user