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?
Asked
Active
Viewed 6,138 times
15
-
Although somewhat ghetto, you could create a simple blank HTML page that takes the current URL, disects it, and pulls the right markdown file using ajax, and then process the markdown client-side. – Anonymous Penguin Dec 31 '14 at 23:02
2 Answers
21
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.)

rodrigorgs
- 855
- 2
- 9
- 20

Eevee
- 47,412
- 11
- 95
- 127
-
1can confirm this works. You dont even strictly need a title, you can just add two lines of triple dashes and it will work – MoralCode Feb 09 '21 at 01:37
1
Another reason (found by experience) why you might get a raw index.md
file, is if you happen to also have a similarly-named index.html
file. This blocks GH Pages.
Deleting index.html
produces (on the site) a new index.html
with parsed markdown. The original index.md
is then no longer accessible.

Steven R. Loomis
- 4,228
- 28
- 39