Skip to content

Commit 9dfb428

Browse files
committed
update README
1 parent 3cd135e commit 9dfb428

File tree

2 files changed

+52
-9
lines changed

2 files changed

+52
-9
lines changed

README.md

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,60 @@ Join [vim-jp slack](https://vim-jp.org/docs/chat.html) instead, or contact [us](
88

99
## How to serve in your machine
1010

11-
### Setup
11+
### Pre requirements
1212

13-
Follow the instructions on [Testing your GitHub Pages site locally with Jekyll - GitHub Docs](https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/testing-your-github-pages-site-locally-with-jekyll).
13+
* Docker
14+
* (OPTION) Python 3: to preview with local HTTP server
15+
16+
### Build
17+
18+
The following command will build your site in the \_site/ directory:
1419

1520
```console
16-
# Setup Ruby
17-
# You can use rbenv.
21+
$ ./_scripts/docker_jekyll jekyll build
22+
```
23+
24+
You can also specify options such as incremental options.
25+
26+
```console
27+
$ ./_scripts/docker_jekyll jekyll build -I
28+
```
29+
30+
### Serve
31+
32+
You can run `jekyll serve` with the following command.
33+
34+
```console
35+
$ ./_scripts/docker_jekyll_serve
36+
```
37+
38+
It uses port 4000 to serve the contents.
39+
Open http://127.0.0.1:4000 with your browser.
1840

19-
cd vimconf.org
20-
bundle install
21-
bundle exec jekyll serve
41+
This command accepts options as you know.
42+
To use watch and incremental builds:
43+
44+
```console
45+
$ ./_scripts/docker_jekyll_serve -wI
46+
```
47+
48+
Auto-regeneration may not work on some Windows versions.
49+
In that case, it might be easier to serve it in Python
50+
and generate it manually in the "Build" step.
51+
52+
If you just want to serve without watching or building, you may do as follows.
53+
54+
```console
55+
$ ./_scripts/docker_jekyll_serve --skip-initial-build --no-watch
56+
```
57+
58+
#### Serve with Python
59+
60+
You can run Python local HTTP server with the following command.
61+
62+
```console
63+
$ ./_scripts/python_http_server
2264
```
2365

24-
TODO: Add container version to keep the environment clean.
66+
It uses ports 8000 to serve the contents.
67+
Open http://127.0.0.1:8000 with your browser.

_scripts/docker_jekyll_serve

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ docker run --rm -it \
2222
-p 4000:4000 \
2323
--entrypoint jekyll \
2424
ghcr.io/actions/jekyll-build-pages:v1.0.13 \
25-
server -H 0.0.0.0
25+
server -H 0.0.0.0 "$@"

0 commit comments

Comments
 (0)