You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 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 <[email protected]>
* Update content/github/working-with-github-pages/creating-a-github-pages-site-with-jekyll.md
Co-authored-by: Ben Whetton <[email protected]>
* Update content/github/working-with-github-pages/creating-a-github-pages-site-with-jekyll.md
Co-authored-by: hubwriter <[email protected]>
* Update content/github/working-with-github-pages/creating-a-github-pages-site-with-jekyll.md
Co-authored-by: hubwriter <[email protected]>
* Update creating-a-github-pages-site-with-jekyll.md
Co-authored-by: Moncef Belyamani <[email protected]>
Co-authored-by: Ben Whetton <[email protected]>
Co-authored-by: hubwriter <[email protected]>
Copy file name to clipboardExpand all lines: content/github/working-with-github-pages/creating-a-github-pages-site-with-jekyll.md
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ Before you can use Jekyll to create a {% data variables.product.prodname_pages %
46
46
$ git init <em>REPOSITORY-NAME</em>
47
47
> Initialized empty Git repository in /Users/octocat/my-site/.git/
48
48
# Creates a new folder on your computer, initialized as a Git repository
49
-
```
49
+
```
50
50
4. Change directories to the repository.
51
51
```shell
52
52
$ cd<em>REPOSITORY-NAME</em>
@@ -65,24 +65,24 @@ Before you can use Jekyll to create a {% data variables.product.prodname_pages %
65
65
$ git checkout --orphan gh-pages
66
66
# Creates a new branch, with no history or contents, called gh-pages and switches to the gh-pages branch
67
67
```
68
-
7. To create a new Jekyll site, use the `jekyll new` command, replacing _VERSION_ with the current dependency version for Jekyll. For more information, see "[Dependency versions](https://pages.github.com/versions/)" on the {% data variables.product.prodname_pages %} site.
69
-
- If you installed Bundler:
70
-
```shell
71
-
$ bundle exec jekyll <em>VERSION</em> new .
72
-
# Creates a Jekyll site in the current directory
73
-
```
74
-
- If you don't have Bundler installed:
75
-
```shell
76
-
$ jekyll <em>VERSION</em> new .
77
-
# Creates a Jekyll site in the current directory
78
-
```
79
-
8. Open the Gemfile that was created and follow the instructions in the Gemfile's comments to use {% data variables.product.prodname_pages %}.
80
-

81
-
9. Update the `gem "github-pages"` line so that the line looks like this, replacing _VERSION_ with the current dependency version for`github-pages`. For more information, see "[Dependency versions](https://pages.github.com/versions/)" on the {% data variables.product.prodname_pages %} site.
Replace _GITHUB-PAGES-VERSION_ with the latest supported version of the `github-pages` gem. You can find this version here: "[Dependency versions](https://pages.github.com/versions/)."
82
+
83
+
The correct version Jekyll will be installed as a dependency of the `github-pages` gem.
85
84
10. Save and close the Gemfile.
85
+
11. From the command line, run `bundle update`.
86
86
11. Optionally, test your site locally. For more information, see "[Testing your {% data variables.product.prodname_pages %} site locally with Jekyll](/articles/testing-your-github-pages-site-locally-with-jekyll)."
87
87
12. Add your {% data variables.product.product_name %} repository as a remote, replacing {% if enterpriseServerVersions contains currentVersion or currentVersion == "github-ae@latest" %}_HOSTNAME_ with your enterprise's hostname,{% endif %} _USER_ with the account that owns the repository{% if enterpriseServerVersions contains currentVersion or currentVersion == "github-ae@latest" %},{% endif %} and _REPOSITORY_ with the name of the repository.
0 commit comments