As the example site shown, we use Configuration Directory to maintain easier organization and environment specific settings, it is especially useful on multilingual sites.

Site Configuration

The site configuration is located in config/_default/config.toml by default.

NameTypeDefaultDescription
titleString-Site title.
baseURLString-Site base URL.
copyrightString-Site copyright. The {year} placeholder will be replaced with this year.
defaultContentLanguageStringen
defaultContentLanguageInSubdirBooleanfalse
paginateInteger10
paginatePathStringpage
enableRobotsTXTBooleantrue
disqusShortnameString-Disqus shortname.
googleAnalyticsString-Google Analytics.
socialObject-Social Links .
authorObject-Author Widget .

See also All Configuration Settings .

Site Parameters

The site parameters are located in config/_default/params.toml by default.

NameTypeDefaultDescription
Page
mainSectionsArray["posts"]Main sections
titleCaseBooleanfalseCapitalized title or not
titleSeparatorString-Title separator
backgroundImageArray[]Background image, such as ['/images/bg.png'], ['/images/bg-light.png', '/images/bg-dark.png'].
commentBooleantrueWhether to enable comments
tocBooleantrueWhether to enable TOC
tocWordCountInteger280TOC is displayed only if the post’s word count is greater than this value.
tocPositionStringsidebarAvailable values: sidebar and content, only the posts layout is affected.
breadcrumbBooleantrueWhether to enable breadcrumb
dateFormatStringJan 2, 2006Date format. Checkout the Hugo Date and Time Templating Reference for details.
poweredByBooleantrueWhether to show powered by.
readingTimeBooleantrueWhether to display the reading time.
postDateBooleantrueWhether to display the post date in the post meta section.
mathBooleanfalseWhether to enable math globally.
diagramBooleanfalseWhether to enable diagram globally.
logoString/Booleanimages/logo.webpLogo image. Disable logo by setting it to false.
brandString-Brand text.
descriptionString-Site description.
keywordsString-Site keywords.
colorString-Color mode, light, dark or dynamic. Default to dynamic.
paletteString-Default palette. This will take effect after clearing the Cookie.
palettesArrayALLAvailable palettes. You can disable it by setting it to empty [].
featuredPostCountInteger/Boolean5The number of featured posts shown in sidebar. Turn off by setting it to false.
recentPostCountInteger/Boolean5The number of recent posts shown in sidebar. Turn off by setting it to false.
relatedPostCountInteger/Boolean5The number of related posts. Turn off by setting it to false.
categoryCountInteger/Boolean10The number of categories shown in sidebar. Turn off by setting it to false.
tagCountInteger/Boolean10The number of tags shown in sidebar. Turn off by setting it to false.
seriesCountInteger10The number of series shown in sidebar.
taxonomyPaginateInteger10
taxonomyPostCountInteger3The number of taxonomy’s posts. Turn off by setting it to false.
taxonomySortingMethodString-Sorting taxonomies by popularity, sort alphabetically by default.
countTaxonomyPostsBooleanfalseCount posts of taxonomy.
sidebarTaxonomiesArray["series", "categories", "tags"]The taxonomies on the sidebar.
fullWidthBoolean/ObjectfalseFull width.
fullWidth.{section}Boolean-Specify the full width for particular sections, such as posts, docs.
fixedHeaderBooleantrueTurn on/off fixed header.
rewardObject-Reward Widget , AKA Buy Me a Coffee Widget.
shareObject-Share buttons
share.addThisString-AddThis ’s pubid.
fontSizeObjectFont SizesComment or remove this parameter to disable font size switcher.
fontSize.smallString.9remSmall font size.
fontSize.extraSmallString.8remExtra small font size.
fontSize.largeString1.1remLarge font size.
fontSize.extraLargeString1.2remExtra large font size.
socialShareBooleantrueTurn on/off built-on social share button.
searchBarBooleantrueTurn on/off built-on search bar.
archiveObject-Archive .
searchObject-Search .
Webmaster Site Verification
siteVerificationObject-
siteVerification.googleString-Google
siteVerification.bingString-Bing
siteVerification.baiduString-Baidu
siteVerification.baiduUnionString-Baidu Union
siteVerification.soString-Qihoo 360
siteVerification.sogouString-Sogou
siteVerification.shenmaString-Shenma
Analytics
analyticsObject-Analytics configuration.
analytics.baiduString-Baidu Analytics.
googleAdsenseString-Google Adsense.
customCSSArray-See also custom assets .
customJSArray-See also custom assets .
utterancesObject-Utterances configuration.
Creative Commons License
creativeCommonsObject-
creativeCommons.byBooleantrueCredit must be given to you, the creator.
creativeCommons.ncBooleantrueOnly noncommercial use of your work is permitted.
creativeCommons.ndBooleantrueNo derivatives or adaptations of your work are permitted.
creativeCommons.saBooleantrueAdaptations must be shared under the same terms.
Code Block
codeBlockObject-
codeBlock.maxLinesInteger7
codeBlock.lineNosBooleantruetrue/false represents that show/hide the line numbers by default.
Post
postObject-
post.excerptStringSummaryOptions: description
post.excerptMaxLengthInteger320
post.copyrightBooleantrueWhether to display copyright section on each post.
post.plainifyExcerptBooleantrueFormat excerpt in HTML if false.
post.featuredImageBooleanfalseShow the featured image above the content.
post.numberifyHeadingsBooleanfalseCount headings automatically.
post.numberifyHeadingsEndLevelNumber6The depth of headings to count.
post.numberifyHeadingsSeparatorString-The separator between of number and headings.
post.tocStyleTypeStringnoneThe TOC’s CSS list-style-type property.
viewerBooleantrueImage Viewer
pwaObject-Progressive Web Apps
Sidebar
sidebarObject-
sidebar.fixedBooleanfalseFix default sidebar.
sidebar.archiveBooleantrueShow the archive widget on the sidebar.
Meta Tag
metaRobotsString-Empty means that turn it off.
contactObject-Contact Form
pinnedPostBooleantrueTurn on/off pinned posts.
pinnedPostCountInteger1The number of pinned posts.
rssString/BooleantrueDisplay the RSS button on the social links. Turn it off by false, link it to homepage all the times by setting it to home.

