Các bước cài theme Hugo Zen
hugo new -k widgets/pages homepage/<your-name.md>
để tạo home page có widgets Link: https://www.wangchucheng.com/en/docs/hugo-eureka/homepage-configuration/ Chạy lệnh sau:
cd D:
hugo new site BlogDuc
cd BlogDuc
git clone https://github.com/vimux/mainroad.git themes/mainroad
git clone https://github.com/frjo/hugo-theme-zen.git themes/zen
echo "theme = 'zen'" >> hugo.toml
cd themes\zen\exampleSite
hugo server --themesDir ../..
Làm đến đây thấy hiển thị trang Web trên add:
localhost:1313
của trình duyệt. Như vậy là đã làm thành công, theo cách hướng dẫn trên link: https://github.com/frjo/hugo-theme-zen#
Về lại gốc Blog:
cd D:\BlogDuc
Soạn trang đầu tiên cho site bằng lệnh,gõ trong Terminal:
hugo new content posts/my-first-post.md
(Đến đây báo lỗi file hugo.toml) Mở file này bằng Visual Studio rồi sửa lại cho đúng Font. Nhưng kết quả trên là chạy từ folder ExampleSite,còn chạy từ thư mục gốc của Blog ta làm, phải chép toàn bộ folder và file trong Example Site ra Site gốc, rồi chạy l ệnh
hugo server