Hugo Blog Workflow
Finally get my Hugo Blog workflow iron out.
Ghost, Hugo and Markdown
Early 2017 I switched my blogging package from WordPress to Ghost.
I was attracted to Ghost due to its simplicity, low resource requirement, and most importantly the markdown syntax.
I started using markdown with GitHub. Nowadays I create all my documentation, notes in markdown. Typing them up in VSCode, I don’t need the web GUI interface in Ghost.
Late last year I come across the term static site generator
. After experimenting with different packages, I picked Hugo.
Workflow
Hugo is a command line tool. There is no online/web GUI. It does have a steep learning curve during initial setup. However once I lock down my directory structure, theme, and all the commands I need, it become smooth and easy.
Following is the workflow in plan commands:
Create skeleton markdown file.
1 2
cd <blog dir> hugo new blog/<new-postname>.md
Edit blog post in VSCode.
Test in browser
1
hugo server -D
Publish to web server
1 2
hugo rsync --stats -haz --delete public user@host:/home/user
zsh function
I put the publishing steps with a few enhancement into my zsh function:
|
|
Theme
It is always a pain to pick a new theme when switching packages. I finally settle on the current one, and modified it with AdSense. Following are the original and my fork:
- Original: github.com/Vimux/Binario
- With AdSense: github.com/J-Siu/Binario
Conclusion
The switch gives me a chance to review my blog writing, technique and post structure. It was a good experience, but not sure if I want another one anytime soon.
Also check out my automation setup: Jenkins Blog Automation.