Serve styles as CSS file

Not sure why I once decided to bundle all styles directly within all
HTML responses instead of leveraging proper caching mechanisms and
serving styles in a CSS file that can be cached on clients.
This commit is contained in:
Maxime Vaillancourt 2020-09-26 11:38:53 -04:00
parent 0861984e70
commit 385ef3a852
2 changed files with 5 additions and 7 deletions

View File

@ -1,11 +1,4 @@
<head>
{% capture styles %}
{% include main.scss %}
{% endcapture %}
<style>
{{ styles | scssify }}
</style>
<meta charset="UTF-8">
<link rel="canonical" href="{{ site.url }}{{ page.url }}" />
@ -18,6 +11,8 @@
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=">
<link rel="stylesheet" href="/styles.css">
{% if page.excerpt %}
<meta property="og:description" content="{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}"/>
{% else %}

View File

@ -1,3 +1,6 @@
---
---
@import "../_sass/normalize";
@import "../_sass/code";
@import "../_sass/style";