Cara Instal Tema di Hugo

Di Hugo terdapat banyak theme yang dapat Anda temukan baik dari website resmi atau dari Github dan Gitlab. Berikut merupakan panduan singkat untuk menginstal theme di hugo.

Untuk membuat situs baru gunakan perintah.

hugo new site NewSite

Lalu masuk ke direktori NewSite.

cd NewSite

Contoh theme yang digunakan untuk panduan kali ini adalah https://gitlab.com/writeonlyhugo/up-business-theme.git.

Jalankan git init lalu clone repository.

git init
git submodule add https://gitlab.com/writeonlyhugo/up-business-theme.git themes/up-business-theme

Hapus file konfig hugo.toml

rm hugo.toml

Copy konfigurasi beserta content dan data dari direktori theme.

cp themes/up-business-theme/hugoBasicExample/config.yaml .
cp -a themes/up-business-theme/hugoBasicExample/content/* content/
cp -a themes/up-business-theme/hugoBasicExample/data/* data/
Ini dapat berbeda tergantung dari theme yang Anda pilih.

Terakhir jalankan local development untuk memastikan theme sudah terinstal.

hugo server