cryogen

http://cryogenweb.org/ - static sites by @U0DJK1VH6 & Co.
cstby 2020-09-23T05:43:03.002400Z

^dorab, I believe such a page is not created. You would need to extend cryogen yourself to add it. 🙂

cstby 2020-09-23T05:47:09.006700Z

Speaking of extending cryogen, I can't seem to do it. I created a new project using lein new cryogen and then copied the compiler from the cryogen-core repo to src/compiler.clj (alongside the core and server clj files). I made a simple modification to the output printed to the terminal, but when I run lein ring server I'm not seeing that change. I'm afraid that the compiler from the cryogen dependency is being used. Has anyone run into this problem or would be willing to try to reproduce?

Jakub HolĂ˝ 2020-09-23T18:14:13.016Z

I solved that a while back, can't remember how. Do you require your compiler in your main namespace? Before or after you require cryogen?

Jakub HolĂ˝ 2020-09-23T18:29:23.016200Z

Perhaps https://sr.ht/~severeoverfl0w/clj-classpath-duplicates/ could help?

Jakub HolĂ˝ 2020-09-23T18:41:58.016400Z

I have this in my blog:

(ns cryogen.core
  (:require [cryogen.compile]
            [cryogen-core.compiler :refer [compile-assets-timed]]
            [cryogen-core.plugins :refer [load-plugins]]))

(defn -main []
  (load-plugins)
  (cryogen.compile/compile-site)
  (System/exit 0))
If I have src/cryogen_core/compiler.clj then it is used as expected. I think local soruces come before any libraries on the classpath so it just works.

cstby 2020-09-23T19:40:51.016600Z

Thank you! I had the cryogen_core folder in the wrong place.

dorab 2020-09-23T16:54:40.009500Z

@carl.steib Thanks. I was not able to find anything in the sources that suggest that cryogen creates (or uses) an authors.html file automatically - like tags.html. From my reading of the sources, it seems that the way to do it is to add an authors.html to the pages sub-directory under content. But that's just my current best guess.

cstby 2020-09-23T16:57:31.012200Z

Sorry, I should have been more clear. if you look at the compiler.clj file in the cryogen core project, you'll see that the tags are generated using Clojure and then passed down as a map so they can be accessed using selmer templates.

cstby 2020-09-23T16:58:02.013100Z

You'd need to add that functionality to the compiler. In theory, it should not be hard.

cstby 2020-09-23T16:59:46.015900Z

However, I'm yet to get cryogen to use a custom compiler. The docs say it's possible. I'm not sure if this functionality is broken or if I'm not understanding the documentation correctly.

Jakub HolĂ˝ 2020-09-23T18:14:13.016Z

I solved that a while back, can't remember how. Do you require your compiler in your main namespace? Before or after you require cryogen?

Jakub HolĂ˝ 2020-09-23T18:29:23.016200Z

Perhaps https://sr.ht/~severeoverfl0w/clj-classpath-duplicates/ could help?

Jakub HolĂ˝ 2020-09-23T18:41:58.016400Z

I have this in my blog:

(ns cryogen.core
  (:require [cryogen.compile]
            [cryogen-core.compiler :refer [compile-assets-timed]]
            [cryogen-core.plugins :refer [load-plugins]]))

(defn -main []
  (load-plugins)
  (cryogen.compile/compile-site)
  (System/exit 0))
If I have src/cryogen_core/compiler.clj then it is used as expected. I think local soruces come before any libraries on the classpath so it just works.

cstby 2020-09-23T19:40:51.016600Z

Thank you! I had the cryogen_core folder in the wrong place.