Use macros

This commit is contained in:
Oliver Davies 2018-10-06 12:19:52 +01:00
parent 1ff244c6ca
commit 238b0e5aad
2 changed files with 18 additions and 8 deletions

View file

@ -1,13 +1,16 @@
{% macro htmlTitle(site, page) -%}
{% if page.title is defined and page.url != '//' %}
{{ page.title }} |
{% endif %}
{{ site.title }} - {{ site.subtitle }}
{%- endmacro %}
{% import _self as helpers %}
<!DOCTYPE html>
<html class="no-js text-sm" lang="en-GB">
<head>
<title>
{% if page.title is defined and page.url != '//' %}
{{ page.title }} |
{% endif %}
{{ site.title }} - {{ site.subtitle }}
</title>
<title>{{ helpers.htmlTitle(site, page) }}</title>
{% include 'meta' %}
<link rel="stylesheet" href="/dist/css/app.css">