This repo are sources for my personal website
A Hugo theme for a personal portfolio with minimalist design and responsiveness. Builded with Toha theme
- Documentation: toha-guides.netlify.app
- Hugo Version 0.118.0 (extended) or higher
- Go language 1.18 or higher (require for hugo modules)
- Node version v18.x or later and npm 8.x or later.
The easiest way to use this theme is to fork hugo-toha.github.io sample repo.Then change the configurations according to your need.
If you want to start from scratch, then follow these steps:
At first, initialize Hugo modules in your repo. This will create a go.mod
file.
hugo mod init github.com/<your username>/<your repo name>
Now, in your config.yaml
file, add a module
section.
# Use Hugo modules to add theme
module:
imports:
- path: github.com/hugo-toha/toha/v4
Check this sample config.yaml for further reference.
Now, run this command to load this theme as your module.
hugo mod tidy
Now, you can run your hugo site locally with the following steps:
Now run the following command to generate node dependency configuration. This will create the a package.json
file in you repo.
hugo mod npm pack
Install the node dependencies using following command:
npm install
Now, run you site locally using following command.
hugo server -w
When you run your site for first time, it will start with the default parameters. It should look similar to the example site. However, it will not have any sections in the homepage as we haven't configured them yet. You can configure your site by following the guides from here.
I am not a web developer. I have created this theme for my personal needs. So, it is reasonable to have some flaws in the codes. Feel free to open issues and PRs acknowledging the problems.
For local development, you can make changes in the theme submodule and test the changes against your own site or this example site locally.
Run your site locally:
$ hugo server -w
From there you can make changes to the source code of the theme while testing with your running Hugo site or the example site.