diff --git a/CHANGELOG.md b/CHANGELOG.md index bfdb4a600b92..50826973c88b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/_config.yml b/_config.yml index 502dfd3d69d0..08264e5e90c0 100644 --- a/_config.yml +++ b/_config.yml @@ -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 diff --git a/_includes/scripts.html b/_includes/scripts.html index 9e92f42fe5c7..8d2b30f4982b 100644 --- a/_includes/scripts.html +++ b/_includes/scripts.html @@ -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 %} diff --git a/_layouts/default.html b/_layouts/default.html index 5d66a7ee14ee..c699dc2148ab 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -16,8 +16,8 @@
- {% include browser-upgrade.html %} - {% include masthead.html %} + {% include_cached browser-upgrade.html %} + {% include_cached masthead.html %}