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

site translation broken after pushing to gh-pages #75

Open
cntlsn opened this issue Sep 4, 2017 · 14 comments
Open

site translation broken after pushing to gh-pages #75

cntlsn opened this issue Sep 4, 2017 · 14 comments

Comments

@cntlsn
Copy link

cntlsn commented Sep 4, 2017

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.

@cntlsn
Copy link
Author

cntlsn commented Sep 4, 2017

Alright, I just saw this issue #64
:(

Any news on this?

@untra
Copy link
Owner

untra commented Sep 4, 2017

Unfortunately until we can get a multi languages plugin whitelisted, you cannot use polyglot with GitHub pages. Sorry 😅

However I am starting work on version 2.0.0, which I hope to get whitelisted in the future. Currently looking at these threads:
github/pages-gem#401 (comment)

If you leave this issue open I'll keep you updated 👍
Cheers,
Untra

@cntlsn
Copy link
Author

cntlsn commented Sep 5, 2017

Thanks Untra, I have thumbed-up your requests to maybe raise some attention on the topic.

I will leave the issue open so I can get updates sure.
But may I suggest to highlight on the readme that the plugin is not whitelisted?
I think it would be very convenient for people to know that in advance before spending hours on it, like I just did ;)

Thank you for your work, I hope it will get whitelisted soon.
Cheers

@basementcz
Copy link

basementcz commented Sep 29, 2017

Have the same problem :( Will try to deploy the same to gitlab pages.

@basementcz
Copy link

@cntlsn I migrated my github pages to gitlab page and it is possible to use polyglot there.

@cntlsn
Copy link
Author

cntlsn commented Oct 3, 2017

hi @basementcz thx for your input, I will have a look.
I couldn't move my repo from github so I created a manual way to handle translations by following/hacking this approach: https://www.sylvaindurand.org/making-jekyll-multilingual/

@ZakCodes
Copy link

ZakCodes commented Aug 6, 2019

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.

@george-gca
Copy link
Contributor

This can be done nowadays by building your site and publishing it with GitHub actions. Check my template, or more specifically the GitHub action responsible for building and publishing it.

@meansoup
Copy link

meansoup commented May 3, 2024

@george-gca Hello george-gca I wanted to use your github action.
Can you explain about it?
I thought it works with deploy.yml but, I show pages build and deployment in your actions.

@george-gca
Copy link
Contributor

george-gca commented May 3, 2024

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.

@meansoup
Copy link

meansoup commented May 3, 2024

@george-gca Thank you.
I have more question. I copied your deploy, but it doesn't work. it shows this error.

The process '/opt/hostedtoolcache/Ruby/3.2.2/x64/bin/bundle' failed with exit code 16

and, could I keep my github pages options? like branch, source, ..

@george-gca
Copy link
Contributor

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.

@george-gca
Copy link
Contributor

george-gca commented May 3, 2024

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.

meansoup added a commit to meansoup/meansoup.github.io that referenced this issue May 5, 2024
meansoup added a commit to meansoup/meansoup.github.io that referenced this issue May 5, 2024
@meansoup
Copy link

meansoup commented May 5, 2024

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

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

6 participants