~ % hexo generate INFO Start processing INFO Files loaded in 4.95 s ... 略 ... INFO Generated: 2019/10/19/AWS/Study-Notes-EKS_Networking/index.html INFO Generated: 2019/08/25/Management/Problems-of-Meeting/index.html INFO Generated: 2019/09/09/AWS/Whitepaper-Using-AWS-For-Disaster-Recovery/index.html INFO Generated: 2019/08/14/About/About-Certificate/index.html ... 略 ... INFO 783 files generated in 2.43 min ~ %
Built in 1034 ms Watching for changes in /tmp/gtcafe/{archetypes,content,data,layouts,static,themes} Watching for config changes in /tmp/gtcafe/config.toml Environment: "development" Serving pages from memory Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
效能差非常的多。除了效能,另外我想要擴展 Blog 這件事情,讓他變成我的 Portal Site,去年談 文件持續交付 的過程,以 K8s 官網為研究對象,覺得 Hugo 應該是可以投資、嘗試的。
# 1. 安裝 hugo ~$ brew install hugo ## 1.1 確認版本, 筆記當下的最新版本是 v0.62.2 ~$ hugo version Hugo Static Site Generator v0.62.2/extended darwin/amd64 BuildDate: unknown
# 2. 初始化 Static Site ~$ hugo new site gtcafe Congratulations! Your new Hugo site is created in /tmp/gtcafe. # 2.1 切換到 site 目錄 ~$ cd gtcafe
# ------------- # 安裝 # ------------- ## 在 macOS 安裝 Hugo ~$ brew install hugo ## 已經安裝過了,用以下方式 Upgrade. # ~$ brew upgrade hugo
## 確認版本,筆記當下的最新版本是 v0.62.2 ~$ hugo version Hugo Static Site Generator v0.62.2/extended darwin/amd64 BuildDate: unknown
# ------------- # 初始化 Static Site # ------------- ~$ hugo new site gtcafe Congratulations! Your new Hugo site is created in /tmp/gtcafe.
Just a few more steps and you re ready to go:
1. Download a theme into the same-named folder. Choose a theme from https://themes.gohugo.io/ or create your own with the "hugo new theme <THEMENAME>"command. 2. Perhaps you want to add some content. You can add single files with "hugo new <SECTIONNAME>/<FILENAME>.<FORMAT>". 3. Start the built-in live server via "hugo server".
Visit https://gohugo.io/ for quickstart guide and full documentation.
目錄結構
建立好一個 Site 之後,Hugo 產生了一個基本的結構,包含文件內容、Themes、配置 … 等,預設會產生以下目錄結構:
## 測試佈景主題,建議先不用急著配置 config.toml ## 而是用底下測試方法測試 theme,找到喜歡的 theme 之後,再開始修改 config.toml ~$ hugo server -D --theme=ananke ~$ hugo server -D --theme=hugo_theme_robust ~$ hugo server -D --theme=hugo-material-docs
--- date: 2016-03-08T21:07:13+01:00 title: Material for Hugo type: index weight: 0 ---
## Beautiful documentation
Material is a theme for [Hugo](https://gohugo.io), a fast and flexible static site generator. It is built using Google's [material design](https://www.google.com/design/spec/material-design/introduction.html) guidelines, fully responsive, optimized for touch and pointer devices as well as all sorts of screen sizes.

Material is very lightweight – it is built from scratch using Javascript and CSS that weighs less than 30kb (minified, gzipped and excluding Google Fonts and Analytics). Yet, it is highly customizable and degrades gracefully in older browsers.