Skip to content
Merged
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
5 changes: 5 additions & 0 deletions _plugins/000_utf8_encoding.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Build environments without a UTF-8 locale (Cloudflare Pages: "cannot change locale (en_US.UTF-8)") make Ruby read
# files as US-ASCII. `encoding:` in _config.yml covers pages only; _data YAML is read with Ruby's default, and
# kramdown then fails on accented pt-BR text. Plugins load before the site is read, so this fixes it for every file.
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8
Loading