Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/benbalter/jekyll-default-layout
Silently sets default layouts for Jekyll pages and posts
https://github.com/benbalter/jekyll-default-layout
github-pages jekyll jekyll-plugin
Last synced: 4 days ago
JSON representation
Silently sets default layouts for Jekyll pages and posts
- Host: GitHub
- URL: https://github.com/benbalter/jekyll-default-layout
- Owner: benbalter
- License: mit
- Created: 2016-10-05T16:32:34.000Z (about 8 years ago)
- Default Branch: main
- Last Pushed: 2023-11-24T19:46:11.000Z (12 months ago)
- Last Synced: 2024-05-09T12:57:58.100Z (6 months ago)
- Topics: github-pages, jekyll, jekyll-plugin
- Language: Ruby
- Size: 78.1 KB
- Stars: 55
- Watchers: 9
- Forks: 22
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: docs/CONTRIBUTING.md
- Funding: .github/funding.yml
- License: LICENSE
- Code of conduct: docs/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: docs/SECURITY.md
Awesome Lists containing this project
- awesome-jekyll-plugins - **Default Layout** - default-layout](https://rubygems.org/gems/jekyll-default-layout)) by Ben Balter -- silently sets default layouts for pages and posts (Settings & Configurations Tweaks)
README
# Jekyll Default Layout
*Silently sets default layouts for Jekyll pages and posts*
[![CI](https://github.com/benbalter/jekyll-default-layout/actions/workflows/ci.yml/badge.svg)](https://github.com/benbalter/jekyll-default-layout/actions/workflows/ci.yml)
## 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.