So, theme is in place, I can list all posts and access each one of them when Hugo server is running, being draft or not.
I'm trying to create a custom list but, after some research, I couldn't find how to list only draft posts.
Can you help me to create a custom Hugo page that list only draft posts when it's config has draft: true
?
Check if the newly released Hugo 0.65.0 (Feb. 2020) could help:
The front matter fields that control when and if to publish a piece of content (
draft
,publishDate
,expiryDate
) now also works for list pages (like sections and the home page), and is recursive.
I'll give it a try later this or the next month :) Thanks!
@William No problem (since "next month" is in a few days ;)). Of course, that would be 0.65.3 now (github.com/gohugoio/hugo/releases)
Downloading the latest Hugo Release (0.66.0) and navigating to
http://localhost:1313/draft/
, thepost-list.html
shows only draft posts now :) Cheers!