Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
// Documentation:
// - https://github.com/devcontainers/images/tree/main/src/jekyll
// - https://github.com/devcontainers/images/tree/main/src/jekyll # Don't use, it pegs Ruby 3.4
// - https://github.com/devcontainers/features/tree/main/src/node
// - https://code.visualstudio.com/docs/remote/ssh#_always-installed-extensions

{
"name": "Jekyll",
"image": "mcr.microsoft.com/devcontainers/jekyll",
"image": "mcr.microsoft.com/devcontainers/ruby:3.3-bookworm", // We want 3.3.4 exactly but let's try this
"features": {
// Install rbenv (no Ruby yet); postCreateCommand installs the version from .ruby-version
"ghcr.io/devcontainers/features/ruby:2": {
"version": "none",
"versionManager": "rbenv"
},
// This feature cannot read .node-version, so update this pin alongside that file
"ghcr.io/devcontainers/features/node:2": {
"version": "24",
"pnpmVersion": "none", // We use Yarn 4 via Corepack
"installYarnUsingApt": false // We use Yarn 4 via Corepack
}
},
"postCreateCommand": "/bin/bash -c 'set -e; rbenv install --skip-existing; rbenv rehash; npm install -g corepack; corepack enable; corepack prepare yarn@4.18.0 --activate; yarn install --immutable; bundle install'",
"postCreateCommand": "/bin/sh -c 'set -e; npm install -g corepack; corepack enable; corepack prepare yarn@4.18.0 --activate; yarn install --immutable; bundle install'",
"customizations": {
"vscode": {
"extensions": ["html-validate.vscode-html-validate"]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Also you can run this to update your environment to match the GitHub Pages (no P
bundle update --conservative # "--consersative" ignores updates that GitHub Pages is not using
```

Keep [.ruby-version](.ruby-version) matching [the Ruby that GitHub Pages runs](https://pages.github.com/versions/) (used by CI, the dev container, and rbenv locally):
Keep [.ruby-version](.ruby-version) matching [the Ruby that GitHub Pages runs](https://pages.github.com/versions.json) (used by CI, the dev container, and rbenv locally):

```sh
curl -s https://pages.github.com/versions.json | jq -r .ruby > .ruby-version # Send PR if changed
Expand Down