Can I use a Markdown file in a GitHub page?

后端 未结 2 538
感情败类
感情败类 2021-02-13 18:57

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 gi

2条回答
  •  青春惊慌失措
    2021-02-13 19:36

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

提交回复
热议问题