Permalink
Browse files

Cache "static" includes to improve build performance (#1874)

* Add jekyll-include-cache plugin
* Cache "static" includes to improve build performance
* Update CHANGELOG and history

"Static" refers to those includes that don't rely on data passed from the page content.
  • Loading branch information...
mmistakes committed Oct 4, 2018
1 parent c801107 commit e704cd40d4c8629742f949ba012f2a64200fffc3
Showing with 20 additions and 11 deletions.
  1. +1 −0 CHANGELOG.md
  2. +2 −0 _config.yml
  3. +5 −5 _includes/scripts.html
  4. +5 −5 _layouts/default.html
  5. +2 −0 docs/_config.yml
  6. +2 −1 docs/_docs/18-history.md
  7. +1 −0 minimal-mistakes-jekyll.gemspec
  8. +2 −0 test/_config.yml
View
@@ -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)
View
@@ -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
View
@@ -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 %}
View
@@ -16,27 +16,27 @@
<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 }}
</div>
{% 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>
View
@@ -284,6 +284,7 @@ plugins:
- jekyll-gist
- jekyll-feed
- jemoji
- jekyll-include-cache
# mimic GitHub Pages with --safe
whitelist:
@@ -292,6 +293,7 @@ whitelist:
- jekyll-gist
- jekyll-feed
- jemoji
- jekyll-include-cache
# Archives
View
@@ -4,14 +4,15 @@ permalink: /docs/history/
excerpt: "Change log of enhancements and bug fixes made to the theme."
sidebar:
nav: docs
last_modified_at: 2018-10-02T11:03:51-04:00
last_modified_at: 2018-10-04T15:41:33-04:00
toc: true
---
## Unreleased
### 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)
@@ -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"
View
@@ -200,6 +200,7 @@ plugins:
- jekyll-gist
- jekyll-feed
- jemoji
- jekyll-include-cache
# mimic GitHub Pages with --safe
whitelist:
@@ -208,6 +209,7 @@ whitelist:
- jekyll-gist
- jekyll-feed
- jemoji
- jekyll-include-cache
# Archives

0 comments on commit e704cd4

Please sign in to comment.