mirror of
https://github.com/JonasunderscoreJones/blog.jonasjones.dev.git
synced 2025-10-23 03:19:19 +02:00
added post backend
This commit is contained in:
parent
85b846f6be
commit
9b28792c91
5 changed files with 96 additions and 16 deletions
|
@ -1,9 +1,19 @@
|
|||
import Home from './routes/Home.svelte';
|
||||
import Post from './routes/Post.svelte';
|
||||
import Loading from './routes/Loading.svelte';
|
||||
import NotFound from './routes/NotFound.svelte';
|
||||
import wrap from 'svelte-spa-router/wrap'
|
||||
|
||||
export default {
|
||||
'/': Home,
|
||||
'/post/:year/:month/:day/:title': Post,
|
||||
'/post/:year/:month/:day/:title': wrap({
|
||||
// Note that this is a function that returns the import
|
||||
asyncComponent: () => import('./routes/Post.svelte'),
|
||||
// Show the loading component while the component is being downloaded
|
||||
loadingComponent: Loading,
|
||||
// Pass values for the `params` prop of the loading component
|
||||
loadingParams: {
|
||||
message: 'Loading the Name route…'
|
||||
}
|
||||
}),
|
||||
'*': NotFound
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue