我在博客文章中使用了自定义摘录,但是如果摘录的长度太长,我会得到一个空的输出。
如果我在节选中减少一些话,那就行了。 您有任何解决方法的想法吗?
谢谢
我的帖子配置:
---
title: Test a Perceptual Phenomenon
layout: notebook
excerpt: In a Stroop task, participants are presented with a list of words, with each word displayed in a color of ink. The participant’s task is to say out loud the color of the ink in which the word is printed.
---
我的博客页面:
---
layout: default
title: Blog
---
<h1>Latest Posts</h1>
<ul>
{% for post in site.posts %}
<li>
<h2><a href="{{ post.url }}">{{ post.title }}</a></h2>
<p>{{ post.excerpt }}</p>
<p>{{ post.post_description }}</p>
</li>
{% endfor %}
</ul>
答案 0 :(得分:1)
好的。我设法使用this file重现了您的问题。
这是因为前面的post_description
用了一个冒号。
例如:post_description: In a Stroop task, ... The task has two conditions: a congruent ...
要解决此问题,可以使用引号或双引号。
post_description: 'Your text with escaped \'quotes\' and "double quotes" : success'
post_description: "Your text with 'quotes' and \"escaped double quotes\" : success'
或者您可以使用多行字符串
post_description : >
A long text with special characters : success !
Another line.