Jekyll不会解析Markdown [英] Jekyll won't parse Markdown

查看:82
本文介绍了Jekyll不会解析Markdown的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 8.1上运行Jekyll,但无法让Jekyll解析我网站上的任何Markdown;它只是作为纯文本粘贴在页面上.但是,使用jekyll new blog创建一个新站点并使用jekyll serve运行它可以正常工作,包括Markdown解析,所以这不是我的设置.我已将网站缩减为几乎没有内容:

I'm running Jekyll on Windows 8.1 and can't get Jekyll to parse any Markdown on my site; it just gets pasted as plaintext on the page. However, making a new site with jekyll new blog and running it with jekyll serve works just fine, including Markdown parsing, so it's not my setup. I've cut my site down to almost nothing:

/_layouts/default.html:

<html>
    <body>
        {{ content }}
    </body>
</html>

/index.html:

---
layout: default
---

{% for post in site.posts %}
    {{post.content}}
{% endfor %}

_config.yml:

name: sample blog

结果是未解析的Markdown输出.有趣的是,标记为{% highlight c%} {% endhighlight %}的代码块被包装在<pre>标记中,仅此而已.我已经将头撞在墙上好几个小时了,还没有找到解决方法,我在做什么错了?

The result is un-parsed Markdown output. Interestingly, code blocks marked with {% highlight c%} {% endhighlight %} are wrapped in <pre> tags, but that's it. I've been banging my head against the wall for hours and haven't found a fix, what am I doing wrong?

推荐答案

修复了该问题.我的帖子是.markup而不是.markdown文件.四个小时后,我无法用言语描述我的感觉.

Fixed it. My posts were .markup instead of .markdown files. Words cannot describe how dumb I feel after taking four hours to notice that.

这篇关于Jekyll不会解析Markdown的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