- 「# H1」:最大的標題
- 「## H2」: 次大的標題
- 「- item」:清單條列用,Tab 可縮排
- 「[連結請點我](https://www.mou.tw)」:超連結
- 「」:圖片
- 「`#include <stdio.h>`」:放 Code
1.
方式重開@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
choco install git.install -y
choco install golang -y
choco install hugo -y
hugo version
brew
套件管理/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew update
brew install hugo
hugo version
hugo new site csstblog
cd csstblog
git init
# import theme, hugo use git to manage theme
# git submodule 是把一個 repo 放到當前 repo 底下。
git submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/ananke
在config.toml
中新增 theme = "ananke"
echo 'theme = "ananke"' >> config.toml
config.toml
就是設定檔案,有問題先檢查他。
輸入以下指令打開 config.toml
檔案
第四行新增 theme = "ananke"
hugo new posts/my-first-post.md
你可以在這個檔案內打點字。
hugo server -D
hugo -D
更新 config.toml
中的第一行為:
baseURL = https://<UserName>.github.io/
baseURL = https://<UserName>.github.io/<RepoName>
Ex:
baseURL = https://William-Mou.github.io/hugo_test
git add .
git commit -m "Init"
接著創立 GitHub Repo
並依照 GitHub Repo 提示逐行複製貼上
HUGO theme list
每一種 theme 他們的檔案名稱與設定檔不盡相同,使用其他 theme 時記得要去看作者的文件喔!
屬於
軟體工程(英語:software engineering),是軟體開發領域裡對工程方法的系統應用。
CI/CD 是 Continuous Integration / Continuous Deploy 的縮寫,倡導開發者應建立一套流程能夠在程式碼 push 到版本控制系統後,即時驗證並隨時有穩定可發表/部署的 codebase。
mkdir -p .github/workflows/
wget -O ./.github/workflows/gh-pages.yml https://raw.githubusercontent.com/William-Mou/csstblog/main/.github/workflows/gh-pages.yml
對以下網址按右鍵,「另存連結」,下載下來
https://raw.githubusercontent.com/William-Mou/quickstart_for-_hugo/main/.github/workflows/gh-pages.yml
接著創建 .github/workflows/ 資料夾,將他放到裡面
git add .
git commit -m "Add gh=pages.yml"
git push
你覺得 https://tw-csie-sprout.github.io/py2020/ 這樣的網址很醜嗎?
那就買一個專屬的名字吧!(Domain、域名)
租了名字,如何給你的網站名字ㄋ?
<@所有>.mou.tw 的網頁(A)
全部都給 GitHub(192.230.252.153) 處理
可以參考這篇:https://coreychen71.github.io/posts/2019-05/hugoaddgoogleanalytics/