How to use hugo themes and build our website.
» How To Use Hugo Themes?
-
Go to themes.gohugo.io
-
Select the theme of your prefered choice.
-
Go in their demo site and look for the documentation and follow it for building your website.
» Using FixIt theme
- Open Fixit demo.
- In docs link, click basic and go through the documentation.
» To build new Hugo site
- To build new Hugo site in your system, run the command in command prompt or vs code terminal
hugo new site your_site_name
The above line will create your hugo website in
local disc C: > User
- Now go in directory of your website folder with
cd your_site_name
- After, all these steps are done clone your choosen hugo theme in themes folder of your website folder, in my case this link is provided in FixIt documentation.
git clone https://github.com/hugo-fixit/FixIt.git themes/FixIt
- This will clone your choosen theme in themes folder of your website folder.
» Mention theme name in config.toml file
-
Don’t forget this step it’s the most important.
-
Type this code in config file.
theme = 'YOUR_CHOOSEN_THEME_NAME'
- In my case it’s
theme = 'FixIt'
- If this is forgotten, hugo site will throw you any Page Not Found Error.
» Create first post
- To create first post run the command.
hugo new posts/first_post.md
-
This will create your first_post.md file in content folder of website.
-
By default our post is set to draft: true so make that draft: false in your first_post.md file.
» To make changes in title. avatar, social links
To make changes in your website use config.toml file, every thing needed to be changed is in config.toml file.