create-react-blog
create-react-blog copied to clipboard
Docs on mounting blog under a path like /blog
Often times you'll want the blog to be mounted not at the root path, but under a path like blog.
To do this, there are a couple options:
- If mounting the blog in an app using Navi, you can just pass the blog's
routesobject to the parent up using its root mount:mount({ '/blog': blogRoutes }) - You can use the
basenameprop andPUBLIC_URLto build the blog so that it can be mounted under a non-root URL
Would appreciate any help on writing these docs, as it's not something I've done with create-react-blog, although I know other users are doing so.
@jamesknelson I've done it by changing the root mount, but couldn't figure out how to do it with the second option. Do you have any example on how that works? I can probably write the docs for that.
Hey @jamesknelson did you have any success with this? I am very confused on how to do it, I keep getting a 404 error whenever I change the routes. I'm doing it in multiple places, should I do it in just one place?