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

Some options for site.lang are incompatible with giscus API #1808

Closed
1 task done
tripercy opened this issue Jun 15, 2024 · 2 comments · Fixed by #1810
Closed
1 task done

Some options for site.lang are incompatible with giscus API #1808

tripercy opened this issue Jun 15, 2024 · 2 comments · Fixed by #1810
Labels
3rd-party deps 3rd party dependencies issues released

Comments

@tripercy
Copy link

Checklist

How did you create the site?

Built from jekyll-theme-chirpy

Describe the bug

The giscus comment system won't work if its lang option is set to default (leaving "giscus:lang:" empty in _config.yml) AND site.lang is set to a language option with a language code followed by a country code, i.e. vi-VN, en-ES.
Instead of displaying a comment section, the IFrame displays "Giscus.app refused to connect".

Steps To Reproduce

  1. Setup an app using chirpy theme in the given environment.
  2. Create a sample post in that app.
  3. Go to giscus.app and configure a repository for comments.
  4. In _config.yml, set the following configs:
lang: vi-VN
...
comments:
 provider: giscus
 ...
 giscus:
  ... // The configs obtained from https://giscus.app/
  lang: 
  ...
  1. Build and serve the app
bundle exec jekyll s
  1. Go to the sample post and scroll to the comment section.
  2. Observe the bug: the for the comment section displays: "Giscus.app refused to connect".

Expected Behavior

The comment section displayed correctly

Environment

  • Ruby: ruby 3.3.2 (2024-05-30 revision e5a195edf6) [arm64-darwin22]
  • Jekyll: jekyll 4.3.3
  • Chirpy: jekyll-theme-chirpy (7.0.1)

Anything else?

After checking the giscus API, I noticed that the language codes for available languages never have a following country code, so the language options with the code of that type will cause the API call to fail.

@cotes2020
Copy link
Owner

Good catch 👍

@cotes2020 cotes2020 added the 3rd-party deps 3rd party dependencies issues label Jun 15, 2024
Copy link

🎉 This issue has been resolved in version 7.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd-party deps 3rd party dependencies issues released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants