-
-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Netlify-based redirect rules #38
Conversation
✅ Deploy Preview for capable-youtiao-134aad ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
A push to this PR / branch should theoretically deploy the netlify page |
It's pretty important as current search results will break if we don't The preview thingy doesn't seem to be working |
Not sure if this is the best issue/PR to mention this but do we really need Netlify? Does GitHub Pages not satisfy our needs? |
The reason behind the host change is that github doesn't provide a way to set redirection rules. We tried doing them on the front-end instead but docusaurus's plugin doesn't support redirecting from .html extensions. Netlify has an open source plan so it should be free for us maybe hopefully. The PR preview is also a nice bonus |
Proposition for the redirection file:
This should cover everything but I'll still run a test on it once it's live in preview |
I just updated the file which should eventually lead to a deployment of the website. Do I understand it right, that we are catering for a https://sequelize.org/main/manual/dialect-specific-things.html via https://sequelize.org/main/manual/dialect-specific-things.html So a 3 step redirect? |
Also, once this is proven to work, I would a) swap the 302 to 301 |
Yup! Actually right now it's 3 redirections: sequelize.org/main/manual/dialect-specific-things.html Because we have trailing slashes enabled. We should either disable trailing slashes or add them to our redirection file. Just tested (not everything, just this URL) and it looks good through https://capable-youtiao-134aad.netlify.app/main/manual/dialect-specific-things.html |
super nice :) I'm fine with trailing slash or without :D I don't really care |
Actually. It seems that the browser side url resolution is not using a trailing slash hence it seems that both https://capable-youtiao-134aad.netlify.app/docs/v6/core-concepts/getters-setters-virtuals are valid depending on how you ended up on that page. In that case I would probably vote for dropping the trailing slash |
If the site is fully static, it's probably netlify that is adding the trailing slash |
ah you have found it already. :D |
Ah, I missed that comment. Thanks! |
I just added trailing slashes to the Docusaurus config |
As discussed on slack, I'm |
Supersedes #16. Can be tested here: https://capable-youtiao-134aad.netlify.app/
The problem is however, that the urls don't match:
I guess we could somehow walk through the file system and generate the redirects file automatically but is that worth it and do we really care enough to try?
Please note that the PR is currently only half working.
/manual
should be replaced with something else (as indicated above).