I'm building Jekyll project. I'd like to use nested frontmatter but cannot figure out why.
---
# Homepage
layout: default
title: Homepage
# links
link1:
- title: External Link
url: https://www.example.com
---
and then in my layout:
<a href="{{ page.link1.url }}>{{ page.link1.title }}
This doesn't produce a thing - empty link. How to do it correctly?
@Malvinka. In your example, link1 is an Array rather than an object, because of the leading dash "-". See this example with the two ways: