Need Theme Tweaks?

If you need to customize theme, add extra pages, or complete website development from scratch, you can hire us.

Check Our Services

Configuration

Here is the configurations for your website. You can change those as per your requirements.

Default configuration

In this project, hugo.toml file is the main configuration file.

  1. baseURL field for your website URL / domain. Add your site URL here. Remember, you need to add a trailing slash at the end of the URL.
  2. languageCode defines your global site language. For more information, see Official Hugo Docs.
  3. title is for the main title of your website.
  4. theme sets up the used theme. If your theme is located in my-project/themes/theme-name folder, then the value for this parameter is theme-name.
  5. summaryLength decides how many words are in excerpts of your posts when they are displayed as a preview. The default summaryLength is 70 words.
  6. paginate set the number of posts shown on blog overview pages. If you have more than this amount of posts, pagination will be visible to navigate the next set of posts.
  7. disqusShortname add your Disqus shortname to enable comments on the blog section. To install Disqus please follow this tutorial.
  8. googleAnalytics add your Google Analytics ID to enable analytics on all pages. # example: UA-123-45. For more info, read the article. If you want another third-party analytics, you can contact us for custom service.
  9. timeZone is the default time zone for time stamps. Use any valid TZ database name. see this for a list of valid time zones.
  10. disableLanguages field is for disabling languages. If you don’t want to show one or multiple languages, then you can add the language name here. It will disable those languages from your site. For example, disableLanguages = ["fr"] will disable the french language from your site.

Third-Party Plugins

You can add or remove third-party plugins from hugo.toml file. We create a loop for plugins. You can see two plugins loops here, the first one is for css, and the last one is for js.

Sometimes you need to close the Hugo server and run again for rendered correctly.

CSS plugins

[[params.plugins.css]]
link = "https://cdn.examplesite.com/your-plugin.css"
attributes = "your-attributes" # optional field

js plugins

[[params.plugins.js]]
link = "https://cdn.examplesite.com/your-plugin.js"
attributes = "your-attributes" # optional field
Improve this page on Github  — Last updated:  Sun, Jul 9, 2023