0%

day1_第一次安裝Hexo就出錯,ERR_SSL_PROTOCOL_ERROR

Starter

2021新的一年,利用Static Site Generator將工程的點點滴滴記錄下來.
但Hexo第一次安裝就翻車…

選擇Hexo前,參考以下網站,並得出結論:


來,起手式:

npm install hexo-cli -g //安裝Hexo命令到node.js中使用  
hexo init name // hexo-cli建立一個叫name的專案資料夾。
cd name // 進入專案資料夾
npm install // 安裝 Hexo所需套件

至此算是安裝完成,但再來兩行更趨完美:

npm install hexo-deployer-git --save  //安裝 git 部署套件
npm install hexo-admin --save //安裝 hexo-admin 文章管理的後台插件

接著只要打上

hexo g // 製造靜態網頁檔案
hexo s // 運行本地伺服器

出現以下,進入該網址就大功告成了。

INFO  Start processing
INFO Hexo is running at http://localhost:4000. Press Ctrl+C to stop.

終究還是有考驗等著我:
點擊link進去後卻發生「ERR_SSL_PROTOCOL_ERROR」錯誤.
參考一篇教學瀏覽器強制跳轉 HTTPS 網址怎麼辦?

進入 chrome://net-internals/#hsts
「Delete domain security policies」輸入localhost, 點擊Delete
這時候你再去輸入「 http://localhost/ 」你就會發現可以進入囉。