Jekyll Contentblocks

screenshot of Jekyll Contentblocks

Jekyll Contentblocks

A Jekyll plugin giving you something like Rails' content_for

Overview:

The jekyll-contentblocks is a plugin for Jekyll that allows users to pass content from pages into their parent layouts. It provides a mechanism similar to Rails' content_for feature. This plugin supports Jekyll 2.3.0 and above.

Features:

  • Content Blocks: Enables passing content from pages into parent layouts.
  • Support for Jekyll 2.3.0 and above: Compatible with Jekyll versions 2.3.0 and above.
  • No Conversion Option: Allows users to skip content conversion for specific blocks, useful for code snippets.

Installation:

To install jekyll-contentblocks, follow these steps:

  1. Add the following line to your Jekyll project's Gemfile: <code>gem 'jekyll-contentblocks'</code>
  2. Execute the command <code>bundle install</code> to install the gem.
  3. If you don't use bundler, you can directly execute <code>gem install jekyll-contentblocks</code>
  4. Initialize the plugin in a plugin file.

Summary:

The jekyll-contentblocks plugin provides Jekyll users with the ability to pass content from pages into their parent layouts. It is compatible with Jekyll versions 2.3.0 and above and allows users to skip content conversion for specific blocks. This plugin is easy to install and use, making it a valuable tool for developers working with Jekyll.