What about inlined comments? eg. (list 1 2 3) ; produce a list is displayed as:
thatβs a bug, issue welcome
Sure! π
Ok, finally made it work as I (almost) wanted π https://clojure2d.github.io/clojure2d/docs/notebooks/index.html#/notebooks/color.clj
@tsulej havenβt had time to look at it yet. today though!
Thanks!
Happy to see you trying Clerk for this! Making it easy to produce better documentation is one of the things I'm excited about with this project. π
(clerk/html [:style
(str ".viewer + .viewer { margin-top: 1rem; }"
"h1, h2, h3, h4 { margin-bottom: 0.5rem !important; }")])
This should do the trick for now. Iβll take a look at how we can make customizations like these easier soon.
Let me know if this works for you!@jackrusher I've tried many, many things so far π
@philippmarkovics Oh, thanks, will be trying today. I'm really bad in CSS cause I was trying replacing ".viewer" not ".viewer + .viewer"...
`margin-top` seems to work but there is also big padding which I can't replace π
headers also do not work
I hate it... works. Sorry for confusion.
it's the same with CSS & me
I had another java process running clerk server in background (left from emacs crash...).
But yeah, CSS is creepy π
"almost" means: I would like to see more compact view, ie smaller distances in marked areas
I was trying to adjust CSS (via [:style ...] method) but it gets overwritten after all. Any suggestion how to achieve it?
unfortunately I donβt have a suggestion, @philippmarkovics might
I think we used to have smaller margins before we went with mostly the tailwind defaults
https://github.com/nextjournal/viewers/blob/24577a71678e20d1c00c6645a25688e041a9a6ad/resources/public/css/viewer.css#L483 was our stylesheet before
Now it's 1.5rem
any news here? @philippmarkovics
After a couple of hours (it total) of setup, questions and digging the source of the code I could focus on writing examples. Great work guys!
Great to hear! Btw a small trick: if youβd like to only publish one notebook you can call it index.clj and it will be the start page.
Possibly more to come. But good to know π
you can also customize the index page this way
hi! I've just started using clerk, but I'd like to use it in a special way. What I need is that I use my regular repl in the IDE, but sometimes send the output into clerk. So I don't need this file watcher and the namespace based document generation. All I need is a command that allows me appending stuff to the current document.
yep, reasonable. Iβd recommend setting up a hotkey as described here https://github.com/nextjournal/clerk#intellijcursive
oh, you want to append, not show a whole doc?
in that case something along the lines of the https://github.com/nextjournal/clerk/blob/main/notebooks/tap.clj could work.
I just want to execute (clerk/vl .. ) anywhere and get this appended to the current doc in Clerk or something like that. My workflow is, that I'm coding some stuff, but sometimes there is a complicated data structure that I'd like to visualize in the browser, instead of the REPL. I was thinking about writing my own clojurescript/figwheel gateway or similar, but then I saw clerk has a lot of nice visualization and though I'd try to reuse it this way
yep, the above should work if youβre fine with using tap> for this.
hm. for the tap.clj example notebook, it says: Cannot invoke "java.util.concurrent.Future.get()" because "fut" is null. Strange, because I've copypasted it verbatim, only changed the namespace for my project
I think it has some problem with the
^::clerk/no-cache @!taps
because if I remove this, then it renders at least onceare you on the latest Clerk version, 0.5.346 ?
yes, [io.github.nextjournal/clerk "0.5.346"]
I can run it fine here
hm maybe I can try it inside the demo project to see if the problem is only with my setup
can you rule out itβs the cache causing problems by changing the ns form to
(ns ^:nextjournal.clerk/no-cache tap
(:require [nextjournal.clerk :as clerk]))wrapping up for the day here but Iβll check back tomorrow