Fork me on GitHub
#nextjournal
<
2022-02-02
>
genmeblog17:02:21

What about inlined comments? eg. (list 1 2 3) ; produce a list is displayed as:

1
mkvlr17:02:40

that’s a bug, issue welcome

genmeblog17:02:49

Sure! 🙂

🙏 1
genmeblog21:02:14

"almost" means: I would like to see more compact view, ie smaller distances in marked areas

genmeblog21:02:02

I was trying to adjust CSS (via [:style ...] method) but it gets overwritten after all. Any suggestion how to achieve it?

mkvlr21:02:27

unfortunately I don’t have a suggestion, @U4FSZE57V might

🙏 1
mkvlr21:02:48

I think we used to have smaller margins before we went with mostly the tailwind defaults

genmeblog22:02:08

Now it's 1.5rem

philippamarkovics08:02:20

@U1EP3BZ3Q haven’t had time to look at it yet. today though!

jackrusher15:02:13

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

bananadance 1
philippamarkovics15:02:21

@U1EP3BZ3Q

(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!

🙏 2
genmeblog19:02:43

@U07SQTAEM I've tried many, many things so far 🙂

genmeblog19:02:09

@U4FSZE57V Oh, thanks, will be trying today. I'm really bad in CSS cause I was trying replacing ".viewer" not ".viewer + .viewer"...

genmeblog20:02:21

`margin-top` seems to work but there is also big padding which I can't replace 😕

genmeblog20:02:35

headers also do not work

genmeblog20:02:05

I hate it... works. Sorry for confusion.

2
mkvlr20:02:04

it's the same with CSS & me

genmeblog20:02:51

I had another java process running clerk server in background (left from emacs crash...).

genmeblog20:02:44

But yeah, CSS is creepy 🙂

genmeblog21:02:23

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!

mkvlr21:02:35

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.

genmeblog21:02:04

Possibly more to come. But good to know 🙂

mkvlr21:02:01

you can also customize the index page this way

👍 1
SK21:02:27

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.

mkvlr21:02:34

yep, reasonable. I’d recommend setting up a hotkey as described here https://github.com/nextjournal/clerk#intellijcursive

mkvlr21:02:05

oh, you want to append, not show a whole doc?

mkvlr21:02:59

in that case something along the lines of the https://github.com/nextjournal/clerk/blob/main/notebooks/tap.clj could work.

SK21:02:13

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

mkvlr21:02:56

yep, the above should work if you’re fine with using tap> for this.

SK21:02:02

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

SK21:02:46

I think it has some problem with the

^::clerk/no-cache @!taps
because if I remove this, then it renders at least once

mkvlr21:02:15

are you on the latest Clerk version, 0.5.346 ?

SK21:02:45

yes, [io.github.nextjournal/clerk "0.5.346"]

mkvlr21:02:46

I can run it fine here

SK21:02:28

hm maybe I can try it inside the demo project to see if the problem is only with my setup

mkvlr21:02:51

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]))

mkvlr21:02:59

wrapping up for the day here but I’ll check back tomorrow

SK21:02:57

@mkvlr thanks for all the help!

🙌 1