From c1a67257e8d5fa6ddb4ba6b052fdb1387c0b8846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Tron=C3=AD=C4=8Dek?= Date: Thu, 2 Jan 2020 15:36:46 +0100 Subject: [PATCH] Add an all post page --- _includes/all_posts.html | 9 +++++++ _includes/thoughts.html | 3 ++- _layouts/posts.html | 58 ++++++++++++++++++++++++++++++++++++++++ posts.html | 3 +++ 4 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 _includes/all_posts.html create mode 100644 _layouts/posts.html create mode 100644 posts.html diff --git a/_includes/all_posts.html b/_includes/all_posts.html new file mode 100644 index 0000000..6b5db1c --- /dev/null +++ b/_includes/all_posts.html @@ -0,0 +1,9 @@ +

Blog

+

All of the articles from my blog

+
+ {% for post in site.posts %} +
+ {% include post-card.html %} +
+ {% endfor %} +
diff --git a/_includes/thoughts.html b/_includes/thoughts.html index 39952e6..784ae3e 100644 --- a/_includes/thoughts.html +++ b/_includes/thoughts.html @@ -1,9 +1,10 @@

Blog

Some articles I have written

- {% for post in site.posts limit: 12 %} + {% for post in site.posts limit: 6 %}
{% include post-card.html %}
{% endfor %} + Check out all of the articles
diff --git a/_layouts/posts.html b/_layouts/posts.html new file mode 100644 index 0000000..60d3d00 --- /dev/null +++ b/_layouts/posts.html @@ -0,0 +1,58 @@ +{% include header.html %} + + +{% if site.layout == 'stacked' %} +
+ {% include masthead.html metadata=true %} + +
+ {{ content }} +
+ + + + {% unless posts_total == 0 %} + +
+ {% include all_posts.html %} +
+ {% endunless %} +
+{% else %} +
+
+ {% include masthead.html metadata=true %} +
+ +
+
+ {% unless content == "" %} +
+ {{ content }} +
+ {% endunless %} + + {% unless posts_total == 0 %} +

{% octicon chevron-left height:16 class:"mr-2 v-align-middle" fill:#0366d6 aria-label:Home %}Home

+ + {% include all_posts.html %} + {% endunless %} + + + + + + + +
+
+
+ +{% endif %} + +{% include footer.html %} \ No newline at end of file diff --git a/posts.html b/posts.html new file mode 100644 index 0000000..0401b56 --- /dev/null +++ b/posts.html @@ -0,0 +1,3 @@ +--- +layout: posts +--- -- 2.51.2