From d06f0f0fb631fd9a8c0b88b4b13584ca86e2085a Mon Sep 17 00:00:00 2001 From: Philip Bailey Date: Wed, 4 Sep 2019 15:17:31 -0700 Subject: [PATCH] abstracting header to an include --- _includes/header.html | 14 ++++++++++++++ _layouts/default.html | 15 +-------------- 2 files changed, 15 insertions(+), 14 deletions(-) create mode 100644 _includes/header.html diff --git a/_includes/header.html b/_includes/header.html new file mode 100644 index 0000000..ac3ee0f --- /dev/null +++ b/_includes/header.html @@ -0,0 +1,14 @@ +{% if page.url == "/" %} +

{{ site.title | replace: 'Riverscapes Consortium', '' }}

+{% if page.subtitle %} +

{{ site.description }}

+{% endif %} +{% else %} + + +

{{ site.title }}

+

{{ page.title | replace: 'Riverscapes Consortium', '' }}

+{% if page.subtitle %} +

{{ page.subtitle }}

+{% endif %} +{% endif %} \ No newline at end of file diff --git a/_layouts/default.html b/_layouts/default.html index 462c851..8604688 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -39,20 +39,7 @@
- {% if page.url == "/" %} -

{{ site.title | replace: 'Riverscapes Consortium', '' }}

- {% if page.subtitle %} -

{{ site.description }}

- {% endif %} - {% else %} - - -

{{ site.title }}

-

{{ page.title | replace: 'Riverscapes Consortium', '' }}

- {% if page.subtitle %} -

{{ page.subtitle }}

- {% endif %} - {% endif %} + {% include header.html %}