Skip to content

Manually register component at slug #4825

Answered by slorber
yiliansource asked this question in Q&A
Discussion options

You must be logged in to vote

You'd rather configure redirects on the server, using your hosting provider configuration, cf what we do on the Docusaurus site itself using Netlify _redirects: https://github.com/facebook/docusaurus/blob/master/website/static/_redirects

Using client-side redirects like <Redirect> is not really the recommended way to redirect an app: the redirect is done very late, only once the React app has been mounted/hydrated on the client. Eventually, using our client redirects plugin will be better than <Redirect> because it creates simple html files, not requiring hydrating React.

Is it possible to register a component at a specific slug manually, instead of having to specify it via the pages/* f…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@yiliansource
Comment options

@yiliansource
Comment options

@slorber
Comment options

Answer selected by yiliansource
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants