Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache "static" includes to improve build performance #1874

Merged
merged 3 commits into from
Oct 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ plugins:
- jekyll-gist
- jekyll-feed
- jemoji
- jekyll-include-cache

# mimic GitHub Pages with --safe
whitelist:
Expand All @@ -234,6 +235,7 @@ whitelist:
- jekyll-gist
- jekyll-feed
- jemoji
- jekyll-include-cache


# Archives
Expand Down
10 changes: 5 additions & 5 deletions _includes/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
10 changes: 5 additions & 5 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
2 changes: 2 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ plugins:
- jekyll-gist
- jekyll-feed
- jemoji
- jekyll-include-cache

# mimic GitHub Pages with --safe
whitelist:
Expand All @@ -292,6 +293,7 @@ whitelist:
- jekyll-gist
- jekyll-feed
- jemoji
- jekyll-include-cache


# Archives
Expand Down
3 changes: 2 additions & 1 deletion docs/_docs/18-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions minimal-mistakes-jekyll.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions test/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ plugins:
- jekyll-gist
- jekyll-feed
- jemoji
- jekyll-include-cache

# mimic GitHub Pages with --safe
whitelist:
Expand All @@ -208,6 +209,7 @@ whitelist:
- jekyll-gist
- jekyll-feed
- jemoji
- jekyll-include-cache


# Archives
Expand Down