M CHANGELOG.md => CHANGELOG.md +1 -0
@@ 2,6 2,7 @@
### Enhancements
+- Cache "static" includes to improve build performance. [#1874](https://github.com/mmistakes/minimal-mistakes/pull/1874)
- Make entire feature and archive items "clickable". [#1864](https://github.com/mmistakes/minimal-mistakes/pull/1864)
- Allow custom Staticman endpoints. [#1842](https://github.com/mmistakes/minimal-mistakes/issues/1842)
- Remove `type="text/css"` from Algolia script includes. [#1836](https://github.com/mmistakes/minimal-mistakes/pull/1836)
M _config.yml => _config.yml +2 -0
@@ 226,6 226,7 @@ plugins:
- jekyll-gist
- jekyll-feed
- jemoji
+ - jekyll-include-cache
# mimic GitHub Pages with --safe
whitelist:
@@ 234,6 235,7 @@ whitelist:
- jekyll-gist
- jekyll-feed
- jemoji
+ - jekyll-include-cache
# Archives
M _includes/scripts.html => _includes/scripts.html +5 -5
@@ 16,13 16,13 @@
{%- assign search_provider = site.search_provider | default: "lunr" -%}
{%- case search_provider -%}
{%- when "lunr" -%}
- {% include search/lunr-search-scripts.html %}
+ {% include_cached search/lunr-search-scripts.html %}
{%- when "google" -%}
- {% include search/google-search-scripts.html %}
+ {% include_cached search/google-search-scripts.html %}
{%- when "algolia" -%}
- {% include search/algolia-search-scripts.html %}
+ {% include_cached search/algolia-search-scripts.html %}
{%- endcase -%}
{% endif %}
-{% include analytics.html %}
-{% include /comments-providers/scripts.html %}
+{% include_cached analytics.html %}
+{% include_cached /comments-providers/scripts.html %}
M _layouts/default.html => _layouts/default.html +5 -5
@@ 16,8 16,8 @@
<body class="layout--{{ page.layout | default: layout.layout }}{% if page.classes or layout.classes %}{{ page.classes | default: layout.classes | join: ' ' | prepend: ' ' }}{% endif %}">
- {% include browser-upgrade.html %}
- {% include masthead.html %}
+ {% include_cached browser-upgrade.html %}
+ {% include_cached masthead.html %}
<div class="initial-content">
{{ content }}
@@ 25,18 25,18 @@
{% if site.search == true %}
<div class="search-content">
- {% include search/search_form.html %}
+ {% include_cached search/search_form.html %}
</div>
{% endif %}
<div class="page__footer">
<footer>
{% include footer/custom.html %}
- {% include footer.html %}
+ {% include_cached footer.html %}
</footer>
</div>
- {% include scripts.html %}
+ {% include_cached scripts.html %}
</body>
</html>=
\ No newline at end of file
M minimal-mistakes-jekyll.gemspec => minimal-mistakes-jekyll.gemspec +1 -0
@@ 22,6 22,7 @@ Gem::Specification.new do |spec|
spec.add_runtime_dependency "jekyll-feed", "~> 0.10"
spec.add_runtime_dependency "jekyll-data", "~> 1.0"
spec.add_runtime_dependency "jemoji", "~> 0.10"
+ spec.add_runtime_dependency "jekyll-include-cache", "~> 0.1"
spec.add_development_dependency "bundler", "~> 1.15"
spec.add_development_dependency "rake", "~> 10.0"