hmm we should have drafts probably

This commit is contained in:
xenia 2020-05-14 16:42:01 -04:00
parent 3694fa02a7
commit 007d37341e
2 changed files with 2 additions and 1 deletions

View File

@ -56,6 +56,7 @@
(with-output-to-file "src/style.sass"
(lambda () (write-string "// styles go here :P") (void)))
(make-directory "src/posts")
(make-directory "src/drafts")
(make-directory "public")
(make-directory "public/posts")

View File

@ -16,7 +16,7 @@
(format "~a-~a-~a-~a.md" (date-year now)
(~r (date-month now) #:min-width 2 #:pad-string "0")
(~r (date-day now) #:min-width 2 #:pad-string "0") filename-part))
(define path (build-path "src" "posts" filename))
(define path (build-path "src" "drafts" filename))
(if (or (file-exists? path) (link-exists? path) (directory-exists? path))
(displayln "file already exists")
(with-output-to-file