From 22251d0729dfd2dde33b2996dc995d4c51981144 Mon Sep 17 00:00:00 2001 From: Set Sakrecoer Date: Tue, 15 Dec 2020 14:09:24 +0100 Subject: [PATCH] have random posts in the flame button --- _layouts/default.html | 2 +- _layouts/post.html | 2 +- index.html | 50 ++++++++++++++++++++++++++++++++++++++++++- posts.json | 15 +++++++++++++ 4 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 posts.json diff --git a/_layouts/default.html b/_layouts/default.html index c4aa082..d2752c5 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -17,7 +17,7 @@ - + diff --git a/_layouts/post.html b/_layouts/post.html index e65d53c..0a20333 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -2,7 +2,7 @@ layout: default --- {% if page.category == 'releases' %} - + {% include header.html %}
diff --git a/index.html b/index.html index 5953bc3..89a7d17 100644 --- a/index.html +++ b/index.html @@ -28,6 +28,54 @@ apps: external: false --- + + {% include relBase.html %}
@@ -46,7 +94,7 @@ apps:
    {% for app in page.apps %}
  • {{ app.icon }}
  • {% endfor %} -
  • {% for post in site.categories.releases limit: 1%}🔥{% endfor %}
  • +
diff --git a/posts.json b/posts.json new file mode 100644 index 0000000..63c5662 --- /dev/null +++ b/posts.json @@ -0,0 +1,15 @@ +--- +layout: nil +--- +[ + {% assign albums = site.categories.releases %} + {% assign tracks = site.tracks %} + + {% assign random = albums | concat: tracks %} +{% for post in random %} +{ + "title": "{{ post.title }}", + "href": "{{ post.url }}" +}{% unless forloop.last %},{% endunless %} +{% endfor %} +]