How to configure jekyll for a single page markdown site?

2645 views
Skip to first unread message

Andrew

unread,
Oct 10, 2011, 12:53:24 PM10/10/11
to jeky...@googlegroups.com
I'm trying to configure jekyll so that I can generate a single page website written in markdown with code samples. I could probably use maruku directly, but since I also want pygments to generate the code samples I think configuring jekyll will be easier. I tried creating a index.markdown file and running jekyll, but all it did was copy the file into an _site directory. It did not create an index.html file. How do I configure jekyll for this use case?

Thanks,
Andrew

dueyfinster

unread,
Oct 25, 2011, 9:40:36 AM10/25/11
to jeky...@googlegroups.com
Does your markdown file have the proper extension? Mine use .md :


Also see your config is set up correctly with markdown engine:


If you use github pages this automatically okay.

Kwpolska

unread,
Oct 30, 2011, 3:27:35 PM10/30/11
to jeky...@googlegroups.com
> --
> You received this message because you are subscribed to the Google Groups
> "jekyll.rb" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/jekyll-rb/-/wegZpxrx6mkJ.
> To post to this group, send email to jeky...@googlegroups.com.
> To unsubscribe from this group, send email to
> jekyll-rb+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/jekyll-rb?hl=en.
>

You need to put this at the beginning of your file (including the -'s,
but ignoring the ~'s):

~~~
---
title: your_site_title
layout: default
---
~~~
You also need to create a _layouts directory and add a file called
default.yml. The minimal contents for this file are:
~~~
{{ page.content }}
~~~
It would be nice to stick some additional HTML (title, ...) around, though.

--
Kwpolska <http://kwpolska.tk>
stop html mail      | always bottom-post
www.asciiribbon.org | www.netmeister.org/news/learn2quote.html
GPG KEY: 5EAAEA16   | Arch Linux x86_64, zsh, mutt, vim.
# vim:set textwidth=70:

Andrew

unread,
Oct 31, 2011, 11:09:15 AM10/31/11
to jeky...@googlegroups.com
Kwpolska, thank you!

The solution was to add the "YAML Front Matter" to the top of the index.markdown file (or index.md).

Reply all
Reply to author
Forward
0 new messages