[Bug]: Empty include parameter when assign a forloop attribute to it.
srcid opened this issue · 0 comments
srcid commented
Operating System
Ubuntu 22.04
Ruby Version
ruby 3.2.3 (2024-01-18 revision 52bb2ac0a6) [x86_64-linux]
Jekyll Version
jekyll 4.3.3
GitHub Pages Version
No response
Expected Behavior
I expect that assigned parameter to be not empty as the value passed can't be empty.
Current Behavior
Include parameter is empty when assigned a value from forloop attribute.
Relevant log output
No error on the build time.
Code Sample
If a pass the forloop it works, but if I pass a attribute of it, it doesn't work.
include code
<div>
<h1>{{ index }}</h1>
<h2>{{ forloop.index | append: ". " | append: paper.title }}</h2>
<time class="text-slate-600" datetime="{{ page.date }}">
{{ paper.date | date: "%d/%m/%Y" }}
</time>
<p>{{ paper.content | markdownify }}</p>
<a class="not-prose btn btn-link float-right" href="{{paper.link}}" target="_blank" rel="noopener noreferrer">acessar</a>
</div>
where I'm calling it
---
layout: papers
title: "Publicações"
permalink: "/papers"
---
{% assign sorted_papers = site.papers | sort: 'date' | reverse %}
{%- for paper in sorted_papers -%}
{% include paper_item.html index=forloop.index forloop=forloop paper=paper %}
{%- endfor -%}