Bugfix for 404 page showing in All Pages list

This commit is contained in:
Andrew Banchich 2018-08-05 14:35:00 -04:00
parent 2738786514
commit a6259c1274
3 changed files with 50 additions and 48 deletions

View File

@ -14,7 +14,7 @@ country: United States of America
phone: (716) 555-5555 phone: (716) 555-5555
# homepage tiles # homepage tiles
tiles-source: posts # accepts "posts" or "pages" tiles-source: pages # accepts "posts" or "pages"
tiles-count: 6 tiles-count: 6
# social settings # social settings

View File

@ -1,28 +1,28 @@
<section id="one" class="tiles"> <section id="one" class="tiles">
{% for post in site.posts limit:site.tiles-count %} {% for post in site.posts limit:site.tiles-count %}
{% if site.tiles-source == 'posts' %} {% if site.tiles-source == 'posts' %}
<article> <article>
<span class="image"> <span class="image">
<img src="{{ post.image }}" alt="" /> <img src="{{ post.image }}" alt="" />
</span> </span>
<header class="major"> <header class="major">
<h3><a href="{{ post.url | relative_url }}" class="link">{{ post.title }}</a></h3> <h3><a href="{{ post.url | relative_url }}" class="link">{{ post.title }}</a></h3>
<p>{{ post.description }}</p> <p>{{ post.description }}</p>
</header> </header>
</article> </article>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% for page in site.pages limit:site.tiles-count %} {% for page in site.pages limit:site.tiles-count %}
{% if site.tiles-source == 'pages' %} {% if site.tiles-source == 'pages' and page.title != 404 %}
<article> <article>
<span class="image"> <span class="image">
<img src="{{ page.image }}" alt="" /> <img src="{{ page.image }}" alt="" />
</span> </span>
<header class="major"> <header class="major">
<h3><a href="{{ page.url | relative_url }}" class="link">{{ page.title }}</a></h3> <h3><a href="{{ page.url | relative_url }}" class="link">{{ page.title }}</a></h3>
<p>{{ page.description }}</p> <p>{{ page.description }}</p>
</header> </header>
</article> </article>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</section> </section>

View File

@ -1,39 +1,41 @@
<!DOCTYPE html> <!DOCTYPE html>
<!-- <!--
Forty by HTML5 UP Forty by HTML5 UP
html5up.net | @ajlkn html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
--> -->
<html> <html>
{% include head.html %} {% include head.html %}
<body> <body>
{% include header.html %} {% include header.html %}
<!-- Main --> <!-- Main -->
<div id="main" class="alt"> <div id="main" class="alt">
<!-- One --> <!-- One -->
<section id="one"> <section id="one">
<div class="inner"> <div class="inner">
{% for post in site.posts %} {% for post in site.posts %}
<header class="major"> {% if post.title != 404 %}
<h1>{{ post.title }}</h1> <header class="major">
</header> <h1>{{ post.title }}</h1>
{% if post.image %}<span class="image main"><img src="{{ site.baseurl }}/{{ post.image }}" alt="" /></span>{% endif %} </header>
{% if post.date %}<p>{{ post.date }}</p>{% endif %} {% if post.image %}<span class="image main"><img src="{{ site.baseurl }}/{{ post.image }}" alt="" /></span>{% endif %}
<p>{{ post.content }}</p> {% if post.date %}<p>{{ post.date }}</p>{% endif %}
{% endfor %} <p>{{ post.content }}</p>
{% endif %}
{% endfor %}
</div> </div>
</section> </section>
</div> </div>
{% include footer.html %} {% include footer.html %}
</body> </body>
</html> </html>