Skip to content

Instantly share code, notes, and snippets.

@drewbolles
Created April 24, 2015 05:20
Show Gist options
  • Save drewbolles/ce431a4c24efad43f0e9 to your computer and use it in GitHub Desktop.
Save drewbolles/ce431a4c24efad43f0e9 to your computer and use it in GitHub Desktop.
Jekyll head.html file with critical CSS inline
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
<!-- Inline critical css -->
<style type="text/css">{% include critical.css %}</style>
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<!--[if lt IE 9]>
<script src="{{ "js/html5shiv.js" | prepend: site.baseurl }}"></script>
<![endif]-->
<!-- Load CSS -->
<script type="text/javascript">{% include loadCSS.js %}</script>
</head>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment