2024-camp

hexschool - Hexo

此為套用了主題 hexschool 的完整 Hexo 専案,開箱即用

Required Node version Discord Chat

快速開始

專案設置(Project setup)

將專案複製到本地端

$ git clone git@github.com:hexschool/2024-camp-hexo.git

基礎套件安裝

$ cd 2024-camp-hexo
$ npm install

執行專案(Start the server)

$ hexo server

新增文章(Create a new post),建議以 Kebab case 進行命名。例如:your-post

$ hexo new post <your-post-name>

生成靜態檔案(Generate static files)

$ hexo generate

清除靜態檔案(Clear static files)

$ hexo clean

常見問題

Q:如何在文章中加入圖片

Step 1: 將圖片存放至 /source/images

Step 2: 在文章中以 ![](/images/your-image.png) 方式載入

Q:如何新增 / 修改 CSS 樣式

/themes/hexschool/source/scss/_custom.scss 中新增

Q:如何編譯 SCSS 檔案

Step 1: 安裝 Live Sass Compiler(若已安裝可略過此步驟)

Step 2: 點擊 VS Code 下方的 Watch Sass 按鈕

Step 3: 點擊 /themes/hexschool/source/scss/all.scss 並按下儲存快捷鍵

MacOS 使用 cmd + s,Windows 使用 ctrl + s

Note: 編譯完成的檔案會出現在 /themes/hexschool/source/css/all.min.css

更多資訊