Update testing-your-github-pages-site-locally-with-jekyll.md (#34182)
Co-authored-by: Tommy Byrd <tcbyrd@github.com> Co-authored-by: Alex Nguyen <150945400+nguyenalex836@users.noreply.github.com> Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
This commit is contained in:
@@ -51,9 +51,17 @@ Before you can use Jekyll to test a site, you must:
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** If you've installed Ruby 3.0 or later (which you may have if you installed the default version via Homebrew), you might get an error at this step. That's because these versions of Ruby no longer come with `webrick` installed.
|
||||
**Notes:**
|
||||
* If you've installed Ruby 3.0 or later (which you may have if you installed the default version via Homebrew), you might get an error at this step. That's because these versions of Ruby no longer come with `webrick` installed.
|
||||
|
||||
To fix the error, try running `bundle add webrick`, then re-running `bundle exec jekyll serve`.
|
||||
|
||||
* If your `_config.yml` file's `baseurl` field contains your GitHub repository's link, you can use the following command when building locally to ignore that value and serve the site on `localhost:4000/`:
|
||||
|
||||
```shell
|
||||
bundle exec jekyll serve --baseurl=""
|
||||
```
|
||||
|
||||
To fix the error, try running `bundle add webrick`, then re-running `bundle exec jekyll serve`.
|
||||
{% endnote %}
|
||||
|
||||
1. To preview your site, in your web browser, navigate to `http://localhost:4000`.
|
||||
|
||||
Reference in New Issue
Block a user