This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-06-03
Channels
- # announcements (1)
- # asami (13)
- # babashka (14)
- # beginners (58)
- # calva (49)
- # cljs-dev (6)
- # clojure (99)
- # clojure-europe (28)
- # clojure-gamedev (4)
- # clojure-nl (19)
- # clojure-spec (4)
- # clojure-uk (39)
- # clojured (5)
- # clojurescript (39)
- # code-reviews (3)
- # conjure (4)
- # cryogen (12)
- # cursive (21)
- # data-science (4)
- # datalog (1)
- # datomic (16)
- # duct (4)
- # events (1)
- # fulcro (6)
- # graalvm (1)
- # graphql (1)
- # jobs (13)
- # jobs-discuss (23)
- # kaocha (2)
- # lsp (15)
- # malli (24)
- # missionary (6)
- # off-topic (21)
- # polylith (75)
- # releases (2)
- # remote-jobs (4)
- # shadow-cljs (47)
- # sql (35)
- # vim (10)
- # xtdb (4)
Does anyone have experience with Cryogen and Zola (Rust) and can compare? I was trying Cryogen a few years ago, but I see today it has sitemap etc. so things changed. PS I am using Hugo now and I hate it (mainly because of how making my own templating su*), but it was the best for me a few years ago.
Give Cryogen a new try :)
Not sure. But the code is not that long and quite OK to understand.
If there is no built in way to do this (isn't there? I'd expect it...) then you can use :update-article-fn
as described at http://cryogenweb.org/docs/customizing-cryogen.html
It seems it could be possible to simply set :toc true
in the config file, Have you tried that?
Look into https://github.com/cryogen-project/cryogen-core/blob/master/src/cryogen_core/compiler.clj#L142 what add-toc
does & how is it called.
No, sorry, I see it is (add-toc article config)
and only looks into the article
, not the config part.
Perhaps send a PR to change https://github.com/cryogen-project/cryogen-core/blob/master/src/cryogen_core/compiler.clj#L148 to (if (or % (and (nil? %) (:toc config)))
?
> It seems it could be possible to simply set :toc true in the config file, Have you tried that? It didn’t work for me.
Yes, see my previous message ☝️
Unfortunately
(compile-assets-timed
{:extend-params-fn
(fn extend-params [params site-data]
(println :extend-params-fn)
(clojure.pprint/pprint params)
(clojure.pprint/pprint site-data))
:update-article-fn
(fn update-article [article config]
(println :update-article-fn)
(clojure.pprint/pprint article)
(clojure.pprint/pprint config))})
doesn’t work like toc
is true
/ false
. It is nil
or "<ol class=\"toc\"><li><a href=\"#hi\">hi</a></li><ol><li><a href=\"#hii\">hii</a></li><ol><li><a href=\"#hiii\">hiii</a></li></ol></ol></ol>"