markdown - 使用 jekyll 的“包含”和备注
问题描述
我很高兴使用 jekyll 的评论。Jekyll 让我使用模板文件,因为它在wiki中有所描述。
我还想include
在我的幻灯片中使用 jekyll 的命令,例如{% include something.html %}
. 但不知何故,我无法让它工作:当我构建我的幻灯片时,命令被逐字{% include something.html %}
解析到我的幻灯片中(见下面的截图)。
我的default-presentation.md
文件内容如下,其中 as_includes/test.html
仅包含<p>test</p>
. 我还在这里创建了一个包含所有文件的最小存储库。
完全披露:我也通过github issue问了这个问题
---
layout: presentation
title: Default Presentation
permalink: /default-presentation/
---
# My Awesome Presentation
{% include test.html %}
解决方案
在您的_layouts/presentation.html
文件中,您正在调用{{ page.content }}
. 其中page.
一部分是按原样调用该页面的内容。如果你想让 Jekyll 解析内容,你应该使用{{ content }}
.
推荐阅读
- r - R:将 as.list 应用于数据框将数字转换为字符
- android - Room delete multiple rows by WHERE IN clause not working
- javascript - Howlerjs 在使用 once() 时播放音频两次
- html - CSS 中指定的字体在 Chrome 中有效,但在 Safari 中无效 - 为什么?
- javascript - 使用 Fetch(不是 NPM)删除 Stripe 订阅项目
- javascript - 使用 Jest 配置酶到 json
- c# - Xamarin 应用程序在具有动态参数返回的函数处崩溃
- java - spring-boot-configuration-processor 依赖仅用于 IDE 支持吗?
- aspnetboilerplate - PublishAsync 发布多个通知
- javascript - 如何在不改变纸张大小的情况下打印 div 的内容