HUGO
Menu
GitHub 87548 stars Mastodon

Hugo 配置站點地圖

Hugo 配置站點地圖。

這些是默認的站點地圖配置值。它們適用於所有頁面,除非在 front matter 中被覆蓋。

sitemap:
  changeFreq: ''
  disable: false
  filename: sitemap.xml
  priority: -1
[sitemap]
  changeFreq = ''
  disable = false
  filename = 'sitemap.xml'
  priority = -1
{
   "sitemap": {
      "changeFreq": "",
      "disable": false,
      "filename": "sitemap.xml",
      "priority": -1
   }
}
changefreq
(string) 頁面可能更改的頻率。有效值是 alwayshourlydailyweeklymonthlyyearlynever。使用默認值 "" 時,Hugo 將從站點地圖中省略此字段。請參閱 詳情
disable
(bool) 是否禁用頁面包含。默認值是 false。在 front matter 中設置為 true 以排除頁面。
filename
(string) 生成文件的名稱。默認值是 sitemap.xml
priority
(float) 頁面相對於站點上任何其他頁面的優先級。有效值范圍從 0.0 到 1.0。使用默認值 -1 時,Hugo 將從站點地圖中省略此字段。請參閱 詳情

Last updated: January 1, 0001
Improve this page