我正在写一些Jekyll,这是我的标签:
---
layout: post
title: Running off the path into programming ... a gag-inducing excerpt from one of my B-school essays.
date: '2015-01-10T13:41:00+01:00'
tags:
- random
tumblr_url: http://www.iamthemangosteen.com/post/107708808069/running-off-the-path-into-programmingan-excerpt
excerpt: <p> ...But I was tired that day. I was tired of losing, tired of following my captain's juvenile policy of punishment runs, and tired of myself for lacking the curiosity to explore my beautiful campus and the surrounding forests. And so I ran off the path and after several miles of Berkshire forest, I entered the clearing of my college’s best kept secret our very own wildlife and bird sanctuary. I spent the rest of my afternoon discovering...</p>
---
我想在标题和摘录引号周围加上引号,除了“”似乎在网站中根本不呈现并且似乎抛出错误。我该怎么做来代表html文件的YAML部分中的引号? 如何在摘录中显示引号?
答案 0 :(得分:2)
有几件事:
'
或双引号"
,但不能使用引号“”
。如果你的字符串中没有逗号,你也应该没有引号。excerpt_separator
中定义并使用_config.yml
,系统会自动为您生成post.excerpt
。 Jekyll Docs - Posts strip_html
和markdownify
过滤器调用它即可剥离链接/格式并将其包装在<p>
标记中。 Jekyll Docs - Templates {{ page.excerpt|strip_html|markdownify }}
编辑:我可能有误读,但是要在其中一个前面的内容中加上引号,你可以使用反斜杠来逃避它:
---
title: "This is a quote \" it is rendered."
---