HUGO
Menu
GitHub 87548 stars Mastodon

Hugo 配置角色

Hugo 配置角色。
New in v0.153.0

這是默認配置:

roles:
  guest:
    weight: 0
[roles]
  [roles.guest]
    weight = 0
{
   "roles": {
      "guest": {
         "weight": 0
      }
   }
}

要定義 “guest” 和 “member” 角色:

roles:
  guest:
    weight: 20
  member:
    weight: 10
[roles]
  [roles.guest]
    weight = 20
  [roles.member]
    weight = 10
{
   "roles": {
      "guest": {
         "weight": 20
      },
      "member": {
         "weight": 10
      }
   }
}

角色按其 權重 降序排序,然後按名稱降序排序。這會影響構建順序和補集選擇。


Last updated: January 1, 0001
Improve this page