TOC
Prerequisites
hugo
Install Hugo on Fedora
- Fedora 28+:
sudo dnf install hugo
- Fedora 27-:
sudo dnf install snap
snap install hugo
Initial Setup
hugo new site
PROJECT NAMEcd
PROJECT NAMEgit init
Setup a Github Repository
- Create a new repository
git remote add origin
REPO ADDRESS: usuallygit@github.com:...git
git pull origin master
git push
- Repository settings > Source: master branch /docs folder
Setup Custom Theme: zmd
- Fork the Github repository.
git submodule add https://github.com/Superdanby/hugo-zmd-theme themes/zmd
- Backup
config.toml
and replace it withthemes/zmd/exampleSite/config.toml
- Backup
archetypes/default.md
and replace it withthemes/zmd/exampleSite/archetypes/default.md
mkdir content/abouts
- Place your profile picture in
content/abouts
There are some settings needs to be modified:
config.toml
: blog base URLthemes/zmd/layouts/_default/baseof.html
: profile pictureabouts/me.jpg
themes/zmd/layouts/partials/header.html
: profile pictureabouts/me.jpg
Reduce Upload Process
Paste the following into a makefile:
MSG = "Build at $(shell /bin/date '+%Y-%m-%d %H-%M-%S')"
upload:
rm -rf ./docs && hugo
git add -A
git commit -m $(MSG)
git push origin master
make upload
: build and upload all content to Github.