0.0
No commit activity in last 3 years
No release in over 3 years
Jekyll plugin, that allows you to output multiple format files with individual layouts for each page, post, or collection.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0
>= 0
>= 0
 Project Readme

Jekyll Layouts

Multiple layouts support for your Jekyll site, output multiple format files with individual layouts for each page, post, or collection.

Usage

Add the following to your site's Gemfile

gem 'jekyll-layouts'

And add the following to your site's _config.yml

gems:
  - jekyll-layouts

In any page, post, or collection, use layouts and a extension: layout value, e.g.

---
layouts:
  json: json-post-layout
  md: markdown-post-layout
---

Note: Jekyll Layouts creates additional pages using the provided extensions and layouts, it does not modify the original page.

Configuration

Add the following to your yaml front-matter configuration:

---
layouts:
  json:
    layout: json-post-layout
    converter: Default
  md:
    layout: markdown-post-layout
    converter: Default
  pdf:
    converter: PhantomPDF
---

If you are using the default liquid converter, you can use this shorthand:

---
layouts:
  json: json-post-layout
  md: markdown-post-layout
---

An example of using a markdown filter for all posts using jekyll-layouts:

gems:
  - jekyll-layouts

defaults:
  - scope:
      path: ""
      type: posts
    values:
      layouts:
        json: json-post-layout
        md: markdown-post-layout

_layouts/markdown-post-layout.md

# {{ page.title }}

Published: {{ page.date }}
Author: {{ page.author }}
Source: {{ page.layouts.md.url }}

---

{{ content | strip_html }}

_layouts/json-post-layout.json

{{ page | jsonify }}

Your posts will now have markdown and json format endpoints using separate layouts.