Making portfolio website with hugo and github pages
First , you need to have hugo installed in your pc , follow the installation instructions given in hugo Documentation- https://gohugo.io/documentation/ .If you are using linux , you can run the command -
Sudo snap install hugo
Next , you need to install git and create a github account if you haven't already.
To host your personal website using github pages , follow the instruction given here- https://pages.github.com
I.e, first create a repository named username.github.io then clone the repository in your local machine .
Then go to hugo themes - https://themes.gohugo.io
Select a theme , i used Sada .Follow the Download instructions given over there.
For sada , I cloned the repository inside my username.github.io folder then removed the .git folder from it using rm -rf .git
Then change the directory git add .
, git commit -m "portfolio website"
then git push origin main
Then I follwed the instructions given over here - https://gohugo.io./hosting-and-deployment/hosting-on-github/
I made a hugo.yaml and copy-pasted the code. I had to make few changes in that - changed directory to sada before running hugo and also corrected the directory from which artefacts are uploaded - ./sada/public
Then after commiting the changes , the site became live.
Subscribe to my newsletter
Read articles from Priya directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by