Skip to content

Commit 79f9d06

Browse files
committed
Recommend 'bundle exec jekyll serve' for local preview
Bare jekyll runs against whatever gems are installed; bundle exec pins to Gemfile.lock, the same versions GitHub Pages builds with. Also point the front-matter step at _data/authors.yml so a new author's posts get a byline. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
1 parent dd26568 commit 79f9d06

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ Verified to work on Linux Mint 21.3, based on Ubuntu 22.04 LTS:
2828

2929
## Running
3030

31-
With everyting installed, starting the previewer is as simple as:
31+
With everything installed, start the previewer with `bundle exec`, which
32+
pins Jekyll and all plugins to the versions in `Gemfile.lock` (the same
33+
versions GitHub Pages builds with):
3234

3335
```bash
34-
$ jekyll serve
36+
$ bundle exec jekyll serve
3537
Configuration file: /home/jocke/src/kernelkit.github.io/_config.yml
3638
Source: /home/jocke/src/kernelkit.github.io
3739
Destination: /home/jocke/src/kernelkit.github.io/_site
@@ -43,6 +45,9 @@ Configuration file: /home/jocke/src/kernelkit.github.io/_config.yml
4345
Server running... press ctrl-c to stop.
4446
```
4547

48+
Then open <http://127.0.0.1:4000/>. Add `-l` for live-reload and `-w`
49+
to watch for changes: `bundle exec jekyll serve -lw`.
50+
4651
## Updating
4752

4853
Occasionally we update the Chirpy theme or its dependencies. To be able
@@ -90,14 +95,17 @@ jacky:
9095
pin: false
9196
---
9297

98+
The `author` must match a nick in `_data/authors.yml` (see
99+
[Identity](#identity) above) — add yourself there first if needed.
100+
93101
3. [Add content ...](https://chirpy.cotes.page/posts/write-a-new-post/)
94102
4. Use relevant tags and categories, check first!
95103
5. Preview
96104

97-
jekyll serve -lw
105+
bundle exec jekyll serve -lw
98106

99107
> **Tip:** for work in progress, use the top-level directory `_drafts/`
100-
> and add the `-D` option to `jekyll serve` to preview your post.
108+
> and add the `-D` option to `bundle exec jekyll serve` to preview your post.
101109

102110
[0]: https://jekyllrb.com/
103111
[1]: https://chirpy.cotes.page/

0 commit comments

Comments
 (0)