我可以在GitHub页面上使用Markdown文件吗? [英] Can I use a Markdown file in a GitHub page?
问题描述
由于 GitHub Wiki不支持目录,我想将md文件放入GitHub页面.但是,当我打开它们时,我发现它们根本没有被解释. GitHub只是给我原始文件.参见 http://greenlaw110.github.com/Rythm/en/index.md一个>.有什么主意吗?
Since the GitHub wiki does not support directories, I want to put my md files into GitHub pages. However when I open them I found they are not interpreted at all. GitHub just gives me the raw file. See http://greenlaw110.github.com/Rythm/en/index.md. Any idea?
推荐答案
文档对此不是特别清楚,但是考虑到Markdown渲染是由Jekyll ,我相信您需要他们所说的"YAML前题" 来编译页面.因此,请尝试将其放在文件顶部:
The documentation isn't particularly clear on this, but given that the Markdown rendering is done by Jekyll, I believe you need what they call "YAML front matter" for it to compile the page. So try putting this at the top of your file:
---
title: Document Center
---
这足以触发杰基尔. (然后,您可以变得漂亮并开始使用布局等)
That should be enough to trigger Jekyll. (And then you can get fancy and start using layouts, etc.)
这篇关于我可以在GitHub页面上使用Markdown文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!