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

replace jekyll-get-json with our own generator #1613

Closed
zkamvar opened this issue Apr 13, 2023 · 1 comment
Closed

replace jekyll-get-json with our own generator #1613

zkamvar opened this issue Apr 13, 2023 · 1 comment

Comments

@zkamvar
Copy link
Contributor

zkamvar commented Apr 13, 2023

@maneesha noticed problems with the jekyll-get-json gem that we use in our config to fetch our feeds, but not store them locally:

carpentries.org/_config.yml

Lines 136 to 157 in 8b668b1

## external data sources
jekyll_get_json:
- data: all_badged_people
json: 'https://feeds.carpentries.org/all_badged_people.json'
- data: all_past_workshops
json: 'https://feeds.carpentries.org/all_past_workshops.json'
- data: all_upcoming_workshops
json: 'https://feeds.carpentries.org/all_upcoming_workshops.json'
- data: badges_stats
json: 'https://feeds.carpentries.org/badges_stats.json'
- data: community_lessons
json: 'https://feeds.carpentries.org/community_lessons.json'
- data: help_wanted_issues
json: 'https://feeds.carpentries.org/help_wanted_issues.json'
- data: newsletter
json: 'https://feeds.carpentries.org/newsletter.json'
- data: members
json: 'https://feeds.carpentries.org/all_public_memberships.json'
- data: all_trainers
json: 'https://feeds.carpentries.org/all_trainers.json'
- data: all_maintainers
json: 'https://feeds.carpentries.org/all_maintainers.json'

In essence, the gem fails to fetch the JSON on her machine, but it fails silently. We spent an hour trying to debug it, but to no avail. I asked for a solution on Mastodon and Scott Chamberlain suggested to use a Generator to port the Gem into our website instead of relying on a third-party gem.

Info on Generators: https://jekyllrb.com/docs/plugins/generators/
Link to original gem: https://github.com/brockfanning/jekyll-get-json/blob/master/lib/jekyll-get-json/converter.rb

@maneesha
Copy link
Contributor

Closing this not relevant to the new website.

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

2 participants