From 9ac96c9c0e205584004faed5ca03040450606fb2 Mon Sep 17 00:00:00 2001 From: Jieiku Date: Sun, 12 Jun 2022 18:47:34 -0700 Subject: Lighthouse Fixes --- templates/base.html | 3 ++- templates/index.html | 2 +- templates/macros/head.html | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) (limited to 'templates') diff --git a/templates/base.html b/templates/base.html index 3a59395..0792345 100644 --- a/templates/base.html +++ b/templates/base.html @@ -7,10 +7,11 @@ {{- macros_head::theme() }} {{- macros_head::stylesheets() }} - {{- macros_head::js() }} + {{- macros_head::stylesheets_preload() }} + {{- macros_head::js() }} {{- macros_head::feed() }} {%- block seo %} {%- if config.extra.title_separator %} diff --git a/templates/index.html b/templates/index.html index 422ad22..9c25fa4 100644 --- a/templates/index.html +++ b/templates/index.html @@ -57,7 +57,7 @@ {%- if config.extra.recent | default(value=true) %}
-

Recent Posts

+

Recent Posts

{%- for page in section_item.pages | slice(end=config.extra.recent_items) %} {{- page_macros::page_listing(page=page) }} {%- endfor %} diff --git a/templates/macros/head.html b/templates/macros/head.html index e5ee0ac..e0fb499 100644 --- a/templates/macros/head.html +++ b/templates/macros/head.html @@ -12,6 +12,10 @@ {%- endfor %}{%- endif %} +{%- endmacro %} + +{%- macro stylesheets_preload() %} + {%- if config.extra.fonts %}{%- for i in config.extra.fonts %} {%- if i.url is matching("^http[s]?://") %} -- cgit v1.3.1