Prerender static pages in post_deploy hook#447
Open
nykula wants to merge 2 commits into
Open
Conversation
Author
|
Added code that applies translations client-side. It relies on the following being run somewhere on server (if not run, nothing breaks, the website just remains in English): tx pull -a --minimum-perc 85 --json
mv translations/*json public/translations/For |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re: #417, #423
Introduce an
app:prerendercommand that renders home page, Download, News, Get Involved, Showcase, Competitions, Branding and Wiki to static pages inpublic/. Call it fromhooks/post_deploy- is this how the website gets updated in production? You can also call it in cron.Major difference: trailing slashes, because it's easiest to get working. Where there was
/download, now there is/download/. The web server should redirect to a trailing slash automatically when it sees a directory.Change e.g.
/download/artifact/...to/download-artifact/...so that the/download/static page doesn't prevent nightly downloads from working. Well, they still don't work while the backend is down due to high load, but I get 403 errors from GitHub API when trying to generate multiple download URLs in a row for static pages, so leaving this as is for now.Add an http-equiv redirect under
/documentation/. Not a good way to make a redirect, but better than a 502 error.Note: I think one will need to change web server config so that the HTML is cached at most for a day.
Would these changes be okay?