-
Notifications
You must be signed in to change notification settings - Fork 63k
Update creating-a-github-pages-site-with-jekyll.md #2178
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
Conversation
The previous instructions for installing the `github-pages` gem via the Gemfile were confusing. If you search for `could not find gem github-pages` in your favorite search engine, you'll find many people didn't uncomment the line and/or tried to run `bundle update github-pages` instead of `bundle install`. This is my attempt to make things clearer by being more specific step by step.
Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines. |
I was initially focused on steps 8-10, but I thought I should try all of the commands to make sure everything works. As far as I can tell, you cannot pass in a version number to the `jekyll new` command, at least not the way it was documented here. Also, the Bundler section is more confusing than helpful because for `bundle exec` to work, a Gemfile must exist in the directory, but the instructions don’t mention that. Instead of adding more steps, I thought it was easier to skip that section. Because people installing Jekyll today will have version 4.2.0, and because github-pages only supports 3.9.0, one must run `bundle update` instead of `bundle install` to resolve all dependencies.
@monfresh Thanks so much for opening a PR! I'll get this triaged for review ⚡ |
This PR is stale because it has been open 7 days with no activity and will be automatically closed in 3 days. To keep this PR open, update the PR by adding a comment or pushing a commit. |
Commenting to prevent this PR from being closed on Monday. |
This PR is stale because it has been open 7 days with no activity and will be automatically closed in 3 days. To keep this PR open, update the PR by adding a comment or pushing a commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is important to target guides at a specific audience to avoid bloating the guide with too many low level details which should already be known by the users. I believe there are a couple of instances of this in this pull request (see inline comments)
This pull request introduces some fixed version numbers which will quickly become out-of-date, no longer matching what the users sees. I understand why this has been proposed but I don't think it is a good solution. It will likely cause different kinds of confusion.
I've proposed some changes inline which I think are clearer than the original text without using explicit versions.
content/github/working-with-github-pages/creating-a-github-pages-site-with-jekyll.md
Outdated
Show resolved
Hide resolved
content/github/working-with-github-pages/creating-a-github-pages-site-with-jekyll.md
Outdated
Show resolved
Hide resolved
This PR is stale because it has been open 7 days with no activity and will be automatically closed in 3 days. To keep this PR open, update the PR by adding a comment or pushing a commit. |
…es-site-with-jekyll.md Co-authored-by: Ben Whetton <ben.whetton@gmail.com>
…es-site-with-jekyll.md Co-authored-by: Ben Whetton <ben.whetton@gmail.com>
Thanks for the suggestions, @BenWhetton. I've accepted them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@monfresh - This is a nice improvement to that page. Thanks for taking the time to do this.
I've made a couple of little suggestions for changes. The main one just changes the order of the 2 edits to the Gemfile.
If you agree with these changes, please just apply them and we can get this merged and live on the site.
Thanks again. 👍
content/github/working-with-github-pages/creating-a-github-pages-site-with-jekyll.md
Outdated
Show resolved
Hide resolved
content/github/working-with-github-pages/creating-a-github-pages-site-with-jekyll.md
Outdated
Show resolved
Hide resolved
…es-site-with-jekyll.md Co-authored-by: hubwriter <hubwriter@github.com>
…es-site-with-jekyll.md Co-authored-by: hubwriter <hubwriter@github.com>
@hubwriter Thanks for the suggestions. I accepted them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. This is looking good - let's get it merged. 👍
@monfresh & @BenWhetton - many thanks for contributing to the GitHub documentation. Much appreciated. 🙇♂️ |
* Update creating-a-github-pages-site-with-jekyll.md The previous instructions for installing the `github-pages` gem via the Gemfile were confusing. If you search for `could not find gem github-pages` in your favorite search engine, you'll find many people didn't uncomment the line and/or tried to run `bundle update github-pages` instead of `bundle install`. This is my attempt to make things clearer by being more specific step by step. * Update step 7 as well I was initially focused on steps 8-10, but I thought I should try all of the commands to make sure everything works. As far as I can tell, you cannot pass in a version number to the `jekyll new` command, at least not the way it was documented here. Also, the Bundler section is more confusing than helpful because for `bundle exec` to work, a Gemfile must exist in the directory, but the instructions don’t mention that. Instead of adding more steps, I thought it was easier to skip that section. Because people installing Jekyll today will have version 4.2.0, and because github-pages only supports 3.9.0, one must run `bundle update` instead of `bundle install` to resolve all dependencies. * Update content/github/working-with-github-pages/creating-a-github-pages-site-with-jekyll.md Co-authored-by: Ben Whetton <ben.whetton@gmail.com> * Update content/github/working-with-github-pages/creating-a-github-pages-site-with-jekyll.md Co-authored-by: Ben Whetton <ben.whetton@gmail.com> * Update content/github/working-with-github-pages/creating-a-github-pages-site-with-jekyll.md Co-authored-by: hubwriter <hubwriter@github.com> * Update content/github/working-with-github-pages/creating-a-github-pages-site-with-jekyll.md Co-authored-by: hubwriter <hubwriter@github.com> * Update creating-a-github-pages-site-with-jekyll.md Co-authored-by: Moncef Belyamani <moncef@example.com> Co-authored-by: Ben Whetton <ben.whetton@gmail.com> Co-authored-by: hubwriter <hubwriter@github.com>
* Update creating-a-github-pages-site-with-jekyll.md The previous instructions for installing the `github-pages` gem via the Gemfile were confusing. If you search for `could not find gem github-pages` in your favorite search engine, you'll find many people didn't uncomment the line and/or tried to run `bundle update github-pages` instead of `bundle install`. This is my attempt to make things clearer by being more specific step by step. * Update step 7 as well I was initially focused on steps 8-10, but I thought I should try all of the commands to make sure everything works. As far as I can tell, you cannot pass in a version number to the `jekyll new` command, at least not the way it was documented here. Also, the Bundler section is more confusing than helpful because for `bundle exec` to work, a Gemfile must exist in the directory, but the instructions don’t mention that. Instead of adding more steps, I thought it was easier to skip that section. Because people installing Jekyll today will have version 4.2.0, and because github-pages only supports 3.9.0, one must run `bundle update` instead of `bundle install` to resolve all dependencies. * Update content/github/working-with-github-pages/creating-a-github-pages-site-with-jekyll.md Co-authored-by: Ben Whetton <ben.whetton@gmail.com> * Update content/github/working-with-github-pages/creating-a-github-pages-site-with-jekyll.md Co-authored-by: Ben Whetton <ben.whetton@gmail.com> * Update content/github/working-with-github-pages/creating-a-github-pages-site-with-jekyll.md Co-authored-by: hubwriter <hubwriter@github.com> * Update content/github/working-with-github-pages/creating-a-github-pages-site-with-jekyll.md Co-authored-by: hubwriter <hubwriter@github.com> * Update creating-a-github-pages-site-with-jekyll.md Co-authored-by: Moncef Belyamani <moncef@example.com> Co-authored-by: Ben Whetton <ben.whetton@gmail.com> Co-authored-by: hubwriter <hubwriter@github.com>
Why:
The previous instructions for installing the
github-pages
gem via the Gemfile were confusing. If you search forcould not find gem github-pages
in your favorite search engine, you'll find that the instructions caused people to do one or more of the following things:# gem "github-pages"
lineVERSION
with the version ofjekyll
listed on the Dependency versions page instead of thegithub-pages
version.Examples of people who got stuck:
This is my attempt to make things clearer by being more specific step by step. By pointing to the Rubygems page for
github-pages
, it removes any ambiguity that the previous dependency page introduced since it lists a bunch of different gems, and it's not absolutely clear which version you're supposed to look for, as evidenced by the person who pinned thegithub-pages
gem to a version number for thejekyll
gem.Here's the issue I created for this PR: #2177
What's being changed:
Instead of an image containing the confusing suggestion to run
bundle update github-pages
, I rephrased the instructions in the image so that they can be followed step by step, and added a step to runbundle update
, since that is what is needed to install thegithub-pages
gem, and the previous instructions did not mention that.I also updated Step 7 because it was both confusing and incorrect. Running
jekyll 3.9.0 new .
does not work.3.9.0
is being interpreted as a subcommand, and it is not a valid subcommand. Also, the Bundler section is more confusing than helpful because forbundle exec
to work, a Gemfile must exist in the directory, but the instructions don’t mention that. Furthermore, if we did create a Gemfile by runningbundle init
for example, it would cause an error when runningbundle exec jekyll new .
because Jekyll expects the directory to be empty. Jekyll creates its own Gemfile so it doesn't make sense to start a new Jekyll site with Bundler.To avoid all of this confusion, I simplified step 7 to just
jekyll new .
, which will create the Jekyll site using whatever version of Jekyll is currently installed (most likely 4.2.0).In step 8, they are told to comment out the jekyll gem, so it doesn't matter if they used a more recent version of jekyll to create the site initially. What matters is that after they save the Gemfile, they need to run
bundle update
because github-pages only supports jekyll 3.9.0 currently. Runningbundle install
results in dependency issues.Check off the following: