masasam / emacs-easy-hugo

Emacs major mode for managing hugo

Home Page:https://gohugo.io/tools/editors/#emacs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unclear how to separate drafts from posts

Trevoke opened this issue · comments

Hello!

Thank you for this amazing tool. I have a few questions:

  1. Will drafts and posts be picked up in all subdirectories under the content directory?
  2. If I use the org-header, what is the header for a draft? Is it #+DRAFT: true ? or #+DRAFT: yes ? Or .. both .. or .. something else?
  3. Will drafts show up both in the list of drafts and in the list of posts?
  4. How do I help you test this if you need me to?

Hi @Trevoke .
Thank you for comment.

1.Will drafts and posts be picked up in all subdirectories under the content directory?

Sorry, I don't understand.
Please tell me a little more detail.

2.If I use the org-header, what is the header for a draft? Is it #+DRAFT: true ? or #+DRAFT: yes ? Or .. both .. or .. something else?

You can do it below.
#+DRAFT: t

3.Will drafts show up both in the list of drafts and in the list of posts?

Yes you're right. List of posts displays draft. The reason is that if I don't show drafts in list of posts, it will be slowly when there are a lot of articles. I can not think that there are 1000 drafts, but I have to assume that there are 1000 articles.

4.How do I help you test this if you need me to?

Thanks @Trevoke .
It doesn't matter what format you're in, so it's helpful for me if you feel free to write anything.

Hi!

For the first question, I mean this:

content
├── drafts
│   ├── continuous-improvement.org
│   ├── cross-functional-teams-vs-multiple-queues.org
└── post
    ├── maintainability-is-relative.org
    ├── separate-manipulation-from-presentation.org
    └── the-value-of-estimates-for-a-team.org

Will all of those be picked up by the tool?

Thank you for all your other answers :)

@Trevoke Thank you for the detailed explanation. In easy-jekyll, I've implemented to collect in _draft directory. In jekyll, it will become draft if put in _draft directory. But in hugo, I think that there is not much meaning because it will not be a draft without draft = true at the front matter even if you create a directory dedicated to draft.

Although easy-hugo-list-draft (D key) can not be used in org header, if only header is hugo standard and only text is written by org mode, you can use easy-hugo-list-draft. Easy-hugo-list-draft will show the draft list all you want.

---
title: "test"
date: 2019-05-01T14:28:40+09:00
draft: true
---
Write from here in org-mode

You're right, thank you :)