Penny
Penny

Reputation: 1280

How to render markdown file into a webpage in Jekyll?

I just installed Jekyll on my local and trying to get familiar with it.

I just cloned a whole folder structure from github with markdown files and yaml files inside, and the whole folder structure is inside my Jekyll folder. Did I do it right? How should I be able to convert the markdown files to html files by using Jekyll? How should I do it? Very confused now and stuck.

Upvotes: 3

Views: 3542

Answers (1)

Mr. Hugo
Mr. Hugo

Reputation: 12582

Create the '_layouts' directory in the root of your Jekyll installation. Create a 'default.html' file in this newly created directory. Add {{ content }} to the content of this new file. Change the markdown file (index.md) to:

---
layout: default
---
Hello world!

Go to localhost:4000 and when in doubt look at this: http://jekyllrb.com/docs/structure

PS. You might also need an (empty) '_config.yml' file in the root of your Jekyll installation, because this is where Jekyll gets its configuration from.

Upvotes: 1

Related Questions