Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to link previous and next posts in post metadata #95

Merged
merged 7 commits into from
Feb 16, 2024

Conversation

jmglov
Copy link
Contributor

@jmglov jmglov commented Feb 15, 2024

If you set the :link-prev-next-posts option to true, quickblog adds prev
and next metadata to each post (where prev is the previous post and next
is the next post in date order, oldest to newest). You can make use of these by
adding something similar to this to your post.html template:

{% if any prev next %}
  <div class="post-prev-next">
{% if prev %}
    <div><a href="{{prev.file|replace:.md:.html}}">{{prev.title}}</a></div>
{% endif %}
{% if next %}
    <div><a href="{{next.file|replace:.md:.html}}">{{next.title}}</a></div>
{% endif %}
  </div>
{% endif %}
  • This PR corresponds to an [issue with a clear problem statement] Link posts #90
  • I have updated the CHANGELOG.md file with a description of the addressed issue.

@borkdude borkdude merged commit aab2085 into borkdude:main Feb 16, 2024
2 checks passed
@borkdude
Copy link
Owner

Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants