Skip to content

Commit b807da4

Browse files
committed
add Makefile
1 parent b3e2f25 commit b807da4

File tree

2 files changed

+71
-22
lines changed

2 files changed

+71
-22
lines changed

Makefile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
.PHONY: main install run update review clean
2+
3+
OS_NAME := $(shell uname)
4+
BRANCH := $(shell cat .git/HEAD | awk -F/ '{ print $$3 }')
5+
6+
main: run
7+
8+
install:
9+
gem install --no-ri --no-doc bundler github-pages
10+
11+
run:
12+
bundle exec jekyll serve
13+
14+
update:
15+
-git pull origin ${BRANCH}
16+
17+
review:
18+
ifeq (${OS_NAME}, Darwin)
19+
open http://0.0.0.0:4000
20+
else
21+
firefox http://0.0.0.0:4000
22+
endif
23+
24+
push:
25+
-git push origin master
26+
-git push origin develop
27+
28+
clean:
29+
-rm -rf _site Gemfile.lock
30+

README.md

Lines changed: 41 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,24 @@
44

55
聯繫管道:
66

7-
* Telegram 群組聊天室: [https://telegram.me/joinchat/CPYvygKUxvnd8xrGsW26MA](https://telegram.me/joinchat/CPYvygKUxvnd8xrGsW26MA)
8-
* Mail list: [https://groups.google.com/forum/?fromgroups#!forum/vim-taiwan](https://groups.google.com/forum/?fromgroups#!forum/vim-taiwan)
7+
* [Telegram 群組聊天室](https://telegram.me/joinchat/CPYvygKUxvnd8xrGsW26MA)
8+
* [Mail list](https://groups.google.com/forum/?fromgroups#!forum/vim-taiwan)
99
* IRC: vim-tw@irc.freenode.net
1010

11-
## 如何在本機 (localhost) 建置 vim-tw.github.io
11+
## 如何在本機 (localhost) 建置環境
12+
13+
*vim-tw.github.io* 使用 github-pages (Jekll) framework 進行建置,詳請請參考 [Using Jekyll with Pages |
14+
GitHub Pages Basics](https://help.github.com/articles/using-jekyll-with-pages/) 一文。
1215

1316
1. 安裝 Ruby 套件。
1417

15-
$ gem install --no-ri --no-doc bundler github-pages
18+
$ #gem install --no-ri --no-doc bundler github-pages
19+
$ make install
1620

1721
2. 執行 server。
1822

19-
$ jekyll serve
23+
$ #bundle exec jekyll serve
24+
$ make run
2025
Configuration file: /Users/vimmer/vcs/vim-tw.github.io/_config.yml
2126
Source: /Users/vimmer/vcs/vim-tw.github.io
2227
Destination: /Users/vimmer/vcs/vim-tw.github.io/_site
@@ -31,23 +36,37 @@
3136

3237
若需新增其它頁面,只需於根目錄下新增 foo.md 或 foo.html 即可,(README.md 例外,請參考 _config.yml 裡的第一行 `exclude: [README.md]`)。
3338

34-
$ tree
35-
.
36-
├── LICENSE
37-
├── README.md
38-
├── _config.yml
39-
├── _layouts
40-
│ └── default.html
41-
├── _sass
42-
│ └── variable.scss
43-
├── _site
44-
│ ├── LICENSE
45-
│ ├── index.html
46-
│ └── style.css
47-
├── index.md
48-
└── style.scss
49-
50-
3 directories, 10 files
39+
$ tree
40+
.
41+
├── CNAME
42+
├── Gemfile
43+
├── Gemfile.lock
44+
├── LICENSE
45+
├── Makefile
46+
├── README.md
47+
├── _config.yml
48+
├── _includes
49+
│   ├── footer.html
50+
│   └── header.html
51+
├── _layouts
52+
│   └── default.html
53+
├── _sass
54+
│   └── variable.scss
55+
├── _site
56+
│   ├── CNAME
57+
│   ├── Gemfile
58+
│   ├── Gemfile.lock
59+
│   ├── LICENSE
60+
│   ├── index.html
61+
│   ├── js
62+
│   │   └── fetch.js
63+
│   └── style.css
64+
├── index.md
65+
├── js
66+
│   └── fetch.js
67+
└── style.scss
68+
69+
6 directories, 21 files
5170

5271
## 授權 (LICENSE)
5372

0 commit comments

Comments
 (0)