Skip to content

Instantly share code, notes, and snippets.

View cmegown's full-sized avatar

Corey Megown cmegown

  • Olympia, WA
View GitHub Profile
@hugmanrique
hugmanrique / jekyll-transclude.rb
Last active October 7, 2024 17:41
Jekyll Liquid block that allows includes with content
# frozen_string_literal: true
# Based on https://github.com/jekyll/jekyll/blob/master/lib/jekyll/tags/include.rb,
# provides a transclude block that maintains Jekyll include semantics. Files can
# pass parameters to transcludes via the `include` object, with the addition of
# {{ include.content }} which includes the block content.
#
# Transcludes must be located in Jekyll's _includes dir.
#
# Example: