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

create Gemfile and bundle install instructions #24

Open
MichaelCurrin opened this issue Sep 17, 2021 · 0 comments
Open

create Gemfile and bundle install instructions #24

MichaelCurrin opened this issue Sep 17, 2021 · 0 comments

Comments

@MichaelCurrin
Copy link

MichaelCurrin commented Sep 17, 2021

Adding gems globally is sometimes done for gem install jekyll. But should really be avoided for other gems. So I'm recommending a controlled local environment with Gemfile.

Problem

Your local install docs require multiple install commands with gem install. This makes it hard to maintain and also the versions you install will not necessarily be the ones on GH Pages. e.g. GH Pages uses 1.2.3 of a gem and the latest you end up installing is 4.5.6

This is particularly important for Jekyll - GH Pages uses Jekyll 3 but you would install Jekyll 4.

Pattern

Follow the pattern from this approach and you'll see Gemfile created.

jekyll new my-blog

Recommended solution

Use approach like this file. Including two gems below Jekyll 3 which allow 3.9 support and Ruby 3 support.

https://github.com/MichaelCurrin/jekyll-blog-demo/blob/master/Gemfile#L3-L11

And then add to docs as:

bundle config set --local path vendor/bundle
bundle install

And ignore vendor in .gitignore

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

1 participant