Skip to content

Commit ff1a723

Browse files
authored
repo sync
2 parents 3f6a497 + fc0f5a6 commit ff1a723

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

content/github/working-with-github-pages/creating-a-github-pages-site-with-jekyll.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Before you can use Jekyll to create a {% data variables.product.prodname_pages %
4646
$ git init <em>REPOSITORY-NAME</em>
4747
> Initialized empty Git repository in /Users/octocat/my-site/.git/
4848
# Creates a new folder on your computer, initialized as a Git repository
49-
```
49+
```
5050
4. Change directories to the repository.
5151
```shell
5252
$ cd <em>REPOSITORY-NAME</em>
@@ -65,24 +65,24 @@ Before you can use Jekyll to create a {% data variables.product.prodname_pages %
6565
$ git checkout --orphan gh-pages
6666
# Creates a new branch, with no history or contents, called gh-pages and switches to the gh-pages branch
6767
```
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-
![Instructions for updating Gemfile](/assets/images/help/pages/gemfile-instructions.png)
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.
82-
```shell
83-
gem "github-pages", "~> <em>VERSION</em>", group: :jekyll_plugins
84-
```
68+
7. To create a new Jekyll site, use the `jekyll new` command:
69+
```shell
70+
$ jekyll new .
71+
# Creates a Jekyll site in the current directory
72+
```
73+
8. Open the Gemfile that Jekyll created.
74+
1. Add "#" to the beginning of the line that starts with `gem "jekyll"` to comment out this line.
75+
1. Add the `github-pages` gem by editing the line starting with `# gem "github-pages"`. Change this line to:
76+
77+
```shell
78+
gem "github-pages", "~> GITHUB-PAGES-VERSION", group: :jekyll_plugins
79+
```
80+
81+
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.
8584
10. Save and close the Gemfile.
85+
11. From the command line, run `bundle update`.
8686
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)."
8787
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.
8888
```shell

0 commit comments

Comments
 (0)