-
misscodingnz-blog
- will hold the blog configuration and blog files
- basic settings
- Public or Private
- didnt use readme
-
misscodingnz-blog.github.io
- will be for github pages, will hold all the static content
- need to set up github.io pages
- click on repository settings
- click on pages on the left menu
- select source under build and deployment
- either select:
- github actions (Beta)
- Deploy from a branch
- (I used Deploy from a branch)
- either select:
- select the branch and folder to use to use
- I used:
- main branch
- root folder
- I used:
- add custom domain if needed,(I did not use domain in this example)
- select whether or not you want https enforced
- MAKE SURE SETTINGS ARE SAVED AS YOU GO
- After few minutes you will see a link where the site will be live
- The live link for this example:
-
Create new site
hugo new site misscodingnz-blog
-
Initiliaze a git repository
git init
-
Add files to staging
git add .
-
Commit the staged files to the repository
- committed initial files
git commit -m "new hugo site, with tutorial commands"
-
Make sure you are on Main branch, add remote origin and push repository to github
- make sure you are on the main branch
git branch -M main
- add remote origin
git remote add origin https://github.com/dirwebdev/misscodingnz-blog.git
- push repository to github
git push -U origin main
- make sure you are on the main branch
-
Create .git ignore
- site used to create .gitignore
- https://www.toptal.com/developers/gitignore
- added flags:
- VisualStudioCode
- Hugo
- macOS
- added flags:
- https://www.toptal.com/developers/gitignore
- add node_modules to .gitignore
- in this tutorial node_modules/* to this section...
# Icon must end with two \r Icon node_modules/*
- add .gitignore to repository
- (make sure you are in site root directory in terminal)
touch .gitignore
- copy and paste generated .gitignore text into new .gitignore file and save.
- commit new .gitignore to repository.
git add . git commit -m "added .gitignore updated tutorial_info"
- site used to create .gitignore
-
Add hugo theme:
- Link for hugo themes
- Theme used in tutorial
- Add theme submodule to site:
git submodule add https://github.com/apvarun/blist-hugo-theme.git themes/blist
- install necessary modules
- postcss-cli
- to use PostCss with Hugo build
npm i -g postcss-cli
- to use PostCss with Hugo build
- postcss-cli