A gem that adds slim-lang support to Jekyll. Works for for pages, includes and layouts.
This fork is trying to fix jekyll-slim for the current version.
Add this line to your Gemfile:
gem 'jekyll-slim', github: 'vaz/jekyll-slim'
gem 'sliq', github: 'vaz/sliq'
And then execute:
$ bundle
In your Jekyll project's _plugins
directory:
# _plugins/jekyll-slim.rb
require 'jekyll-slim'
This is currently working with jekyll-2.5.2, slim-2.1.0, and my own fork of sliq.
The gem will convert all the .slim
files in your project's directory into HTML. That includes files in sub-directories, includes and layouts. Example:
# _layouts/default.slim
html
head
body
.content-wrapper {{ content }}
# index.slim
---
layout: default
---
section.content Content goes here.
% include footer.slim
It is possible to set options available for Slim engine through the slim
key in _config.yml
. Example:
# _config.yml
slim:
pretty: true
This fork removes the SlimContext
addition which made the site's
configuration available in ruby expressions in the slim code. It didn't seem
necessary and complicated things.
The original authors are looking for maintainers for the gem.
Jekyll-slim was heavily inspired by jekyll-haml. It is free software, and may be redistributed under the terms specified in the LICENSE file.
This fork borrows the preconverter hack from the northdocks fork