1

I'm working on a portfolio using Eleventy,

I've created a pagination for the tags with the following code

    ---
pagination:
  data: collections
  size: 1
  alias: tag
  addAllPagesToCollections: true
layout: blog
permalink: /blog/tag/{{tag | slugify }}/index.html
eleventyComputed:
  title: "{{ tag }}"
---

<br>
<p style= "font-size:22px">Entradas con la etiqueta: <strong>{{ tag }}</strong></p><br>

{% for post in collections[tag] %}
  <li>
    <a href="{{post.url}}" style="color:blue">{{post.data.title}}</a>
  </li>
{% endfor %}

This is fine enough but I wanted to see if it's possible to make the listed items display other data from the front matter like the desc, date and preview image

1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. Commented Jul 24 at 23:52

1 Answer 1

1

Try using post.data.desc or post.data.date, etc. Add those to your paginated template and see what shows up.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks! Yes, I was able to get it to work with that, added this to support desc and image: <p style="font-size:16px">{{post.data.description}}</p> <img src="{{post.data.image}}" alt="{{post.data.title}}" style="width:100%; max-width:300px; height:auto;"></img>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.