@@ -10,7 +10,7 @@ Blog template powered by jekyll
10
10
11
11
## 2. 安装
12
12
### 2.1 安装 Ruby development environment
13
- [ ` windows ` 安装教程] ( https://jekyllrb.com/docs/installation/windows/ ) .
13
+ [ ` windows 安装教程 ` ] ( https://jekyllrb.com/docs/installation/windows/ ) .
14
14
### 2.2 安装Jekyll and bundler gems.
15
15
16
16
``` shell
@@ -21,6 +21,62 @@ $ bundle config mirror.https://rubygems.org https://gems.ruby-china.com
21
21
# 删除Bundle的一个镜像源
22
22
$ bundle config --delete ' mirror.https://rubygems.org'
23
23
$ gem install jekyll bundler
24
+ ```
25
+
26
+ ## 3. 创建博客
27
+ Create a new Jekyll site at ./myblog.
28
+ ``` shell
29
+ $ jekyll new myblog
30
+ or
31
+ $ jekyll new . --force
32
+ ```
33
+
34
+ 注意:如果卡住,这一步会存在一些依赖包的安装。例如:x` 64-mingw32、 tzinfo-data、tzinfo (~> 1.2)、minima (~> 2.5) ` 查看依赖包
35
+
36
+ ``` shell
37
+ $ bundler list
38
+ Could not find gem ' minima (~> 2.5) x64-mingw32' in any of the gem sources
39
+ listed in your Gemfile.
40
+ ```
41
+
42
+ 安装依赖包
43
+ ``` shell
44
+ $ gem install 64-mingw32、 tzinfo-data、tzinfo (~> 1.2)、minima (~> 2.5)
45
+ ```
24
46
47
+ Change into your new directory.
48
+ ``` shell
49
+ cd myblog
50
+ ```
51
+
52
+ Build the site and make it available on a local server.
53
+ ``` shell
54
+ $ bundle exec jekyll serve
55
+ or (或者)
56
+ $ bundle exec jekyll s
57
+
58
+ Configuration file: C:/Users/XH/myblog/myblog/_config.yml
59
+ Source: C:/Users/XH/myblog/myblog
60
+ Destination: C:/Users/XH/myblog/myblog/_site
61
+ Incremental build: disabled. Enable with --incremental
62
+ Generating...
63
+ Jekyll Feed: Generating feed for posts
64
+ done in 3.23 seconds.
65
+ Auto-regeneration: enabled for ' C:/Users/XH/myblog/myblog'
66
+ Server address: http://127.0.0.1:4000/
67
+ Server running... press ctrl-c to stop.
25
68
```
69
+ 当然也可以直接执行:
70
+ ``` shell
71
+ $ jekyll serve
72
+
73
+ ```
74
+
75
+ Browse to ` http://localhost:4000 `
76
+
77
+ ![ image] ( https://raw.githubusercontent.com/frankdevhub/frankdevhub.github.io/master/examples01.png )
78
+
79
+ ## 4. github 托管
80
+ [ ` GitHub Pages ` ] ( https://pages.github.com/ ) 由Jekyll 提供支持,因此您可以免费使用 GitHub 轻松部署您的网站——[ ` 自定义域名 ` ] ( https://jekyllrb.com/docs/installation/windows/ ) 等等。
26
81
82
+ ![ image] ( https://raw.githubusercontent.com/frankdevhub/frankdevhub.github.io/master/examples02.png )
0 commit comments