Skip to content

Commit

Permalink
Eliminate render-blocking resources (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
lapphan authored Jul 6, 2020
1 parent cd14b23 commit 7ce1fac
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion author.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This template is used for the author page.

{{!-- This block loads specific styles for the author page --}}
{{#contentFor "styles"}}
<link rel="stylesheet" type="text/css" href="{{asset "css/listing.css"}}" media="screen" />
<link rel="stylesheet" type="text/css" href="{{asset "css/listing.css"}}" media="screen" rel="preload" as="style" />
{{/contentFor}}

{{!-- The tag below means: insert everything in this file
Expand Down
2 changes: 1 addition & 1 deletion default.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
font-display: swap;
}
</style>
<link rel="stylesheet" type="text/css" href="{{asset "css/app.css"}}" media="screen" />
<link rel="stylesheet" type="text/css" href="{{asset "css/app.css"}}" media="screen" rel="preload" as="style" />

{{!-- This #block helper will inject a stylesheet for a specific page --}}
{{{block "styles"}}}
Expand Down
2 changes: 1 addition & 1 deletion error-404.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This error template is used for all 404 errors, which might occur on your site.

{{!-- This block loads specific styles for the 404 page --}}
{{#contentFor "styles"}}
<link rel="stylesheet" type="text/css" href="{{asset "css/404.css"}}" media="screen" />
<link rel="stylesheet" type="text/css" href="{{asset "css/404.css"}}" media="screen" rel="preload" as="style" />
{{/contentFor}}

{{!-- The tag below means: insert everything in this file
Expand Down
4 changes: 2 additions & 2 deletions index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ It can be used also as the home page or the default page.

{{!-- This block loads specific styles for the index page --}}
{{#contentFor "styles"}}
<link rel="stylesheet" type="text/css" href="{{asset "css/home.css"}}" media="screen" />
<link rel="stylesheet" type="text/css" href="{{asset "css/listing.css"}}" media="screen" />
<link rel="stylesheet" type="text/css" href="{{asset "css/home.css"}}" media="screen" rel="preload" as="style" />
<link rel="stylesheet" type="text/css" href="{{asset "css/listing.css"}}" media="screen" rel="preload" as="style" />
{{/contentFor}}

{{!-- The tag below means: insert everything in this file
Expand Down
2 changes: 1 addition & 1 deletion page-authors.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ You must first create a page called Authors in the dashboard to enable it.

{{!-- This block loads specific styles for the authors page --}}
{{#contentFor "styles"}}
<link rel="stylesheet" type="text/css" href="{{asset "css/listing.css"}}" media="screen" />
<link rel="stylesheet" type="text/css" href="{{asset "css/listing.css"}}" media="screen" rel="preload" as="style" />
{{/contentFor}}

{{!-- The tag below means: insert everything in this file
Expand Down
2 changes: 1 addition & 1 deletion page-newsletter.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This template is used for the subscription page.

{{!-- This block loads specific styles for the newsletter page --}}
{{#contentFor "styles"}}
<link rel="stylesheet" type="text/css" href="{{asset "css/newsletter.css"}}" media="screen" />
<link rel="stylesheet" type="text/css" href="{{asset "css/newsletter.css"}}" media="screen" rel="preload" as="style" />
{{/contentFor}}

{{!-- The tag below means: insert everything in this file
Expand Down
2 changes: 1 addition & 1 deletion page.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This template is used for the posts that are marked as pages.

{{!-- This block loads specific styles for the post page --}}
{{#contentFor "styles"}}
<link rel="stylesheet" type="text/css" href="{{asset "css/post.css"}}" media="screen" />
<link rel="stylesheet" type="text/css" href="{{asset "css/post.css"}}" media="screen" rel="preload" as="style" />
{{/contentFor}}

{{!-- The tag below means: insert everything in this file
Expand Down
2 changes: 1 addition & 1 deletion post.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This template is used for the post page.

{{!-- This block loads specific styles for the post page --}}
{{#contentFor "styles"}}
<link rel="stylesheet" type="text/css" href="{{asset "css/post.css"}}" media="screen" />
<link rel="stylesheet" type="text/css" href="{{asset "css/post.css"}}" media="screen" rel="preload" as="style" />
{{/contentFor}}

{{!-- The tag below means: insert everything in this file
Expand Down
2 changes: 1 addition & 1 deletion subscribe.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This template is used for the subscription page.

{{!-- This block loads specific styles for the newsletter page --}}
{{#contentFor "styles"}}
<link rel="stylesheet" type="text/css" href="{{asset "css/newsletter.css"}}" media="screen" />
<link rel="stylesheet" type="text/css" href="{{asset "css/newsletter.css"}}" media="screen" rel="preload" as="style" />
{{/contentFor}}

{{!-- The tag below means: insert everything in this file
Expand Down
2 changes: 1 addition & 1 deletion tag.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This template is used for the tag page.

{{!-- This block loads specific styles for the tag page --}}
{{#contentFor "styles"}}
<link rel="stylesheet" type="text/css" href="{{asset "css/listing.css"}}" media="screen" />
<link rel="stylesheet" type="text/css" href="{{asset "css/listing.css"}}" media="screen" rel="preload" as="style" />
{{/contentFor}}

{{!-- The tag below means: insert everything in this file
Expand Down

0 comments on commit 7ce1fac

Please sign in to comment.