Skip to content

Commit

Permalink
Fix: headers and footers are not generated dynamically anymore
Browse files Browse the repository at this point in the history
The minimal-mistakes theme is using the "jekyll-include-cache" plugin since
version 4.14.0 (see mmistakes/minimal-mistakes#1874).

This change breaks some dynamically generated content, i.e. content
generated from _includes/head/custom.html and _includes/footer.html.

This commit adds a plugin that monkey patches the "include_cached" tag of
"jekyll-include-cache" to disable the caching feature and make it work as
Jekyll's "include" tag.
  • Loading branch information
olbat committed Feb 10, 2019
1 parent bd88066 commit 1000c73
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions _plugins/disable-include_cached-tag.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
require "jekyll"

# The minimal-mistakes theme is using the "jekyll-include-cache" plugin since
# version 4.14.0 (see https://github.com/mmistakes/minimal-mistakes/pull/1874).
#
# This change breaks some dynamically generated content notably, i.e. content
# generated from _includes/head/custom.html and _includes/footer.html.
#
# This plugin Monkey patches the "include_cached" tag of "jekyll-include-cache"
# to disable the caching feature and make it work as Jekyll's "include" tag.

Liquid::Template.register_tag("include_cached", Jekyll::Tags::IncludeTag)

0 comments on commit 1000c73

Please sign in to comment.