Skip to content

feat: fetch from multiple i18n sources #1210

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

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

scissorsneedfoodtoo
Copy link
Contributor

@scissorsneedfoodtoo scissorsneedfoodtoo commented Jul 16, 2025

Checklist:

This PR adjusts the build process so that we can build sites from both Ghost and Hashnode simultaneously. It also adds some basic tests to make sure certain features like the original post / translator feature still work as expected, even with mixed data sources.

The biggest change is with the GraphQL query in fetch-from-hashnode.js, where we check to see if the localized site we're building is one from a shared Hashnode instance. Currently we expect that Italian, Japanese, Korean, and Ukrainian will all be on one instance.

If this is the case, then we include a filter with the GraphQL query to only pull posts with tags in the fcc-<language> format. This is related to the proposed changes to the migration script here: https://github.com/freeCodeCamp/ghost-posts-archive

This means that, when we're building the Japanese site, for example, if a published post doesn't have the fcc-japanese tag, its data won't get pulled from Hashnode, and we won't build that page. This should also prevent posts from other languages on the same instance like Italian from appearing on the Japanese site.

Note: Coordinate with team on the Hashnode host env vars for these languages, and update the deploy-i18n workflow to use them.

@scissorsneedfoodtoo scissorsneedfoodtoo force-pushed the feat/fetch-from-multiple-i18n-sources branch from 3b136a8 to f3ca26f Compare July 16, 2025 09:30
@scissorsneedfoodtoo scissorsneedfoodtoo force-pushed the feat/fetch-from-multiple-i18n-sources branch from 6508977 to 1fd197c Compare August 1, 2025 10:57
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

Successfully merging this pull request may close these issues.

1 participant