Base Configurations
This doc only introduces some settings that are commonly used in most Hugo sites.
Please view the full configuration for more details.
Basic Settings
baseURL = “https://g1en.site ”
The absolute URL (protocol, host, path, and trailing slash) of your published site.
defaultContentLanguage = “zh”
The projects’s default content language. Default is en.
You need to configure it to enable the corresponding i18n.
locale = “zh-Hans”
Before Hugo v0.158.0Â ,
Hugo used languageCode to indicate the site’s locale. Now it’s deprecated. You need to replace it with locale to make it work in the future.
Locale is used to set the lang attribute in the <html> tag. It will also be:
- Used in RSS
- Used in the
og:localemeta tag (Open Graph protocol)
title = “g1eny0ung’s Blog”
The site title.
Extra Settings
enableRobotsTXT = true
Optional. View https://en.wikipedia.org/wiki/Robots.txt to learn more about the robots.txt file.
hasCJKLanguage = true
As my blog was written in Chinese, I need to set this to correct the {{ .ReadingTime }} of the post.