Skip to content

Commit

Permalink
Remove and recreate the html directory on every run
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Merrell committed Jul 16, 2015
1 parent ac11e99 commit a29b4fd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions generate.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
;; requires s.el to be available and loaded
;; Just evaluate the buffer the files will be generated in ./html
(require 's)
(require 'cl-lib)

Expand All @@ -13,7 +14,7 @@
(defun generate-theme-files ()
(mapc
(lambda (theme)
(helm-themes--load-theme theme)
;; (helm-themes--load-theme theme)
(htmlize-file "./sample.exs" (concat "./html/" theme ".html")))
(sorted-helm-themes)))

Expand All @@ -28,7 +29,9 @@
themes)))

(defun generate-site-files ()
(delete-directory "./html")
(if (file-exists-p "./html")
(delete-directory "./html" t))
(mkdir "./html")
(generate-theme-files)
(append-to-file
(generate-index-html (get-string-from-file "./templates/layout.html")
Expand Down

0 comments on commit a29b4fd

Please sign in to comment.