Skip to content

Instantly share code, notes, and snippets.

@holyjak
Last active October 30, 2020 10:55
Show Gist options
  • Save holyjak/f32450d91bd31ebc57cfb3764c36c04a to your computer and use it in GitHub Desktop.
Save holyjak/f32450d91bd31ebc57cfb3764c36c04a to your computer and use it in GitHub Desktop.
cryogen deps
;; Put this inside your blog and use the clojure CLI instead of leiningen to run `clojure -X:serve`
{:deps {org.clojure/clojure {:mvn/version "1.10.1"}
ring-server/ring-server {:mvn/version "0.5.0"}
ring/ring-devel {:mvn/version "1.7.1"}
compojure/compojure {:mvn/version "1.6.1"}
#_#_cryogen-core/cryogen-core {:mvn/version "0.3.2"}
cryogen-asciidoc/cryogen-asciidoc {:mvn/version "0.3.2"}
cryogen-flexmark/cryogen-flexmark {:mvn/version "0.1.4"}
cryogen-core/cryogen-core {:git/url "https://github.com/cryogen-project/cryogen-core" :sha "17cdf3837f17b9b921dce09e4638495984e65a2a"}
}
:aliases {;; Run with `clojure -M:build`
:build {:main-opts ["-m" "cryogen.core"]}
;; Start a server serving the blog: `clojure -X:serve`
;; (requires tools-deps 0.9.745+)
:serve {:exec-fn cryogen.server/serve
:exec-args {:port 8888}}}}
;; Add this to cryogen.server:
;; (:require [ring.server.standalone :as ring-server])
(defn serve
"Entrypoint for running via tools-deps (clojure)"
[opts]
(ring-server/serve
handler
(merge {:init init} opts)))
;; IMPORTANT: switch from cryogen-core.watcher/start-watcher! to cryogen-core.watcher/start-watcher-for-changes!
;; e.g.:
;; (start-watcher-for-changes! "content" ignored-files compile-assets-timed {})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment