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.
- 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.
- languageCode defines your global site language. For more information, see Official Hugo Docs.
- title is for the main title of your website.
- theme sets up the used theme. If your theme is located in
my-project/themes/theme-name
folder, then the value for this parameter istheme-name
. - summaryLength decides how many words are in excerpts of your posts when they are displayed as a preview. The default
summaryLength
is 70 words. - 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.
- disqusShortname add your Disqus shortname to enable comments on the blog section. To install Disqus please follow this tutorial.
- 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.
- timeZone is the default time zone for time stamps. Use any valid TZ database name. see this for a list of valid time zones.
- 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