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
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{
"name": "Jekyll",
"image": "mcr.microsoft.com/devcontainers/ruby:3.3-bookworm", // We want 3.3.4 exactly but let's try this
"image": "mcr.microsoft.com/devcontainers/ruby:3.3-bookworm", // Minor tag (3.3) must match .ruby-version. This image does not pin the patch; CI and rbenv do.
"features": {
// This feature cannot read .node-version, so update this pin alongside that file
"ghcr.io/devcontainers/features/node:2": {
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24
v24.21.0
60 changes: 27 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,18 @@ Use VS Code and the [Dev Containers extension](https://marketplace.visualstudio.

Or if you do not want VS Code or the Docker setup, install your environment manually:

1. Install Ruby to match GitHub Pages. The version is pinned in [.ruby-version](.ruby-version). On Mac, use [rbenv](https://github.com/rbenv/rbenv), which reads that file automatically:
1. Install Ruby and gems to match GitHub Pages versions:

```sh
brew install rbenv
rbenv install # installs the Ruby version from .ruby-version
eval "$(rbenv init -)" # activate rbenv now
brew install rv # uses .ruby-version
rv ruby install
Comment on lines +20 to +21
rv run bundle install
```

2. Install Jekyll:
2. Install Node.js, yarn and packages for utilities:

```sh
gem update --system
gem install bundler
bundle install
```

3. Install Node.js with [fnm](https://github.com/Schniz/fnm). The latest LTS version is pinned in [.node-version](.node-version):

```sh
fnm install
fnm install # uses .node-version
fnm use
corepack enable
yarn install
Expand All @@ -47,14 +39,14 @@ Build the HTML website.
yarn build
```

Access your site at <http://127.0.0.1:4000> (or see other "server address" in console output).

### Serve/run the site

```sh
yarn dev
```

Access your site at <http://127.0.0.1:4000> (or see other "server address" in console output).

### Linting

Perform code linting (this does not require building the site):
Expand Down Expand Up @@ -83,9 +75,7 @@ yarn format source/index.html README.md

### Testing

Perform website testing (you must have already [built the site](#build-the-site))

:warning: `yarn build` produces different files than `bundle exec jekyll serve`. And the test suite may have false positives if you test the `serve` output.
Perform website testing (you must have already [built the site](#build-the-site)):

```sh
yarn test
Expand All @@ -103,22 +93,26 @@ This will give you formatting, linting, and other tools to help you develop.

Do this every month or so and please send a PR here if you see updates available:

```sh
yarn set version latest && yarn # Send PR
yarn upgrade-interactive # Send PR
```

Also you can run this to update your environment to match the GitHub Pages (no PR, this is in .gitignore):

```sh
bundle update --conservative # "--consersative" ignores updates that GitHub Pages is not using
```
1. Update Node.js parts

```sh
curl -s https://nodejs.org/dist/index.json | jq -r '[.[] | select(.lts != false)][0].version' > .node-version
yarn set version latest && yarn
yarn upgrade-interactive
```

2. Get updated Ruby + gems GitHub Pages uses, no PR for this, the lock file is git-ignored

```sh
curl -s https://pages.github.com/versions.json | jq -r .ruby > .ruby-version
rv ruby install
rv run bundle install
```

3. Update versions in .github/workflows scripts to latest GitHub supported Action versions.

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):
4. Update .devcontainer/devcontainer.json to use the latest Microsoft supported runners and matching versions per above.

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

## References

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
],
"license": "UNLICENSED",
"devDependencies": {
"@fulldecent/nice-checkers-plugin": "^1.3.7",
"@fulldecent/nice-checkers-plugin": "^1.3.8",
"@shopify/prettier-plugin-liquid": "^1.11.0",
"cheerio": "^1.2.0",
"css": "^3.0.0",
"glob": "^13.0.6",
"html-validate": "^11.6.0",
"html-validate": "^11.15.0",
"markdownlint-cli2": "^0.23.2",
"prettier": "^3.9.6"
},
Expand Down
24 changes: 12 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ __metadata:
version: 10
cacheKey: 10c0

"@fulldecent/nice-checkers-plugin@npm:^1.3.7":
version: 1.3.7
resolution: "@fulldecent/nice-checkers-plugin@npm:1.3.7"
"@fulldecent/nice-checkers-plugin@npm:^1.3.8":
version: 1.3.8
resolution: "@fulldecent/nice-checkers-plugin@npm:1.3.8"
dependencies:
better-sqlite3: "npm:^12.10.0"
cheerio: "npm:^1.2.0"
Expand All @@ -17,7 +17,7 @@ __metadata:
dependenciesMeta:
better-sqlite3:
built: true
checksum: 10c0/f402bfed7b655bbe51dc657a4e14a99eb3e6aa99d871985816495c1a4d93081c3fbe0b36dc9da0f573b897857755fa982251e53b0e8d99dc44b272db2986c103
checksum: 10c0/d44d264358cf67469b730c9336bf161b23f6a360943d2ac9326dccd63337b3fed2570c419675dd52337fd51e6ecd7eb3bf278631616508376bc97e73058d0514
languageName: node
linkType: hard

Expand Down Expand Up @@ -920,9 +920,9 @@ __metadata:
languageName: node
linkType: hard

"html-validate@npm:^11.6.0":
version: 11.6.0
resolution: "html-validate@npm:11.6.0"
"html-validate@npm:^11.15.0":
version: 11.15.0
resolution: "html-validate@npm:11.15.0"
dependencies:
"@html-validate/stylish": "npm:^6.0.0"
"@sidvind/better-ajv-errors": "npm:7.0.0"
Expand All @@ -932,10 +932,10 @@ __metadata:
semver: "npm:^7.0.0"
peerDependencies:
"@jest/globals": ^29.0.3 || ^30.0.0
"@vitest/expect": ^3.0.0 || ^4.0.1
"@vitest/expect": ^3.2.0 || ^4.0.1 || ^5.0.0
jest: ^29.0.3 || ^30.0.0
jest-snapshot: ^29.0.3 || ^30.0.0
vitest: ^3.0.0 || ^4.0.1
vitest: ^3.2.0 || ^4.0.1 || ^5.0.0
peerDependenciesMeta:
"@jest/globals":
optional: true
Expand All @@ -949,7 +949,7 @@ __metadata:
optional: true
bin:
html-validate: bin/html-validate.mjs
checksum: 10c0/12be26cee9df1233a8f027256b03298189af9bedae49be51a952fed5fa543d9216928f17606cff85f3f9db89f866aee9199c499a23e1397a9d9c55feff0b669a
checksum: 10c0/efcfae04b055a4f57340398595f94de3edd2156d6c04de214942780f7295e24eec7a23e0a718c149612707e3cf18dd710587d004eba042506aef1f3f0422e4cd
languageName: node
linkType: hard

Expand Down Expand Up @@ -2154,13 +2154,13 @@ __metadata:
version: 0.0.0-use.local
resolution: "root-workspace-0b6124@workspace:."
dependencies:
"@fulldecent/nice-checkers-plugin": "npm:^1.3.7"
"@fulldecent/nice-checkers-plugin": "npm:^1.3.8"
"@shopify/prettier-plugin-liquid": "npm:^1.11.0"
cheerio: "npm:^1.2.0"
css: "npm:^3.0.0"
front-matter: "npm:^4.0.2"
glob: "npm:^13.0.6"
html-validate: "npm:^11.6.0"
html-validate: "npm:^11.15.0"
markdownlint-cli2: "npm:^0.23.2"
prettier: "npm:^3.9.6"
xml2js: "npm:^0.6.2"
Expand Down