Hugo <3 GitHub Pages
With Hugo, I was able to quickly deploy a functional website with plenty of themes to select from. Hugo is somewhere between you build up a site from HTML+CSS+JS by hand and a fully hosted site, where your only job is to edit content in some online Markdown editor. With this setup, you can manually change theme settings or the structure of your content, play with git - if you want. If you’re satisfied with the look of your site, you can just push content to it.
The pages you would need the most to start with
Short list of steps
Create d0rksec.github.io repo (public, with
readme.md
)Create d0rksec.github.io-dev repo (private, with
readme.md
)Clone d0rksec.github.io-dev repo to computer (for example, into
/stuff
)git clone https://github.com/d0rksec/d0rksec.github.io-dev.git
Populate
/stuff/d0rksec.github.io-dev/
with a blank site (following steps on local computer):Install Hugo (
.deb
worked well, had permission issues with snap package)Create a blank site
hugo new site /stuff/d0rksec.github.io-dev/ --force
Generate a public/private key pair for publishing
ssh-keygen -t rsa -b 4096 -C "<email>" -f publish_key -P ""
On GitHub, add deploy key (under repo/settings) to d0rksec.github.io and paste contents of
publish_key.pub
On GitHub, add new secret (under repo/settings) to d0rksec.github.io-dev as ACTIONS_DEPLOY_KEY and paste contents of
publish_key
Create
/stuff/d0rksec.github.io-dev/.gitignore
Install theme (PaperMod) as submodule
cd /stuff/d0rksec.github.io-dev git submodule add --depth=1 https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod git submodule update --init --recursive
Copy favicon files into
/stuff/d0rksec.github.io-dev/static/
Create
/stuff/d0rksec.github.io-dev/content/archives.md
Create
/stuff/d0rksec.github.io-dev/content/search.md
Create
/stuff/d0rksec.github.io-dev/.github/workflows/deploy.yml
After
hugo server -D
, check https://localhost:1313 how the site looks likeIn
/stuff/d0rksec.github.io-dev/
git add --all git commit -m "site created" git push -u origin main
Useful links
- https://gohugo.io/getting-started/quick-start/
- https://saltares.com/easily-deploy-your-hugo-site-to-github-pages/
- https://github.com/adityatelange/hugo-PaperMod/wiki/Installation
- https://github.com/peaceiris/actions-gh-pages
- https://muhannad0.github.io/post/using-github-actions-to-deploy-my-blog/
- https://medium.com/@asishrs/automate-your-github-pages-deployment-using-hugo-and-actions-518b959a51f9