You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Followed the documentation to show related posts below, but the variable {{ site.related_posts }} (as well as {{ page.related_posts }}, {{ related_posts }} is always empty (Output of all {{ site.related_posts | inspect }} is nil).
Bridgetown Version:
bridgetown 0.15.0.beta3 "Overlook"
To Reproduce
having couple of posts
<!-- _layouts/post.html -->
---
layout: default
---
<strong>Related posts</strong><ul>
{% for post in site.related_posts %}
<li><ahref='{{post.url}}'>{{post.title}}</a><small>{{post.date}} – {{post.tags}}</small></li>
{% endfor %}
</ul>
Your fix/workaround is exactly what was needed! Also, the documentation was incorrect…it is supposed to be page.related_posts, not site.related_posts. Both are now included in 0.15.0.beta4 release.
Followed the documentation to show related posts below, but the variable
{{ site.related_posts }}
(as well as{{ page.related_posts }}
,{{ related_posts }}
is always empty (Output of all{{ site.related_posts | inspect }}
is nil).Bridgetown Version:
bridgetown 0.15.0.beta3 "Overlook"
To Reproduce
Fix/Workaround
Add
, :related_posts
tobridgetown/bridgetown-core/lib/bridgetown-core/drops/document_drop.rb
Line 15 in 5aca30f
Then, the variable
{{ page.related_posts }}
works (But not the site.related_posts according to the documentation).The text was updated successfully, but these errors were encountered: