-
Notifications
You must be signed in to change notification settings - Fork 303
Add rendering of the web into a directory #2174
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
base: master
Are you sure you want to change the base?
Conversation
As long as the output is good, I won't be pedantic about the code. So, feel free to go ahead and thanks for working on this! |
Yeah, we've wanted this! |
We should start to think about what this means for the team and rust version bits, which are dynamic. Probably just regen a couple times a day and have a manual trigger. Probably via GitHub actions. |
Yes, deploying from GH actions e.g. once per day, plus triggering the deploy when a release happens, is IMO enough. What about the approach to land this? Are you fine with me completely ripping out Rocket and "atomically" switching to the static web? We could do that using other approaches than Heroku, I suppose. Or do you want the static and dynamic approach to live side-by-side for some time? |
@senekor Any thoughts about how to approach the change? Are you fine with landing a PR that completely switches the website over to a static web (that would be ofc the simplest)? |
Yeah, I'm fine with switching over all at once. |
I think it should be fine as long as you can generate redirects. cc @rust-lang/infra for the Heroku part |
What do you mean by redirects? |
There is some redirect logic in <meta http-equiv="refresh" content="0; url={{ url }}"> |
I see. Hmm, that is a bit hacky, but as a workaround why not, I guess. Depending on the method for static deployment that we choose, we might want to use something better on the webserver layer. |
I would do both the meta refresh and a |
I pushed an MVP, together with GitHub Pages integration. A demo is available here: https://kobzol.github.io/www.rust-lang.org/ Some things missing/unclear:
|
Probably not? The instance is dead for a while, and no one had the bandwidth/motivation to fix it. (It's for translation.) |
This is an experimental implementation of turning the Rust website from a dynamic website to a static website (a bunch of assets in a directory on disk).
I sketched out a simple API for rendering the individual pages/routes, and got the index and governance pages to work, including translations.
If you agree with the approach, I can continue :)