brew install hugo
hugo new site mysite
cd ./mysite
Choose a theme on hugo themes and run this command:
hugo new theme <your-theme-name>
Configure your theme in hugo.toml
theme = '<your-theme-name>'
This command will generate a .md
file in the /content folder
hugo new posts/hello.md
Run these commands to generate or update the /public
folder:
hugo
hugo server -D --renderStaticToDisk --baseURL=your-guthub-pages-url --appendPort=false
The actual content to host a static site will be in /public
folder, so you need to push the content inside it on your GitHub Pages repo.
cd /public
git init
git remote add your-githubpage-repo-url
git add .
git push origin main
Check your page on https://your-github-name.github.io