Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Jekyll 2.1 - What's new in Jekyll 2?

Jekyll 2.1 - What's new in Jekyll 2?

A presentation on Jekyll 2.1 features for DaytonRB @ littlelines HQ.

Jesse Herrick

July 20, 2014
Tweet

Other Decks in Programming

Transcript

  1. Fast Loading Times (lower is better) Homepage Post w/ 1

    Picture Post w/ no Picture Average of All 0ms 70ms 140ms 210ms 280ms Dynamic Site Jekyll (static)
  2. Collections? _config.yml # other config collections: chapters: output: true permalink:

    /chapter/:path/ . ├── _chapters │ ├── 1.md │ ├── 2.md │ └── 3.md ├── _config.yml ... other files http://myawesomebook.com/chapter/1 http://myawesomebook.com/chapter/2 http://myawesomebook.com/chapter/3
  3. But wait! There’s more. --- layout: default --- ! <ul>

    {% for chapter in site.chapters %} <li> <!-- assuming name in frontmatter --> <a href="{{ chapter.url }}">{{ chapter.name }}</a> </li> {% endfor %} </ul> chapters/index.html
  4. Custom Markdown! _plugins/cool_md.rb require 'jekyll' require 'cool_md_processor' ! class Jekyll::Converters::Markdown::CoolMD

    def initialize(config) @site_config = config end ! def convert(content) CoolMD.new(@site_config).to_html(content) # => *MUST* return the rendered HTML as a string end end
  5. Let’s recap. • Jekyll rocks. • It’s better than your

    CMS. • It’s fast. • It’s super hackable. (yes, the good kind) • It has great docs.