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
Copy file name to clipboardExpand all lines: README.md
+35-4
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,14 @@ In order to generate some extra files (_categories_, _tags_ and _last modified l
72
72
$ brew install coreutils
73
73
```
74
74
75
+
### Setting up Docker environment (optional)
76
+
77
+
If you're a loyal fan of [**Docker**](https://www.docker.com/) or just too lazy to install the packages mentioned in [_Setting up the local envrionment_](#setting-up-the-local-envrionment), please make sure you have **Docker Engine** installed and running, and then get Docker image `jekyll/jekyll` from Docker Hub by the following command:
78
+
79
+
```console
80
+
$ docker pull jekyll/jekyll:latest
81
+
```
82
+
75
83
## Usage
76
84
77
85
Running [**Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/) requires some extra files, which cannot be generated by Jekyll native commands, so please strictly follow the methods mentioned below to run or deploy your website.
@@ -119,6 +127,19 @@ Then open a browser and visit to <http://localhost:4000>.
119
127
120
128
Few days later, you may find that the file changes does not refresh in real time by using `run.sh`. Don't worry, the advanced option `-r` (or `--realtime`) will solve this problem, but it requires [**fswatch**](http://emcrisostomo.github.io/fswatch/) to be installed on your machine.
121
129
130
+
### Run on Docker
131
+
132
+
Run the site on Docker with the following command:
133
+
134
+
```terminal
135
+
$ docker run --rm -it \
136
+
--volume="$PWD:/srv/jekyll" \
137
+
-p 4000:4000 jekyll/jekyll \
138
+
bash tools/run.sh --docker
139
+
```
140
+
141
+
Please note that on Docker containers, you'll lose the real-time refresh feature.
142
+
122
143
### Deployment
123
144
124
145
Before the deployment begins, checkout the file `_config.yml` and make sure the `url` is configured correctly. Furthermore, if you prefer the [_project site_](https://help.github.com/en/github/working-with-github-pages/about-github-pages#types-of-github-pages-sites) and don't use a custom domain, or you want to visit your website with a base url on a web server other than **GitHub Pages**, remember to change the `baseurl` to your project name that starting with a slash. For example, `/project`.
@@ -131,8 +152,7 @@ For security reasons, GitHub Pages build runs on `safe` mode, which restricts us
131
152
132
153
1. Push any commit to `origin/master` to trigger the GitHub Actions workflow. Once the build is complete and successful, a new remote branch named `gh-pages` will appear to store the built site files.
133
154
134
-
2. Browse to your repository on GitHub and choose the branch `gh-pages` as the [publishing source](https://docs.github.com/en/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site) throught _Settings_
135
-
→ _Options_ → _GitHub Pages_:
155
+
2. Browse to your repository on GitHub and choose the branch `gh-pages` as the [publishing source](https://docs.github.com/en/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site) throught _Settings_ → _Options_ → _GitHub Pages_:
3. Visit your website at the address indicated by GitHub.
@@ -144,10 +164,21 @@ On platforms other than GitHub, we cannot enjoy the convenience of **GitHub Acti
144
164
Go to the root of the source project, build your site by:
145
165
146
166
```console
147
-
$ bash tools/build.sh -d /path/to/site/
167
+
$ bash tools/build.sh
168
+
```
169
+
170
+
> **Note**: The output path can be specified with the option `-d`.
171
+
172
+
Or, build the site with Docker by:
173
+
174
+
```terminal
175
+
$ docker run --rm -it \
176
+
--volume="$PWD:/srv/jekyll" \
177
+
jekyll/jekyll \
178
+
bash tools/build.sh --docker
148
179
```
149
180
150
-
The generated site files will be placed in folder `/path/to/site/`. Now you should upload those files to your web server.
181
+
Unless you specified the output path, the generated site files will be placed in folder `_site` of the project's root directory. Now you should upload those files to your web server.
Copy file name to clipboardExpand all lines: _posts/2019-08-09-getting-started.md
+35-4
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,14 @@ In order to generate some extra files (_categories_, _tags_ and _last modified l
42
42
$ brew install coreutils
43
43
```
44
44
45
+
### Setting up Docker environment (optional)
46
+
47
+
If you're a loyal fan of [**Docker**](https://www.docker.com/) or just too lazy to install the packages mentioned in [_Setting up the local envrionment_](#setting-up-the-local-envrionment), please make sure you have **Docker Engine** installed and running, and then get Docker image `jekyll/jekyll` from Docker Hub by the following command:
48
+
49
+
```console
50
+
$ docker pull jekyll/jekyll:latest
51
+
```
52
+
45
53
## Usage
46
54
47
55
Running [**Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/) requires some extra files, which cannot be generated by Jekyll native commands, so please strictly follow the methods mentioned below to run or deploy your website.
@@ -89,6 +97,19 @@ Then open a browser and visit to <http://localhost:4000>.
89
97
90
98
Few days later, you may find that the file changes does not refresh in real time by using `run.sh`. Don't worry, the advanced option `-r` (or `--realtime`) will solve this problem, but it requires [**fswatch**](http://emcrisostomo.github.io/fswatch/) to be installed on your machine.
91
99
100
+
### Run on Docker
101
+
102
+
Run the site on Docker with the following command:
103
+
104
+
```terminal
105
+
$ docker run --rm -it \
106
+
--volume="$PWD:/srv/jekyll" \
107
+
-p 4000:4000 jekyll/jekyll \
108
+
bash tools/run.sh --docker
109
+
```
110
+
111
+
Please note that on Docker containers, you'll lose the real-time refresh feature.
112
+
92
113
### Deployment
93
114
94
115
Before the deployment begins, checkout the file `_config.yml` and make sure the `url` is configured correctly. Furthermore, if you prefer the [_project site_](https://help.github.com/en/github/working-with-github-pages/about-github-pages#types-of-github-pages-sites) and don't use a custom domain, or you want to visit your website with a base url on a web server other than **GitHub Pages**, remember to change the `baseurl` to your project name that starting with a slash. For example, `/project`.
@@ -101,8 +122,7 @@ For security reasons, GitHub Pages build runs on `safe` mode, which restricts us
101
122
102
123
1. Push any commit to `origin/master` to trigger the GitHub Actions workflow. Once the build is complete and successful, a new remote branch named `gh-pages` will appear to store the built site files.
103
124
104
-
2. Browse to your repository on GitHub and choose the branch `gh-pages` as the [publishing source](https://docs.github.com/en/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site) throught _Settings_
105
-
→ _Options_ → _GitHub Pages_:
125
+
2. Browse to your repository on GitHub and choose the branch `gh-pages` as the [publishing source](https://docs.github.com/en/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site) throught _Settings_ → _Options_ → _GitHub Pages_:
3. Visit your website at the address indicated by GitHub.
@@ -114,7 +134,18 @@ On platforms other than GitHub, we cannot enjoy the convenience of **GitHub Acti
114
134
Go to the root of the source project, build your site by:
115
135
116
136
```console
117
-
$ bash tools/build.sh -d /path/to/site/
137
+
$ bash tools/build.sh
138
+
```
139
+
140
+
> **Note**: The output path can be specified with the option `-d`.
141
+
142
+
Or, build the site with Docker by:
143
+
144
+
```terminal
145
+
$ docker run --rm -it \
146
+
--volume="$PWD:/srv/jekyll" \
147
+
jekyll/jekyll \
148
+
bash tools/build.sh --docker
118
149
```
119
150
120
-
The generated site files will be placed in folder `/path/to/site/`. Now you should upload those files to your web server.
151
+
Unless you specified the output path, the generated site files will be placed in folder `_site` of the project's root directory. Now you should upload those files to your web server.
0 commit comments