Currently, siteRoot does not handle basePaths as part of the URL. We need to add a basePath option that can handle a site hosted at a sub-directory. There are also circumstances where a user may want the local server to also use this basePath (eg. http://localhost:8080/my-blog/ being the root), so we should add an option to handle that as well, possibly called devUsesBasePath
basePath as an option in the default config and optionally use it in the Router component via react-router's basepath prop and also the <base> html tag (I think). basePath will also need to be considered in most (not all) places that siteRoot is used. The one that comes to mind is sitemap.xml generation. basePath should also be normalized to include the leading slash and not a trailing slash.devUsesBasePath as an option in the default config. When true it should use the basePath option above in dev mode to support use cases like viewing the dev site from a url like http://localhost:8080/my-blog/.siteRoot do not contain any sub routes and that trailing slashes are normalized where they need to be. With this change, the siteRoot should only be a protocol://sub.domain.suffixIf you would like to implement this feature or fix, please comment below with your estimated timeline for completion and wait for a 馃憤to get started. This is mainly so we don't have multiple people workin on the same thing. 馃槃 Thanks!
Working on it right now!
Thanks! This will allow react-static to be used with github pages.
Done!
Most helpful comment
Working on it right now!