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

JS not loading on some browsers #1718

Closed
1 task done
matiassalles99 opened this issue May 2, 2024 · 4 comments
Closed
1 task done

JS not loading on some browsers #1718

matiassalles99 opened this issue May 2, 2024 · 4 comments

Comments

@matiassalles99
Copy link

matiassalles99 commented May 2, 2024

Checklist

How did you create the site?

Generated from chirpy-starter

Describe the bug

When navigating to a page in some browsers (eg: Default Android Browser, Microsoft Edge, or even Chrome in Incognito mode), bootstrap and other JS libraries don't load. You can even see it with Chirpy's demo page in Incognito Mode inside Chrome:

image

Steps To Reproduce

  1. Navigate to https://chirpy.cotes.page/ in Incognito mode inside Google Chrome

Expected Behavior

JS should load an styles shouldn't look off on any of these browsers

Environment

  • Ruby: 3.x
  • Jekyll: 4.3.3
  • Chirpy: 6.5.5

Anything else?

maybe we are missing cross-origin and integrity attributes in the <link tag?

@amrhossamdev
Copy link

Yes, I can confirm and luckily it happened when I tried to post a new blog!

so I thought it was a mistake but the original website was broken

@kungfux
Copy link
Collaborator

kungfux commented May 2, 2024

This happens due to certificate expiration for https://cdn.jsdelivr.net/ that is used for JS hosting.

NET::ERR_CERT_DATE_INVALID
Subject: sni.cloudflaressl.com

Issuer: Cloudflare Inc ECC CA-3

Expires on: May 2, 2024

Current date: May 2, 2024

So, this issue should be reported to and fixed by https://www.jsdelivr.com/.

However, it's a good case for us to consider hosting dependencies by ourselves.

@matiassalles99
Copy link
Author

Interesting, I guess I had it cached locally and that's why it fails only in incognito. I was wondering indeed if there was a way to host dependencies ourselves, but that's a feature request, so I'll close this issue. Thx @kungfux :)

@NichtsHsu
Copy link
Contributor

I was wondering indeed if there was a way to host dependencies ourselves, but that's a feature request

Chirpy already supports self-hosting:

# Self-hosted static assets, optional › https://github.com/cotes2020/chirpy-static-assets
assets:
self_host:
enabled: # boolean, keep empty means false
# specify the Jekyll environment, empty means both
# only works if `assets.self_host.enabled` is 'true'
env: # [development | production]

... and check the Manually Build and Deploy section from chirpy's getting start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants