Skip to content

Commit a433427

Browse files
committedFeb 10, 2019
Fix: headers and footers are not generated dynamically anymore
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.
1 parent bd88066 commit a433427

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
 
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
require "jekyll"
2+
3+
# The minimal-mistakes theme is using the "jekyll-include-cache" plugin since
4+
# version 4.14.0 (see https://github.com/mmistakes/minimal-mistakes/pull/1874).
5+
#
6+
# This change breaks some dynamically generated content, i.e. content
7+
# generated from _includes/head/custom.html and _includes/footer.html.
8+
#
9+
# This plugin monkey patches the "include_cached" tag of "jekyll-include-cache"
10+
# to disable the caching feature and make it work as Jekyll's "include" tag.
11+
12+
Liquid::Template.register_tag("include_cached", Jekyll::Tags::IncludeTag)

0 commit comments

Comments
 (0)
Please sign in to comment.