Can I use a Markdown file in a GitHub page?

笑着哭i 提交于 2020-01-12 07:09:59

问题


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?


回答1:


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.)



来源:https://stackoverflow.com/questions/15124547/can-i-use-a-markdown-file-in-a-github-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!