Repository navigation
fix: build as UTF-8 without a UTF-8 locale (Cloudflare Pages) - #35
Merged
Merged
Conversation
Cloudflare Pages builds cannot set en_US.UTF-8, so Ruby defaulted to US-ASCII. `encoding:` in _config.yml covers pages only; _data YAML is read with Ruby's default, and kramdown failed on the accented pt-BR resources added in #34 ("The source text contains invalid characters for the used encoding US-ASCII"). Plugins load before the site is read, so setting the default encodings there fixes every file. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Deploying iplibrary-website with
|
| Latest commit: |
b0e9b4e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://28f49b33.iplibrary-website.pages.dev |
| Branch Preview URL: | https://fix-build-utf8.iplibrary-website.pages.dev |
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.
The Cloudflare Pages production build of #34 failed:
kramdown … The source text contains invalid characters for the used encoding US-ASCII.The build image cannot set
en_US.UTF-8, so Ruby reads files as US-ASCII.encoding: UTF-8in_config.ymlcovers pages but not_dataYAML, and kramdown fails on the accented pt-BR resources._plugins/000_utf8_encoding.rbsets Ruby's default external and internal encodings to UTF-8. Plugins load before the site is read, so this covers data files too. The Cloudflare Pages preview build on this PR is the check.🤖 Generated with Claude Code