Skip to content

Instantly share code, notes, and snippets.

View alexjago's full-sized avatar

Alex Jago alexjago

View GitHub Profile
@hugmanrique
hugmanrique / jekyll-transclude.rb
Last active January 31, 2025 07:22
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: