Update 1:
The issue remains unresolved, but I think Jekyll is rendering another page which has identical conetent as the publications page. The other page is press releases. It’s odd that it appears to me Jekyll is not rendering publications entirely but it has elements such as tags which only exist in the press releases page.
I’m encountering an issue with regard to the retrieval of front matter values in collection items.
I created a collection called publications
. I wish to use it to store information about some PDFs I created. The configuration of publications
is straightforward as below
collections:
publications:
The file structure is as follows:
_publications
item1.md
item2.md
Inside item1, item2, … itemN, I have the following front matter data:
---
title: "Report 1"
name: "Report1.pdf"
---
I created a page to list the data from these items:
---
layout: page
---
{% for item in site.publications %}
<a href="/{{ item.name }}">
<h1>{{ item.title }}</h1>
</a>
{% endfor %}
With this setting, I have no trouble getting the file titles. However, the links are WRONG. For instance, clicking on Report 1 should open /Report1.pdf
; instead, I was directed to /publications/item1.html
.
Could someone from the community help me to diagnose what is the cause of this error and how do I fix it?