站点参数文件默认为 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可选配色,如需禁用此选项,可将其设为空值 []
carouselPostCountInteger5首页幻灯片的文章数量。
featuredPostCountInteger/Boolean5精选文章数,false 则隐藏。
recentPostCountInteger/Boolean5最近文章数,false 则隐藏。
relatedPostCountInteger/Boolean5相关文章数,false 则隐藏。
categoryCountInteger/Boolean10分类数,false 则隐藏。
tagCountInteger/Boolean10标签数,false 则隐藏。
seriesCountInteger/Boolean10专栏数,false 则隐藏。
taxonomyPaginateInteger10
taxonomyPostCountInteger3分类的列表文章数,false 则隐藏。
taxonomySortingMethodString-分类排序方式,默认以字母排序。可选值:popularity
countTaxonomyPostsBooleanfalse显示分类的文章总数。
sidebarTaxonomiesArray["series", "categories", "tags"]侧边栏的分类。
fullWidthBooleanfalse是否全宽
fullWidthInSectionsObject-为特定的 section 定义全宽,如:posts, docs
fixedHeaderBooleantrue是否固定头部
rewardObject-打赏小部件,又称 Buy Me a Coffee 小部件。
externalLinkIconBooleantrue是否显示外部链接后的图标。
shareObject-分享按钮
share.addThisString-AddThis pubid
fontSizeObject字体大小注释或删除此参数可以禁用字体大小切换器。
fontSize.smallString.9rem小字体
fontSize.extraSmallString.8rem更小的字体
fontSize.largeString1.1rem大字体
fontSize.extraLargeString1.2rem更大的字体
socialObject-社交链接
socialShareBooleantrue启用/禁用内置的分享按钮
searchBarBooleantrue启用/禁用搜索栏
Archive
archiveObject-归档
searchObject-搜索
docsearchObject-DocSearch
docsearch.containerString.search-button
docsearch.appIdString-
docsearch.indexNameString-
docsearch.apiKeyString-
docsearch.debugBooleanfalse
docsearch.*Boolean/String/Number-https://docsearch.algolia.com/docs/api/
algoliaObject-See Algolia
顶部应用栏
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.excerptStringDescription若 Description 不为空则作为摘要,若需要使用 Summaries 作为摘要,你需要显式地将其设为空字符串
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.taxonomiesToggleArchivesBooleantrueShow/Hide the archives from the taxonomies toggle.
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 同时使用,这是因为它们无法识别优化后的元标签。