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

  1. Create d0rksec.github.io repo (public, with readme.md)

  2. Create d0rksec.github.io-dev repo (private, with readme.md)

  3. Clone d0rksec.github.io-dev repo to computer (for example, into /stuff)

    git clone https://github.com/d0rksec/d0rksec.github.io-dev.git
    
  4. 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
      
  5. Generate a public/private key pair for publishing

    ssh-keygen -t rsa -b 4096 -C "<email>" -f publish_key -P ""
    
  6. On GitHub, add deploy key (under repo/settings) to d0rksec.github.io and paste contents of publish_key.pub

  7. On GitHub, add new secret (under repo/settings) to d0rksec.github.io-dev as ACTIONS_DEPLOY_KEY and paste contents of publish_key

  8. Create /stuff/d0rksec.github.io-dev/.gitignore

  9. 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
    
  10. Copy favicon files into /stuff/d0rksec.github.io-dev/static/

  11. Create /stuff/d0rksec.github.io-dev/content/archives.md

  12. Create /stuff/d0rksec.github.io-dev/content/search.md

  13. Create /stuff/d0rksec.github.io-dev/.github/workflows/deploy.yml

  14. After hugo server -D, check https://localhost:1313 how the site looks like

  15. In /stuff/d0rksec.github.io-dev/

    git add --all
    git commit -m "site created"
    git push -u origin main
    
  16. Check https://github.com/d0rksec/d0rksec.github.io/actions