Added Series posts functionality

This commit is contained in:
Bangara Raju Kottedi 2024-03-30 00:54:55 +05:30
parent 24f1839498
commit f50d84238d
6 changed files with 36 additions and 28 deletions

View File

@ -5,4 +5,4 @@ date: 2023-07-23 0:00:00 +0530
tags: [test, self-hosted]
---
# Future Post Modified
## Future Post Modified

View File

@ -1,25 +0,0 @@
title: This is the Quiz Title
randomized: false
questions:
- type: "multiple-choice"
question: "What is your favorite color?"
items:
- choice: Red
correct: null
- choice: Blue
correct: null
- choice: Green
correct: null
followup: There is no correct answer to asking your favorite color! All choices would be good.
- type: "multiple-choice"
question: "True or False, Pittsburgh is West of Philadelphia"
items:
- choice: True
correct: true
- choice: False
correct: false
followup: |
The answer is True! Pittsburgh is 304.9 miles West of Philadelphia, or approximately
a car ride of 4 hours and 52 minutes. Buckle up!

View File

@ -0,0 +1,32 @@
<style>
main h3 {
margin: 10px
}
#post-series {
margin-top: 25px;
}
.card {
padding: 10px;
}
</style>
{% if page.series %}
{% assign posts = site.posts | where: "series", page.series | sort: 'date' %}
<div id="post-series">
<div class="card">
<div>
<h3>{{ page.series }}</h3>
<ol>
{% assign posts = site.posts | where: "series", page.series | sort: "date" %}
{% for post in posts %}
<li>{% if post.url == page.url %}{{ post.title }} {% else %}
<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>{% endif %}
</li>
{% endfor %}
</ol>
</div>
</div>
</div>
{% endif %}

View File

@ -91,6 +91,7 @@ tail_includes:
<!-- .d-flex -->
</div>
<!-- .post-meta -->
{% include post-series.html %}
</header>
<div class="content">

View File

@ -6,4 +6,4 @@ tags: [hello, world]
---
# Hello World
## Hello World

View File

@ -4,7 +4,7 @@ date: 2023-07-23 0:00:00 +0530
tags: [privacy, self-hosted, comment-system, remark42]
---
# Privacy-focused lightweight commenting engine
## Privacy-focused lightweight commenting engine
## [Remark 42](https://remark42.com/)