Personal website using Hugo, Github pages, and Github actions.
Create a new Github repository named
{username}.github.ioAdd a README and make an initial commit
Clone the repository on your computer
$ cd Downloads
$ git clone git@github.com:diptadas/diptadas.github.io.git
- Initialize a new Hugo site in the same directory
$ cd Downloads
$ hugo new site diptadas.github.io --force
- Add a theme using git submodule
$ git submodule add https://github.com/ojroques/hugo-researcher.git themes/researcher
Copy all contents from
themes/researcher/exampleSiteto the root folder and edit as desiredRun the following command and check the website locally at http://localhost:1313/
$ hugo server
Create a
.github/workflows/gh-pages.yamlfile in the root directory and copy contents from here.- Enable Hugo extended version and
force_orphan
- Enable Hugo extended version and
Make a commit and push to Github
Go to Github and check the status of the workflow on the
Actionstab. It will publish the generated website on thegh-pagesbranchGo to
Settings > Pages > Sourceand select thegh-pagesbranchYour website should be published at
{username}.github.io