Add Dev Container configuration
This adds a new Dev Containers configuration that's compatible with GitHub Codespaces, that contains a fully functional development environment for working on the wxWidgets website.
This is an alternative approach to Vagrant, which can be run not just in Codespaces, but other Dev Container compatible environments like CodeSandbox, as well as locally in Docker Desktop. Though using Codespaces is certainly the easiest out of the box, and doesn't require installing a single thing.
This includes:
- Ruby (3.2)
- Node.js (20)
- Jekyll and all GitHub Pages gems
- Installs NPM packages for assets
- Compiles all assets
- Bootstraps wxWidgets release configs, and pulls download stats used for downloads page
- Compiles translation stats from latest catalogs
The WX_SITE_DIR environment variable is configured in this environment, the same way it is for the Publish GitHub action we have. So all scripts properly setup to use that work just the same.
Unlike the old Vagrant environment, this development environment actually does properly support file watchers for Jekyll. So any changes to most files will automatically be picked up and regenerated.
Only Jekyll is configured to run continuously after booting up, since it supports file watchers. All other aspects need to be manually re-run in terminal if required for changes, such as regenerating translation stats, download stats, and re-compiling assets.
To see this in action, just spin up this pull request in Codespaces. By default, it will open in VS Code for Web, but this can be configured to open in natively running VS Code on desktop by updating your personal GitHub settings (see "Editor preference"). Wait until you see a notification for "Your application running on port 4000 is available." with a "Open in Browser" button, which indicates that Jekyll has started up and is serving the application. It may still take a few seconds for assets to finish compiling and for Jekyll to pick them up and copy them over. If assets don't load properly right away, just give it a moment and refresh.
Once this pull is merged, we can also enable a Codespaces prebuild, which will cache a development image that includes almost everything except the final few custom steps that build assets, translations, download stats, and initial Jekyll build. This is enough to spin up a fully functioning wxWidgets website in development in just under 2 minutes from scratch.