Skip to content
Silently sets default layouts for Jekyll pages and posts
Ruby Shell
Branch: master
Clone or download
Latest commit 9916ede May 28, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Create .github/funding.yml May 28, 2019
docs Create docs/SECURITY.md May 28, 2019
lib Fix rubocop offenses Jan 6, 2018
script add tests Oct 7, 2016
spec
.gitignore git ignore lockfile Oct 7, 2016
.rspec initial commit Oct 5, 2016
.rubocop.yml exclude spec from blocklength check Dec 8, 2016
.travis.yml CI: test against Ruby 2.4 Jan 5, 2018
Gemfile Fix rubocop offenses Jan 6, 2018
LICENSE Update copyright notice Jan 5, 2018
README.md update documentation for Jekyll 3.5.0+ Jun 8, 2018
jekyll-default-layout.gemspec Appease Rubocop 0.51 Jan 5, 2018

README.md

Jekyll Default Layout

Silently sets default layouts for Jekyll pages and posts

Build Status

Usage

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

    gem 'jekyll-default-layout'
  2. And the following to your site's _config.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.

You can’t perform that action at this time.