<!– Start HTTP/2 Preload of Resources–> {% comment %}
Preload CSS Packages
{% endcomment %} {% if page.css_bundle %}
{% capture css-package %}/assets/css/main-{{page.css_bundle}}.css{% endcapture %}
{% elsif layout.css_bundle %}
{% capture css-package %}/assets/css/main-{{layout.css_bundle}}.css{% endcapture %}
{% else %}
{% capture css-package %}/assets/css/main.css{% endcapture %}
{% endif %} <link rel=“preload” as=“style” href=“{{ css-package | relative_url }}”>
{% comment %}
TODO Preload JS Packages
{% endcomment %} {% comment %}
Site Wide Http2 resources
{% endcomment %} {% if site.http2_resources %}
{% for resource in site.http2_resources %} {% if resource.href_list %} {% for href in resource.href_list %} <link rel="{{resource.rel}}" {% if resource.as %}as="{{resource.as}}"{% endif %} href="{{href}}" {% if resource.type %}type="{{resource.type}}" {% endif %} {% if resource.crossorigin %}crossorigin{% endif %}> {% endfor %} {% else %} <link rel="{{resource.rel}}" {% if resource.as %}as="{{resource.as}}"{% endif %} href="{{resource.href}}" {% if resource.type %}type="{{resource.type}}"{% endif %} {% if resource.crossorigin %}crossorigin{% endif %}> {% endif %} {% endfor %}
{% endif %} {% comment %}
Jumbotron Background Image
{% endcomment %} {% if page.jumbotron.background-image %}
{% for resource in page.http2_resources %} <link rel="preload" as="image" href="{{page.jumbotron.background-image}}"> {% endfor %}
{% endif %} {% comment %}
Jumbotron Video
{% endcomment %} {% if page.jumbotron.video.poster %}
<link rel="preload" as="image" href="{{page.jumbotron.video.poster}}">
{% endif %} {% if page.jumbotron.video.source.mp4 %}
<link rel="preload" as="video" href="{{page.jumbotron.video.source.mp4}}">
{% endif %} {% comment %}
Blog Images
{% endcomment %} {% if page.image.featured %}
{% if page.image.path %} <link rel="preload" as="image" href="{{page.image.path}}"> {% endif %}
{% endif %}