站點參數文件默認為 config/_default/params.toml

名稱類型默認值說明
Page
mainSectionsArray["posts"]主要的 sections
titleCaseBooleanfalse標題首字母是否大寫
titleSeparatorString-標題分隔符
backgroundImageArray[]背景圖,如:['/images/bg.png'], ['/images/bg-light.png', '/images/bg-dark.png']
commentBooleantrue是否開啟評論
tocBooleantrue是否開啟目錄
tocPositionStringsidebar可選值:sidebarcontent,僅作用於 post 佈局。
tocWordCountInteger280僅當文章的字數超過此值時,才會顯示目錄。
breadcrumbBooleantrue是否開啟面包屑導航
breadcrumbDividerString/面包屑導航分隔符
dateFormatStringJan 2, 2006日期格式。 查閱 Hugo Date and Time Templating Reference 以獲取詳細信息。
poweredByBooleantrue是否顯示技術支持。
readingTimeBooleantrue是否顯示閱讀時間
postDateBooleantrue是否顯示發表日期
mathBooleanfalse是否開啟 math
diagramBooleanfalse是否開啟 diagram
logoString/Booleanimages/logo.webpLogo。設置為 false 以禁用 Logo。
brandString-Brand
descriptionString-站點描述
keywordsString-站點關鍵詞
colorString-顏色風格, lightdark 或者 auto(默認)。
paletteString-默認配色,清理 Cookie 後生效。
palettesArrayALL可選配色,如需禁用此選項,可將其設為空值 []
featuredPostCountInteger/Boolean5精選文章數,false 則隱藏。
recentPostCountInteger/Boolean5最近文章數,false 則隱藏。
relatedPostCountInteger/Boolean5相關文章數,false 則隱藏。
categoryCountInteger/Boolean10分類數,false 則隱藏。
tagCountInteger/Boolean10標簽數,false 則隱藏。
seriesCountInteger/Boolean10專欄數,false 則隱藏。
taxonomyPaginateInteger10
taxonomySortingMethodString-分類排序方式,默認以字母排序。可選值:popularity.
taxonomyPostCountInteger3分類的列表文章數,false 則隱藏。
countTaxonomyPostsBooleanfalse是否顯示分類的文章總數。
sidebarTaxonomiesArray["series", "categories", "tags"]側邊欄的分類。
fullWidthBooleanfalse是否全寬
fullWidthInSectionsObject-爲特定的 section 定義全寬,如:posts, docs
fixedHeaderBooleantrue是否固定頭部
rewardObject-打賞小部件,又稱 Buy Me a Coffee 小部件。
shareObject-分享按鈕
share.addThisString-AddThis pubid
fontSizeObject字體大小註釋或刪除此參數可以禁用字體大小切換器。
fontSize.smallString.9rem小字體
fontSize.extraSmallString.8rem更小的字體
fontSize.largeString1.1rem大字體
fontSize.extraLargeString1.2rem更大的字體
socialShareBooleantrue啟用/禁用內置的分享按鈕
searchBarBooleantrue啟用/禁用搜索欄
Archive
archiveObject-歸檔
searchObject-搜索
docsearchObject-DocSearch
docsearch.containerString.search-bar
docsearch.appIdString-
docsearch.indexNameString-
docsearch.apiKeyString-
docsearch.debugBooleanfalse
docsearch.*Boolean/String/Number-https://docsearch.algolia.com/docs/api/
頂部應用欄
topAppBarObject-
topAppBar.socialObject-社交鏈接
topAppBar.colorToggleBooleantrue開啟或禁用顏色/模式開關。
topAppBar.coloredInDarkBooleanfalse在深色模式下著色。
topAppBar.dropdownMenuToggleBooleantrue隱藏下拉菜單的按鈕。
Webmaster Site Verification
siteVerificationObject-
siteVerification.googleString-Google
siteVerification.bingString-Bing
siteVerification.baiduString-百度
siteVerification.baiduUnionString-百度聯盟
siteVerification.soString-360
siteVerification.sogouString-搜狗
siteVerification.shenmaString-神馬
Analytics
analyticsObject-Analytics.
analytics.baiduString-百度統計
analytics.plausibleString-Plausible Analytics Domains. Multiple domains separate by comma.
analytics.plausibleScriptStringhttps://plausible.io/js/script.jsSpecify the self-hosted Plausible Analytics script or extended script.
Others
googleAdsenseString-Google Adsense。
customCSSArray-自定義 CSS, 主要用於導入外部。 請查閱自定義資源
customJSArray-自定義 JS, 主要用於導入外部 JS。 請查閱自定義資源
utterancesObject-Utterances 配置。
giscusObject-Giscus 配置。
Creative Commons License
creativeCommonsObject-
creativeCommons.byBooleantrue署名
creativeCommons.ncBooleantrue非商業
creativeCommons.ndBooleantrue禁止演繹
creativeCommons.saBooleantrue相同方式共享
Code Block
codeBlockObject-
codeBlock.maxLinesInteger7
codeBlock.lineNosBooleantruetrue/false 表示默認情況下顯示/隱藏行號。
Post
postObject-
post.excerptStringSummary可選項:description
post.excerptMaxLengthInteger320
post.copyrightBooleantrue是否在每個帖子上顯示版權部分
post.plainifyExcerptBooleantruefalse 則格式化摘要為 HTML。
post.featuredImageBooleanfalse於內容上方顯示 Featured 圖片。
post.numberifyHeadingsBooleanfalse是否自動對標題進行編號。
post.numberifyHeadingsEndLevelNumber6自動編號的深度。
post.numberifyHeadingsSeparatorString-編號和標題之間的分隔符。
post.tocStyleTypeStringnone目錄的 list-style-type CSS 屬性。
post.imageTitleAsCaptionBooleanfalse将图片标题作为 caption。
post.panelBooleantrue是否顯示 post panel。
post.navBooleantrue是否顯示上一篇和下一篇。
post.readMoreFromContentBooleanfalseThe page position after clicking the read more button, read more from content if true. Default to the beginning of page. It supports only of the manual summaries splitting via <!--more-->.
viewerBooleantrue圖片查看器
pwaObject-漸進式 web 應用
Sidebar
sidebarObject-
sidebar.fixedBooleanfalse固定默認側邊欄。
sidebar.taxonomiesToggleBooleantrueShow the taxonomies toggle widget on the sidebar.
sidebar.seriesBooleanfalseShow the series widget on the sidebar.
sidebar.categoriesBooleanfalseShow the categories widget on the sidebar.
sidebar.tagsBooleanfalseShow the tags widget on the sidebar.
sidebar.archivesBooleanfalseShow the archive widget on the sidebar.
sidebar.authorsBooleanfalseShow the authors widget on the sidebar.
sidebar.postsToggleBooleantrueShow the posts toggle on the sidebar.
sidebar.featuredPostsBooleanfalseShow the featured posts widget on the sidebar.
sidebar.recentPostsBooleanfalseShow the recent posts widget on the sidebar.
sidebar.collapsedBooleanflaseCollapse sidebar widgets by default on small screens.
Meta Tag
metaRobotsString-空字符串表示禁用。
contactObject-聯系表單
pinnedPostBooleantrue開啟/禁用文章置頂。
pinnedPostCountInteger1置頂的文章數量。
rssString/Booleantrue在社交鏈接中顯示 RSS 鏈接。false 為不顯示,home 則總是鏈接到主頁。
feedsObject-RSS feeds
feeds.contentBooleanfalseDisplay the full content if ebabled.
actionsPanelObject-
actionsPanel.disabledBooleanfalse禁用 actions panel。
repoObject-See Repository widget.

除了 Google 站長工具外,其他搜索引擎站長工具無法與 hugo --minify 同時使用,這是因為它們無法識別優化後的元標簽。