先確認電腦已經安裝下列軟體
node -v
)Mac需要先關閉系統完整保護(SIP)
(當在Mac上嘗試開啟一些第三方軟體的時候,可能會受到SIP的限制而無法正常使用。)
先查看SIP開啟/關閉狀態
在terminal中輸入csrutil status
在Mac上關閉SIP
step1. 重新啟動Mac開機鍵時,同時按Command+R鍵
step2. 出現彈出視窗後,在螢幕左上方的「工具程式」選單中點按「終端機」。
step3. 啟動「終端機」視窗後,在「終端機(terminal)」中輸入csrutil disable
step4. 關閉「終端機」視窗,並重新開機。
補充: 待整個回合(下載Hexo完畢)結束之後,記得修改SIP狀態為開啟,重複上述動作,在「終端機(terminal)」中輸入csrutil enable
。
正式開始下載Hexo
開始透過npm安裝Hexo,在terminal中輸入安裝指令:
$ npm install hexo-cli -g
初始化資料夾
使用指令建立資料夾,在建立的同時給予命名,並自動初始化資料夾內的檔案結構(示範:以'blog'作為資料夾名稱),請依序執行下方指令
$ hexo init <folder name>
$ cd <folder name>
$ npm install
建立完成後,專案資料夾會有下列檔案:
在本地端開啟blog網頁
完成上述流程後,在terminal輸入啟用本地端伺服器的指令
$ hexo server
本地端伺服器已經啟用
即可在瀏覽器中檢視blog畫面(http://localhost:4000)
新增文章在blog中
在blog資料夾的內層中找到_posts資料夾,並將.md檔案拖曳至於其中
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing