_layouts/home.html in jekyll-theme-prologue-0.2.2 vs _layouts/home.html in jekyll-theme-prologue-0.2.3
- old
+ new
@@ -13,40 +13,49 @@
{% include header.html %}
<!-- Main -->
<div id="main">
{% assign sections = site.sections | where_exp: 'section','section.order >= 1' %}
+
+ {% if page.permalink %}
+ <!-- This if statement enables the 404 page -->
+ {% assign sections = sections | push: page %}
+ {% endif %}
+
{% unless sections == null %}
- <!-- Sections -->
{% assign sections = sections | sort: 'order' %}
+
+ <!-- Sections -->
{% for section in sections %}
-
- {% assign slug = section.title | slugify | default: 'untitled' %}
+
{% assign title = section.title | default: 'Untitled' %}
+ {% assign slug = section.title | slugify | default: 'untitled' %}
{% if section.order == 1 %}
{% assign class = 'shade-one cover dark' %}
{% else %}
{% capture class %}
shade-{% cycle 'two', 'three', 'four', 'three' %}
{% endcapture %}
{% endif %}
{% if section.auto-header == 'none' %}
- {% assign header = "" %}
+ {% assign heading = "" %}
{% elsif section.auto-header == null or section.auto-header == 'use-title' %}
- {% capture header %}
+ {% capture heading %}
<header>
<h2>{{ title }}</h2>
</header>
{% endcapture %}
{% else %}
- {% assign header = section.auto-header %}
+ {% capture heading %}
+ <header>
+ <h2>{{ section.auto-header }}</h2>
+ </header>
+ {% endcapture %}
{% endif %}
- {% assign content = section.content %}
-
- {% include section.html id=slug class=class header=header content=content %}
+ {% include section.html id=slug class=class heading=heading content=section.content %}
{% endfor %}
{% endunless %}
</div>
\ No newline at end of file