Skip to content

Commit

Permalink
Reorder recommendations
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Feb 12, 2024
1 parent 8797653 commit 23e1021
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions src/templates/_utilities/diagnostics/index.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{# @var settings \putyourlightson\blitz\models\SettingsModel #}
{% set settings = craft.app.plugins.plugin('blitz').settings %}

<div class="blitz-diagnostics">
<header id="header">
<div class="page-title flex">
Expand Down Expand Up @@ -42,8 +45,20 @@
<h1 style="margin-bottom: 0">
{{ 'Recommendations'|t('blitz') }}
</h1>
{# @var settings \putyourlightson\blitz\models\SettingsModel #}
{% set settings = craft.app.plugins.plugin('blitz').settings %}
<p>
{% if craft.app.request.isWebAliasSetDynamically %}
<span class="warning" title="Warning" aria-label="Warning" data-icon="alert"></span>
The
<a href="https://craftcms.com/docs/4.x/config/#aliases" target="_blank"><code>@web</code></a> alias should be explicitly defined.
{% else %}
<span class="success" title="Passed" aria-label="Passed" data-icon="check"></span>
The
<a href="https://craftcms.com/docs/4.x/config/#aliases" target="_blank"><code>@web</code></a> alias is explicitly defined.
{% endif %}
<span class="info">
Explicitly defining the <a href="https://craftcms.com/docs/4.x/config/#aliases" target="_blank"><code>@web</code></a> alias is important for ensuring that URLs work correctly when the cache is generated via console requests. <a href="https://putyourlightson.com/plugins/blitz#the-site-is-not-cached-when-using-console-commands" target="_blank" class="go">Learn more</a>
</span>
</p>
<p>
{% set globalSetCount = craft.globalSets.count %}
{% if globalSetCount > 0 %}
Expand All @@ -66,20 +81,6 @@
<a href="https://craftcms.com/docs/4.x/globals.html" target="">Globals</a> should be avoided, since they are preloaded on every page in your site, unless the <code>refreshCacheAutomaticallyForGlobals</code> config setting is disabled. <a href="https://putyourlightson.com/plugins/blitz#2-avoid-using-globals" target="_blank" class="go">Learn more</a>
</span>
</p>
<p>
{% if craft.app.request.isWebAliasSetDynamically %}
<span class="warning" title="Warning" aria-label="Warning" data-icon="alert"></span>
The
<a href="https://craftcms.com/docs/4.x/config/#aliases" target="_blank"><code>@web</code></a> alias should be explicitly defined.
{% else %}
<span class="success" title="Passed" aria-label="Passed" data-icon="check"></span>
The
<a href="https://craftcms.com/docs/4.x/config/#aliases" target="_blank"><code>@web</code></a> alias is explicitly defined.
{% endif %}
<span class="info">
Explicitly defining the <a href="https://craftcms.com/docs/4.x/config/#aliases" target="_blank"><code>@web</code></a> alias is important for ensuring that URLs work correctly when the cache is generated via console requests. <a href="https://putyourlightson.com/plugins/blitz#the-site-is-not-cached-when-using-console-commands" target="_blank" class="go">Learn more</a>
</span>
</p>
<p>
{% if not craft.app.config.general.generateTransformsBeforePageLoad %}
<span class="warning" title="Warning" aria-label="Warning" data-icon="alert"></span>
Expand Down

0 comments on commit 23e1021

Please sign in to comment.