coleslaw-org / coleslaw

Flexible Lisp Blogware
BSD 2-Clause "Simplified" License
553 stars 82 forks source link

Added "drafts" feature #169

Closed veddox closed 4 years ago

veddox commented 5 years ago

When I am writing a post, I like to preview the actual HTML being generated in my browser; so I will frequently build and deploy during the writing process. However, I am not particularly keen on having half-finished posts showing up on my blog homepage.

This pull request adds a feature to circumvent this problem. It introduces the metadata category version, defaulting to "final". If the version contains the string "draft", the relevant content is built and deployed, but will not show up on any index or feed. (It is thus only available via the direct URL.)

equwal commented 5 years ago

You could also write files elsewhere, which you only symlink when done.

guicho271828 commented 4 years ago

this is lacking documentation.

guicho271828 commented 4 years ago

I thought about the usefulness of this feature, and came to think that --- why do you deploy the unfinished blog in the first place? If you just want to check the current draft, you should not work directly in the deploy directory, you should work in the staging directory instead.

guicho271828 commented 4 years ago

I believe this is a documentation problem. The doc does not describe the difference of staging dir and the deploy dir, main function also always performs the deploy, thus the user (the PR submitter in this case) is confused. Addressing this in #179 .

guicho271828 commented 4 years ago

The doc does not describe

It is actually describing it but it is not put to the forefront (it is in hacking.md)