File: README.md

package info (click to toggle)
ruby-jekyll-default-layout 0.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 224 kB
  • sloc: ruby: 253; sh: 6; makefile: 2
file content (36 lines) | stat: -rw-r--r-- 1,086 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Jekyll Default Layout

*Silently sets default layouts for Jekyll pages and posts*

[![Build Status](https://travis-ci.org/benbalter/jekyll-default-layout.svg?branch=master)](https://travis-ci.org/benbalter/jekyll-default-layout)

## Usage

1. Add the following to your site's Gemfile:

    ```ruby
    gem 'jekyll-default-layout'
    ```

2. And the following to your site's `_config.yml`:

    ```yml
    plugins:
      - jekyll-default-layout
    ```

Note: If you are using a Jekyll version less than 3.5.0, use the `gems` key instead of `plugins`.

## What it does

If no layout is specified for a Markdown post or page, the plugin automatically sets the "home", "post", "page", or "default" layout if it exists.

What layout is used:

* `/index.md` - the home layout, the page layout, or the default layout, if they exist, in that order
* A page - the page layout or the default layout, if they exist, in that order
* A post - the post layout or the default layout, if they exist, in that order

## Disabling

For a specific post or page, add `layout: null` to the front matter.