added index.html pages and a way to ommit the index when looping and listing posts

This commit is contained in:
Brendan McDevitt 2020-12-18 16:59:08 -05:00
parent 9755ecb91d
commit af1af681e9
5 changed files with 64 additions and 0 deletions

14
_homelab/index.html Normal file
View file

@ -0,0 +1,14 @@
---
layout: default
title: homelab index
---
<div id="home">
<h1>Homelab Posts</h1>
<ul class="homelab">
{% for post in site.homelab %}
{%unless post.title == 'homelab index' %}
<li><span>{{ post.date | date_to_string }}</span> &raquo; <a href="{{ post.url }}"> {{ post.title }}</a></li>
{%endunless%}
{% endfor %}
</ul>

14
_posts/index.html Normal file
View file

@ -0,0 +1,14 @@
---
layout: default
title: posts index
---
<div id="home">
<h1>Blog Posts</h1>
<ul class="posts">
{% for post in site.posts %}
{%unless post.title == 'posts index' %}
<li><span>{{ post.date | date_to_string }}</span> &raquo; <a href="{{ post.url }}"> {{ post.title }}</a></li>
{%endunless%}
{% endfor %}
</ul>

14
_programming/index.html Normal file
View file

@ -0,0 +1,14 @@
---
layout: default
title: programming index
---
<div id="home">
<h1>Programming</h1>
<ul class="programming">
{% for post in site.programming %}
{%unless post.title == 'programming index' %}
<li><span>{{ post.date | date_to_string }}</span> &raquo; <a href="{{ post.url }}"> {{ post.title }}</a></li>
{%endunless%}
{% endfor %}
</ul>

14
_security/index.html Normal file
View file

@ -0,0 +1,14 @@
---
layout: default
title: security index
---
<div id="home">
<h1>Security Thoughts</h1>
<ul class="security">
{% for post in site.security %}
{%unless post.title == 'security index' %}
<li><span>{{ post.date | date_to_string }}</span> &raquo; <a href="{{ post.url }}"> {{ post.title }}</a></li>
{%endunless%}
{% endfor %}
</ul>

View file

@ -7,27 +7,35 @@ title: brendan mcdevitt
<h1>Blog Posts</h1>
<ul class="posts">
{% for post in site.posts %}
{% unless post.title == 'posts index' %}
<li><span>{{ post.date | date_to_string }}</span> &raquo; <a href="{{ post.url }}">{{ post.title }}</a></li>
{% endunless %}
{% endfor %}
</ul>
<h1>Homelab Posts</h1>
<ul class="homelab">
{% for post in site.homelab %}
{% unless post.title == 'homelab index' %}
<li><span>{{ post.date | date_to_string }}</span> &raquo; <a href="{{ post.url }}">{{ post.title }}</a></li>
{% endunless %}
{% endfor %}
</ul>
<h1>Programming</h1>
<ul class="programming">
{% for post in site.programming %}
{% unless post.title == 'programming index' %}
<li><span>{{ post.date | date_to_string }}</span> &raquo; <a href="{{ post.url }}"> {{ post.title }}</a></li>
{% endunless %}
{% endfor %}
</ul>
<h1>Security Thoughts</h1>
<ul class="security">
{% for post in site.security %}
{% unless post.title == 'security index' %}
<li><span>{{ post.date | date_to_string }}</span> &raquo; <a href="{{ post.url }}"> {{ post.title }}</a></li>
{% endunless %}
{% endfor %}
</ul>