Except the Google webmaster tool, the other webmaster tools cannot work with hugo --minify, because they cannot recognize the minified meta tag.

Page Parameters

Page parameters are located in page’s Front Matter .

NameTypeDefaultDescription
Page
descriptionString-Page description.
keywordsArray-Page keywords.
commentBooleantrueWhether to enable comments. It won’t work if comment has been disabled globally.
tocBooleantrueWhether to enable TOC. It won’t work if toc has been disabled globally.
mathBooleanfalseWhether to enable math.
diagramBooleanfalseWhether to enable diagram.
rewardBooleantrueWhether to enable reward.
breadcrumbBooleantrueWhether to enable breadcrumb.
breadcrumbDividerString/Breadcrumb divider.
readingTimeBooleantrueWhether to display the reading time.
postDateBooleantrueWhether to display the post date in the post meta section.
copyrightBooleantrueWhether to display copyright section.
carouselBooleanfalseShow on carousel.
Creative Commons License
creativeCommonsObject-
creativeCommons.byBooleantrueCredit must be given to you, the creator.
creativeCommons.ncBooleantrueOnly noncommercial use of your work is permitted.
creativeCommons.ndBooleantrueNo derivatives or adaptations of your work are permitted.
creativeCommons.saBooleantrueAdaptations must be shared under the same terms.
Meta Tag
metaRobotsString-Empty means that turn it off.
pinnedBooleanfalsePinning posts.
featuredPostCountInteger/Boolean5The number of featured posts shown in sidebar. Turn off by setting it to false.
recentPostCountInteger/Boolean5The number of recent posts shown in sidebar. Turn off by setting it to false.
relatedPostCountInteger/Boolean5The number of related posts. Turn off by setting it to false.