summaryrefslogtreecommitdiff
path: root/_posts/2015-01-15-optimizing-css.markdown
diff options
context:
space:
mode:
Diffstat (limited to '_posts/2015-01-15-optimizing-css.markdown')
-rw-r--r--_posts/2015-01-15-optimizing-css.markdown11
1 files changed, 10 insertions, 1 deletions
diff --git a/_posts/2015-01-15-optimizing-css.markdown b/_posts/2015-01-15-optimizing-css.markdown
index c2496f2..1f8e53a 100644
--- a/_posts/2015-01-15-optimizing-css.markdown
+++ b/_posts/2015-01-15-optimizing-css.markdown
@@ -30,6 +30,15 @@ On my site, I use a small stylesheet in the `<head>` to load my webfonts; this a
If you're using Jekyll, you can pretty easily include a minified SCSS segment in your layouts. I keep my font stylesheet at `_includes/fonts.scss`, so I can use the following chunk of code to include the minified version:
-{% gist bbaea7d51dd9ab9afa15 %}
+{% highlight html %}
+{% raw %}
+<style type="text/css">
+ {% capture fonts %}
+ {% include fonts.scss %}
+ {% endcapture %}
+ {{ fonts | scssify }}
+</style>
+{% endraw %}
+{% endhighlight %}
The minification is, of course, dependent on your `_config.yml`. You can [take a look at mine](https://github.com/benburwell/benburwell.github.io/blob/master/_config.yml) for reference.