TOC
Prerequisites
hugo
Install Hugo on Fedora
- Fedora 28+:
sudo dnf install hugo - Fedora 27-:
sudo dnf install snapsnap install hugo
Initial Setup
hugo new sitePROJECT NAMEcdPROJECT NAMEgit init
Setup a Github Repository
- Create a new repository
git remote add originREPO ADDRESS: usuallygit@github.com:...gitgit pull origin mastergit 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.tomland replace it withthemes/zmd/exampleSite/config.toml - Backup
archetypes/default.mdand 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.jpgthemes/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 mastermake upload: build and upload all content to Github.
