polyglot: site translation broken after pushing to gh-pages

Hi Untra,

After merging my polyglot branch to gh-pages the site is not able to display all the translated strings, nor in default or /en/ language. Actually, when trying to reach the not-default website.com/en/ I get a 404 You can check the website here

So far I have tried to:

  • remove the CNAME
  • remove the data_dir: ./_data and destination: ./_site from _config.yml
  • set parallel_localization: false in _config.yml

None of the above helped…

Any idea how to proceed? Thanks a lot for your help.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 15 (2 by maintainers)

Commits related to this issue

Most upvoted comments

Actually the Deploy site action triggers the pages-build-deployment action. Internally the JamesIves/github-pages-deploy-action is used, which is the action that actually uploads the site correctly. These are the minimum steps required:

      - name: Checkout 🛎️
        uses: actions/checkout@v4
      - name: Setup Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: "3.2.2"
          bundler-cache: true
      - name: Install and Build 🔧
        run: |
          export JEKYLL_ENV=production
          bundle exec jekyll build --lsi
      - name: Deploy 🚀
        if: github.event_name != 'pull_request'
        uses: JamesIves/github-pages-deploy-action@v4
        with:
          folder: _site

Meaning, get the code, setup the build environment, build the site, and upload the generated _site/ directory to GitHub pages.

@george-gca Thank you. I did it thanks to you.

You should look at the full stacktrace to get more information about your error. Checking your failed workflow there is:

Your bundle only supports platforms ["x64-mingw32"] but your local platforms are
["ruby", "x86_64-linux"], and there's no compatible match between those two
lists.

Which is what is set in your Gemfile.lock.

No idea what this error means. Note that you can’t take my deploy and use it as-is. Some steps during my process are custom made to the repo, like the Update _config.yml step and the Purge unused CSS 🧹 one.

GitHub Pages doesn’t accept many plugins, so if you want to do anything serious with Jekyll you pretty much have to build your site locally or with any CI system and then push it to your GitHub Pages branch.

Here’s the documentation from TravisCI on how to do this. Don’t skip the step where you have to manually generate and register a private token for TravisCI.

Here’s also my configuration with the build step if that helps. Works like a charm for me. My configuration is a little special because I had to push to the master branch instead of the gh-pages branch because I’m using it for the root of the GitHub Pages website. I also have to use another branch than master for the source code, so I used the source branch and I set it as the default branch for the project so this one would show up on my project’s homepage instead of master.