Hi folks, I am planning to compile a site with --buildDrafts, but
I don’t want the drafts to be included in section/list.html template by default (I guess I can use {{ range where .Pages "draft" "!=" true }} to filter the posts in pagination etc).
I want drafts to be still compiled to the output, but instead of /blog/hello-world, I want the draft posts to go to /drafts/hello-world/. (I’m not sure how to do this.)
An option: I can create a new section (content/drafts/, in addition to content/posts/) but then I wouldn’t be using draft: true anymore.
What would be your tip to get where I want the easiest way? (I’m still new to Hugo architecture so haven’t fully wrapped my mind about the possibilities yet.)
I would like to build future and draft posts content, but not list them in the usual lists (tags, rss, posts), however I would like to list then in a specific path (e.g. host.tld/d/). So I’d like to hide draft posts anywhere exept when explicitly asked.
Currently I’m having difficulty to just create a list in a /d/ path, I have tried various combinations
But of course the given setup is wrong, either the HTML is empty or the page only contains what’s _index.md but nothing else. Did I missed something in https://gohugo.io/templates/lists/.
But then even if it works I’ll probably have to go through every template to filter drafts right ?