Jekyll won't parse Markdown

2019-09-01 06:50发布

问题:

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

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?

回答1:

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