Like everyone else and their dog, I set up this blog website to post about personal projects in technology and other fun topics.
Components Used:
- Mac
- Hugo
- PaperMod
- GitHub Pages
Local Deployment:
In Local Machine:
Brew Install Hugo
git init
git submodule add https://github.com/adityatelange/hugo-PaperMod/wiki/Features#profile-mode themes/hugo-PaperMod
hugo server -D
- Go to: http://localhost:1313
- Stop Server: Ctrl C
GitHub Pages Deployment:
In Github.com:
- Create new repository named
<username>.github.io
, filling in your username
In Local Machine:
git remote add origin https://github.com/<username>/<username>.github.io.git
git branch -M main
git push -u origin main
Nothing will show up. Will need to tell GitHub it is a Hugo project
Create Build File with Github Actions:
In GitHub.com:
- Go to Settings tab
- Go to Pages
- Under Build and Deployment select “GitHub Actions”
- Search for “Hugo”
- “Commit and Push” hugo build file to repository
Create and Display Post
In Local Machine:
hugo new content posts/<postname>.md
Filling in a postname you want- Place content in post
- In Front Matter (markdown header) set “draft” to “false”
hugo
git add .
git commit -m <message>
git push
You should now see a working Hugo Site at https://<username>.github.io
.
Add Custom Domain (Optional):
In Github.com:
- Go to Settings tab
- Go to Pages
- Under Custom Domain add your custom domain
- Will take a while to do DNS check
- Make sure your DNS records are pointing to github correctly
Doc URLs:
Hope there are good things to come!