hi
premium theme typhoon comes with related pages plugin and in twig it is already set but i have for example under /home (blog) many centos post types but on post page “Other Related Posts” is not shown
post.html.twig
{% if config.plugins.relatedpages.enabled and related_pages|length > 0 %}
<h4 class="text-xl font-bold mt-4">Other Related Posts:</h4>
<div class="flex flex-wrap -mx-4">
{% for related_path, score in related_pages|slice(0,2) %}
{% set related = grav['pages'].get(related_path) %}
{% if related %}
{% include "partials/post-item.html.twig" with {page: related} %}
{% endif %}
{% endfor %}
</div>
{% endif %}
relatedpages.yaml
enabled: true
limit: 5
show_score: true
score_threshold: 20
filter:
items:
'@page':
- /blog
- /home
excluded_types:
- quote
- video
order:
by: date
dir: desc
page_in_filter: true
explicit_pages:
process: true
score: 100
taxonomy_match:
taxonomy:
- tag
taxonomy_taxonomy:
process: true
score_scale:
1: '50'
2: '75'
3: '100'
taxonomy_content:
process: true
score_scale:
1: '20'
2: '30'
3: '45'
4: '60'
5: '70'
6: '80'
7: '90'
8: '100'
content_match:
process: false