create-react-blog icon indicating copy to clipboard operation
create-react-blog copied to clipboard

Docs on mounting blog under a path like /blog

Open jamesknelson opened this issue 6 years ago • 2 comments

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:

  1. If mounting the blog in an app using Navi, you can just pass the blog's routes object to the parent up using its root mount: mount({ '/blog': blogRoutes })
  2. You can use the basename prop and PUBLIC_URL to 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 avatar Mar 21 '19 02:03 jamesknelson

@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.

einsmein avatar Mar 21 '20 20:03 einsmein

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?

sviho avatar Sep 07 '20 14:09 sviho