相關文章

贊助

成為我們的資助者或贊助商,以支持我們的工作。

本頁內容

贊助商

該模塊於博文內容下方顯示相關文章。

Modulegithub.com/hbstack/blog/modules/related-posts
Repository⭐ Please consider giving a star if your like it.
Stars
Version
Used by
Requirements
License
UsageSee how to use modules.

站點配置

你也許需要調整默認的 related 配置以滿足你的需求。

hugo.toml

 1[related]
 2  includeNewer = true
 3  threshold = 60
 4  toLower = false
 5  [[related.indices]]
 6    name = 'keywords'
 7    weight = 100
 8  [[related.indices]]
 9    name = 'tags'
10    weight = 80
11  [[related.indices]]
12    name = 'categories'
13    weight = 60
14  [[related.indices]]
15    name = 'series'
16    weight = 60
17  [[related.indices]]
18    name = 'authors'
19    weight = 10
20  [[related.indices]]
21    name = 'date'
22    weight = 10

hugo.yaml

 1related:
 2  includeNewer: true
 3  indices:
 4  - name: keywords
 5    weight: 100
 6  - name: tags
 7    weight: 80
 8  - name: categories
 9    weight: 60
10  - name: series
11    weight: 60
12  - name: authors
13    weight: 10
14  - name: date
15    weight: 10
16  threshold: 60
17  toLower: false

hugo.json

 1{
 2   "related": {
 3      "includeNewer": true,
 4      "indices": [
 5         {
 6            "name": "keywords",
 7            "weight": 100
 8         },
 9         {
10            "name": "tags",
11            "weight": 80
12         },
13         {
14            "name": "categories",
15            "weight": 60
16         },
17         {
18            "name": "series",
19            "weight": 60
20         },
21         {
22            "name": "authors",
23            "weight": 10
24         },
25         {
26            "name": "date",
27            "weight": 10
28         }
29      ],
30      "threshold": 60,
31      "toLower": false
32   }
33}
razonyang
2024年12月9日 星期一 2023年3月31日 星期五