Create post-list that only shows future posts

17 views
Skip to first unread message

guuglhu...@gmail.com

unread,
Mar 7, 2017, 5:28:13 AM3/7/17
to nikola-discuss
First of all, thanks for this great package! I just discovered it yesterday, and am very happy with it (I use it to design a homepage for a beginner's Python course).

Now my question:

I would like to make a list of posts that are soon to be published. Is it possible to do this in a post-list using the option date?
I would like to use something like

```
{{% post-list date=">now" %}}{{% /post-list %}}

where now is the current date.

Is this possible?

Cheers
Gabriel

Chris Warrick

unread,
Mar 7, 2017, 11:19:19 AM3/7/17
to Nikola—Discuss
On 7 March 2017 at 11:28, <guuglhu...@gmail.com> wrote:
> First of all, thanks for this great package! I just discovered it yesterday,
> and am very happy with it (I use it to design a homepage for a beginner's
> Python course).

You’re welcome! Make sure to add it to https://users.getnikola.com/ .

> Now my question:
>
> I would like to make a list of posts that are soon to be published. Is it
> possible to do this in a post-list using the option date?
> I would like to use something like
>
> ```
> {{% post-list date=">now" %}}{{% /post-list %}}
>
> where now is the current date.
>
> Is this possible?

It is now! You need Nikola from GitHub master, or some manual patching:
https://github.com/getnikola/nikola/commit/467f9fe8c19a32fedf60448b9149f0239d71167d

--
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16

guuglhu...@gmail.com

unread,
Mar 8, 2017, 5:04:38 AM3/8/17
to nikola-discuss
Cool, thank you for the quick reply!
As soon as the page is in a more advanced state, I will be glad to add it.
Reply all
Reply to author
Forward
0 new messages