Use docs.json to generate default config for related content

This commit is contained in:
Joe Mooring 2023-08-07 08:11:05 -07:00 committed by Bjørn Erik Pedersen
parent 74d5082c72
commit 57dca93df7

View File

@ -113,19 +113,7 @@ Hugo provides a sensible default configuration of Related Content, but you can f
Without any `related` configuration set on the project, Hugo's Related Content methods will use the following. Without any `related` configuration set on the project, Hugo's Related Content methods will use the following.
{{< code-toggle file="hugo" >}} {{< code-toggle config="related" />}}
related:
threshold: 80
includeNewer: false
toLower: false
indices:
- name: keywords
weight: 100
- name: date
weight: 10
{{< /code-toggle >}}
Note that if you have configured `tags` as a taxonomy, `tags` will also be added to the default configuration above with the weight of `80`.
Custom configuration should be set using the same syntax. Custom configuration should be set using the same syntax.