我正在创建我的第一个 Jekyll(使用 4.0.0 版)驱动的站点。问题是无法识别 Front Matter 中的变量。
_includes 中的 HTML (writing-post-featured-image.html)
<figure>
<img class="feat-img" src="{{ site.baseurl }}/assets/images/{{ include.images }}" alt="{{ include.alt | default: 'lorem ipsum' }}" />
<figcaption>{{ include.caption }}</figcaption>
</figure>
在 _layout 中具有基于文本的帖子页面的布局 (writings-post.html)
{% include writing-post-featured-image.html image=post.featured-image alt=post.featured-image-alt %}
最后,在 .md 文件中(在 _posts 下)以下 Front Matter
layout: writings-post
title: my title
permalink: /writings/:title
featured-image: photo.jpg
featured-image-alt: about photo
caption: photo caption
输出为空
<figure>
<img class="feat-img" src="" alt="lorem ipsum" />
<figcaption></figcaption>
</figure>
请帮助理解为什么会这样。提前致谢。