-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for critical CSS and added imager and minify configs
- Loading branch information
Showing
9 changed files
with
78 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
return array( | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?php | ||
return [ | ||
return array( | ||
'disableDevmodeMinifying' => true | ||
]; | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
{%- cache -%} | ||
{%- minify -%} | ||
{% if entry is defined and entry.matrix.block is defined %} | ||
{# Block #} | ||
{% endif %} | ||
{%- endminify -%} | ||
{%- endcache -%} | ||
{% cache %} | ||
{% minify %} | ||
{% endminify %} | ||
{% endcache %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,49 @@ | ||
{%- minify -%} | ||
{% minify %} | ||
|
||
{% import '_partials/macros' as macro %} | ||
{% import '_partials/macros' as macro %} | ||
|
||
<!doctype html> | ||
<html class="no-js" lang="{{ craft.app.language|slice(0,2) }}"> | ||
<head> | ||
<!doctype html> | ||
<html class="no-js" lang="{{ craft.app.language|slice(0,2) }}"> | ||
<head> | ||
|
||
<meta charset="utf-8"> | ||
<meta http-equiv="x-ua-compatible" content="ie=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="x-ua-compatible" content="ie=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
|
||
{# Favicons #} | ||
{{ source('_partials/favicons', ignore_missing = true) }} | ||
{# Favicons #} | ||
{{ source('_partials/favicons', ignore_missing = true) }} | ||
|
||
{# Inline / Critical CSS #} | ||
{% if block('inlineCss') is defined %} | ||
<style> | ||
{% block inlineCss %}{% endblock %} | ||
</style> | ||
{% endif %} | ||
{# Inline / Critical CSS #} | ||
{% if | ||
block('inlineCss')|length or | ||
block('criticalCss')|length | ||
%} | ||
<style> | ||
{% block criticalCss %}{% endblock %} | ||
{% block inlineCss %}{% endblock %} | ||
</style> | ||
{% endif %} | ||
|
||
{# CSS #} | ||
<link rel="preload" href="{{ rev('/dist/app.css') }}" as="style" onload="this.onload=null;this.rel='stylesheet'"> | ||
<noscript> | ||
<link rel="stylesheet" href="{{ rev('/dist/app.css') }}"> | ||
</noscript> | ||
{# CSS #} | ||
<link rel="{{ block('criticalCss')|length ? 'preload' : 'stylesheet' }}" href="{{ rev('/dist/app.css') }}" as="style" onload="this.onload=null;this.rel='stylesheet'"> | ||
<noscript> | ||
<link rel="stylesheet" href="{{ rev('/dist/app.css') }}"> | ||
</noscript> | ||
|
||
</head> | ||
</head> | ||
|
||
<body> | ||
<body> | ||
|
||
{% block body %}{% endblock %} | ||
{% block body %}{% endblock %} | ||
|
||
{# Javascript #} | ||
<script src="{{ rev('/dist/app.js') }}"></script> | ||
{# Javascript #} | ||
<script src="{{ rev('/dist/app.js') }}"></script> | ||
|
||
{# Inline Javascript#} | ||
{% block inlineJs %}{% endblock %} | ||
{# Inline Javascript#} | ||
{% block inlineJs %}{% endblock %} | ||
|
||
</body> | ||
</body> | ||
|
||
</html> | ||
</html> | ||
|
||
{%- endminify -%} | ||
{% endminify %} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters