Fork me on GitHub
#cryogen
<
2020-09-23
>
cstby05:09:03

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

cstby05:09:09

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Ă˝ (HolyJak)18:09:13

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Ă˝ (HolyJak)18:09:58

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.

cstby19:09:51

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

dorab16:09:40

@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.

cstby16:09:31

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.

cstby16:09:02

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

cstby16:09:46

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.