搭建hexo的部落格

2021-09-17 21:48:31 字數 1392 閱讀 8342

前提:你已經安裝了git node
安裝hexo

npm install hexo -g
出現以下的報錯資訊,隨後 是解決方法

npm err! tar.unpack untar error /users/aprildove/.npm/hexo/3.2.2/package.tgz

npm err! darwin 15.3.0

npm err! ar** "/usr/local/bin/node" "/usr/local/bin/npm" "install" "hexo" "-g"

npm err! node v4.4.5

npm err! npm v2.15.5

npm err! path /usr/local/lib/node_modules/hexo

npm err! code eacces

npm err! errno -13

npm err! syscall mkdir

npm err! error: eacces: permission denied, mkdir '/usr/local/lib/node_modules/hexo'

npm err! at error (native)

npm err!

npm err!

npm err! please try running this command again as root/administrator.

npm err! please include the following file with any support request:

npm err! /users/aprildove/workspace/github/npm-debug.log

這些資訊表明,由於許可權不足,無法執行

只需一行sudo chown -r $user /usr/local再 重新執行一次npm install hexo -g即可

hexo安裝後的設定步驟如下
hexo init #執行時,此folder中會裝入很多hexo配置檔案和主題檔案,檔案目錄應為乙個子檔案
cd #進入到hexo的檔案中
npm install #安裝依賴包
hexo generate #生成靜態頁面至public目錄

hexo server #啟動服務,預設在http://localhost:4000

接下來正在選擇一套安裝主題。。

hexo搭建部落格

有乙個github賬號,沒有的話去註冊乙個 安裝了node.js npm 安裝了git 新建乙個名為你的使用者名稱.github.io的倉庫,比如說,如果你的github使用者名稱是test,那麼你就新建test.github.io的倉庫 必須是你的使用者名稱,其它名稱無效 將來你的 訪問位址就是 ...

Hexo 部落格搭建

本站的部落格搭建採用hexo next主題,部署在github pages。下面手把手帶你搭建免費高效的部落格系統 hexo 快速 簡潔且高效的部落格框架,基於nodejs環境。hexo使用markdown 或其他渲染引擎 解析文章,在幾秒內,即可利用靚麗的主題生成靜態網頁。安裝前提 git win...

hexo部落格搭建

使用hexo搭建乙個部落格,並託管在github pages上的簡易教程。在github上建立乙個倉庫,名稱為.github.io npm install g hexo cli hexo init cdnpminstall hexo server在4000埠檢視效果 在 config.yml檔案中,...