Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to deploy on the Cloudflare Pages #193

Open
krisine opened this issue Mar 8, 2024 · 5 comments
Open

Fail to deploy on the Cloudflare Pages #193

krisine opened this issue Mar 8, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@krisine
Copy link

krisine commented Mar 8, 2024

Hello sir,
image
I tried to use the template, and deploy it directly to Cloudflare: my reop But it reports an error, may be some languages are not compatible. Can you help me deal with that?
And I'm EAGER to write a tutorial on the deployment on the Cloudflare Pages!

Overall, this template is so nice, and thank you very much!

@krisine krisine added the bug Something isn't working label Mar 8, 2024
@krisine
Copy link
Author

krisine commented Mar 8, 2024

It happened again when I tried to add a Chinese title
image

@omarcostahamido
Copy link
Contributor

I'm not even sure if this is a ruby, jekyll, or cloudflare limitation!
But I reckon the first 2 work well with all languages when deploying with aws, netlify, and github.
soo... 🤷

@j-zhrv
Copy link

j-zhrv commented Jan 5, 2025

The problem appears to stem from an incompatibility between Cloudflare's environment and how Jekyll handles non-ASCII characters in filenames, particularly with the older Ruby version used in their build system. This seems to be related to a known, potentially frozen, Jekyll bug discussed here: Invalid US-ASCII character “\xE2” · Issue #4268 · jekyll/jekyll.

The solution is to set the following environment variables in your Cloudflare Pages project's build settings:

  • LC_ALL: "C.UTF-8"
  • LANG: "en_US.UTF-8"
  • LANGUAGE: "en_US.UTF-8"

How to set environment variables in Cloudflare Pages:

  1. Go to your Cloudflare Pages project.
  2. Click on Settings.
  3. Click on Variables and Secrets https://developers.cloudflare.com/pages/configuration/build-configuration/#environment-variables
  4. click + Add.
  5. Add each of the three variables above with their respective values.
  6. Redeploy your site.

image

@j-zhrv
Copy link

j-zhrv commented Jan 5, 2025

@krisine @omarcostahamido
I believe I've found a solution to the deployment issue on Cloudflare Pages related to character encoding, and can confirm that it's working after testing it just now.

@omarcostahamido
Copy link
Contributor

@j-zhrv
Nice catch :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants