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: _posts/2019-08-09-getting-started.md
+33-33Lines changed: 33 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,12 +10,25 @@ tags: [usage]
10
10
11
11
First of all, follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the basic environment (Ruby, RubyGem, Bundler and Jekyll) installation.
12
12
13
-
In addition, the [Python](https://www.python.org/downloads/) and [ruamel.yaml](https://pypi.org/project/ruamel.yaml/) are also required.
13
+
In addition, the [Python](https://www.python.org/downloads/)(version 3.5 or abover) and [ruamel.yaml](https://pypi.org/project/ruamel.yaml/) are also required.
14
+
15
+
16
+
## Install Jekyll Plugins
17
+
18
+
In the root direcoty of the project, run the following command:
19
+
20
+
```terminal
21
+
$ bundle install
22
+
```
23
+
24
+
`bundle` will install all the dependent Jekyll Plugins listed in file `Gemfile` automatically.
25
+
14
26
15
27
## Configuration
16
28
17
29
Customize the variables in file `_config.yml` as needed.
18
30
31
+
19
32
## Atom Feed
20
33
21
34
The Atom feed url of your site will be:
@@ -26,19 +39,10 @@ The Atom feed url of your site will be:
26
39
27
40
The `site_url` was defined by variable `url` in file `_config.yml`.
28
41
29
-
## Install Jekyll Plugins
30
-
31
-
In the root direcoty of the project, run the following command:
32
-
33
-
```terminal
34
-
$ bundle install
35
-
```
36
-
37
-
`bundle` will install all dependent Jekyll Plugins declared in `Gemfile` that stored in the root automatically.
38
42
39
43
## Run Locally
40
44
41
-
You may want to preview the site before publishing. Run the script in the root directory:
45
+
You may want to preview the site before publishing, so just run the script in the root directory:
42
46
43
47
```terminal
44
48
$ bash run.sh
@@ -49,47 +53,43 @@ Open the brower and visit [http://127.0.0.1:4000](http://127.0.0.1:4000)
49
53
50
54
## Deploying to GitHub Pages
51
55
52
-
### Option 1: Local Build
56
+
Before the deployment begins, ensure the `url` in `_config.yml` has been set to `https://<username>.github.io`.
53
57
54
-
For security reasons, GitHub Pages runs on `safe` mode, which means the third-party Jekyll plugins or custom scripts will not work. If you want to use any another third-party Jekyll plugins, **your have to build locally rather than on GitHub Pages**.
58
+
### Option 1: Built by GitHub Pages
55
59
56
-
**1**. On GitHub website, create a brand new repository with name `<username>.github.io`, then clone it locally.
60
+
By deploying your site in this way, you can push the source code to GitHub repository directly.
57
61
58
-
**2**. Build your site by:
62
+
> **Note**: If you want to add any third-party Jekyll plugins or custom scripts to your project, please refer to [*Option 2: Build locally*](#option-2-build-locally).
63
+
64
+
**1**. Rename your repository as `<username>.github.io`.
65
+
66
+
**2**. Commit the changes of your repository, then run the initialization script:
59
67
60
68
```console
61
-
$ bash build.sh -d /path/to/<username>.github.io/
69
+
$ bash init.sh
62
70
```
63
71
64
-
The build results will be stored in the root directory of `<username>.github.io`and don't forget to push the changes of `<username>.github.io` to branch `master` on GitHub.
72
+
It will automatically generates the *Latest Modified Date*and *Categories / Tags* page for the posts.
65
73
66
-
**3**. Go to GitHub website and enable GitHub Pages service for the new repository `<username>.github.io`.
74
+
**3**. Push the changes to `origin/master` then go to GitHub website and enable GitHub Pages service for the repository `<username>.github.io`.
67
75
68
76
**4**. Visit `https://<username>.github.io` and enjoy.
69
77
70
78
71
-
### Option 2: Built by GitHub Pages
79
+
### Option 2: Build Locally
72
80
73
-
By deploying your site in this way, you can push the source code to GitHub repository directly.
74
-
75
-
> **Note**: If you want to add any third-party Jekyll plugins or custom scripts to your project, please refer to [*Option 1: Build locally*](#option-1-build-locally).
81
+
For security reasons, GitHub Pages runs on `safe` mode, which means the third-party Jekyll plugins or custom scripts will not work. If you want to use any another third-party Jekyll plugins, **your have to build locally rather than on GitHub Pages**.
76
82
77
-
**1**. Rename your repository as `<username>.github.io`.
83
+
**1**. On GitHub website, create a brand new repository with name `<username>.github.io`, then clone it locally.
78
84
79
-
**2**. Commit the changes of your repository before running the initialization script:
85
+
**2**. Build your site by:
80
86
81
87
```console
82
-
$ bash init.sh
88
+
$ bash build.sh -d /path/to/<username>.github.io/
83
89
```
84
90
85
-
It will automatically generates the *Latest Modified Date*and *Categories / Tags* page for the posts.
91
+
The build results will be stored in the root directory of `<username>.github.io`and don't forget to push the changes of `<username>.github.io` to branch `master` on GitHub.
86
92
87
-
**3**. Push the changes to `origin/master` then go to GitHub website and enable GitHub Pages service for the repository `<username>.github.io`.
93
+
**3**. Go to GitHub website and enable GitHub Pages service for the new repository `<username>.github.io`.
88
94
89
95
**4**. Visit `https://<username>.github.io` and enjoy.
90
-
91
-
## See Also
92
-
93
-
*[Write a new post]({{ site.baseurl }}/posts/write-a-new-post/)
94
-
*[Text and Typography]({{ site.baseurl }}/posts/text-and-typography/)
95
-
*[Customize the Favicon]({{ site.baseurl }}/posts/customize-the-favicon/)
0 commit comments