Skip to content

Commit

Permalink
Use jekyll-include-cache
Browse files Browse the repository at this point in the history
`bundle exec jekyll build --profile`:
- before : about 130s
- after  : about 35s
  • Loading branch information
znz committed Aug 7, 2019
1 parent 5f7d519 commit ba1a093
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ gem 'jekyll-minifier', group: :jekyll_plugins
gem 'jekyll-sitemap', group: :jekyll_plugins gem 'jekyll-sitemap', group: :jekyll_plugins
gem 'jekyll-last-modified-at', group: :jekyll_plugins gem 'jekyll-last-modified-at', group: :jekyll_plugins
gem 'jekyll-tagging', group: :jekyll_plugins gem 'jekyll-tagging', group: :jekyll_plugins
gem 'jekyll-include-cache', group: :jekyll_plugins
gem 'nokogiri' gem 'nokogiri'
gem 'fastimage' gem 'fastimage'
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ GEM
safe_yaml (~> 1.0) safe_yaml (~> 1.0)
jekyll-compose (0.11.0) jekyll-compose (0.11.0)
jekyll (>= 3.7, < 5.0) jekyll (>= 3.7, < 5.0)
jekyll-include-cache (0.2.0)
jekyll (>= 3.7, < 5.0)
jekyll-last-modified-at (1.1.0) jekyll-last-modified-at (1.1.0)
jekyll (>= 3.7, < 5.0) jekyll (>= 3.7, < 5.0)
posix-spawn (~> 0.3.9) posix-spawn (~> 0.3.9)
Expand Down Expand Up @@ -90,6 +92,7 @@ DEPENDENCIES
fastimage fastimage
jekyll jekyll
jekyll-compose jekyll-compose
jekyll-include-cache
jekyll-last-modified-at jekyll-last-modified-at
jekyll-minifier jekyll-minifier
jekyll-paginate jekyll-paginate
Expand Down
1 change: 1 addition & 0 deletions _config.yml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ kramdown:
plugins: plugins:
- jekyll-paginate - jekyll-paginate
- jekyll-last-modified-at - jekyll-last-modified-at
- jekyll-include-cache


permalink: /:categories/:year-:month-:day-:title.html permalink: /:categories/:year-:month-:day-:title.html
strict_front_matter: true strict_front_matter: true
Expand Down
7 changes: 7 additions & 0 deletions _includes/amp-custom.html
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,7 @@
<style amp-custom>
{% capture include_to_scssify %}
{% include styles.scss %}
{% include custom.scss %}
{% endcapture %}
{{ include_to_scssify | scssify }}
</style>
10 changes: 1 addition & 9 deletions _includes/head.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -42,15 +42,7 @@
</script> </script>


<link href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" rel="stylesheet"> <link href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" rel="stylesheet">
<style amp-custom> {% include_cached amp-custom.html %}
{% capture include_to_scssify %}
{% include styles.scss %}
{% include custom.scss %}
{% endcapture %}
{{ include_to_scssify | scssify }}
</style>




<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript> <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
<script async src="https://cdn.ampproject.org/v0.js"></script> <script async src="https://cdn.ampproject.org/v0.js"></script>
Expand Down

0 comments on commit ba1a093

Please sign in to comment.