emacs-love / weblorg

Static Site Generator for Emacs
https://emacs.love/weblorg
GNU General Public License v3.0
278 stars 20 forks source link

As blogger I want to be able to start write posts but not publish, so that I only publish finished content. #4

Closed guilhermecomum closed 3 years ago

clarete commented 3 years ago

This is possible with two things:

  1. add the #+DRAFT: t file tag in your posts
  2. add the #'blorg-input-filter-drafts to your publish.el
(blorg-route
 :name "posts"
 :input-pattern "posts/*.org"
 :input-filter #'blorg-input-filter-drafts
 :template "post.html"
 :output "blog/{{ slug }}.html"
 :url "/blog/{{ slug }}.html")

Org-Mode file, let's say "posts/a-nice-but.org"

#+TITLE: A nice but incomplete post
#+DRAFT: t

something we'll never see because it's going to be filtered