Closed jakemeinershagen closed 1 year ago
Hi! I might have misunderstood what you are trying to do, but I believe series_index
is what you need. Have a look at the README when it says:
If you want to force a given order, specify :series_index: (reST) or series_index: (Markdown) in the article
metadata, starting from 1. All articles with this enforced index are put at the beginning of the series and
ordered according to the index itself. All the remaining articles come after them, ordered by date.
You can see an example of that used in a template here: https://github.com/TheDigitalCatOnline/blog_source/blob/master/bengal/templates/article.html#L104-L130
Let me know if this makes sense.
That's it. I don't know how I missed that in the docs. Thank you!
@jakemeinershagen No worries, glad that the solution was already available :top:
Is there a way to manually index the articles in a series using metadata fields in the markdown?
I've been trying to figure out a way to do custom ordering so I can have a next and previous button on the article page and have been struggling with default Pelican. I found this plugin and it is perfect for next and previous buttons, but it seems like it also will only order based on date.
An example case I am thinking of could go like this: I am making a tutorial series or something of the sort. The work I'm doing is such that I'm making the tutorials a bit out of order. Or maybe I want to go back and add a tutorial in the middle at a later date. So, what I want to do is be able to put an attribute in the meta-data like "series_part" where I can explicitly list part 1, 2, 3, and so on, independent of date posted.
Is this something that is possible and/or would this be something that would be reasonable to add?