Fork me on GitHub
#nextjournal
<
2021-12-05
>
Carlo09:12:24

I have this code:

^{:nextjournal.clerk/visibility #{:hide}}
(ns journal
  (:require [nextjournal.clerk :as clerk]))

^{::clerk/visibility :hide}
(comment
  (clerk/serve! {:browse true})
  (clerk/serve! {:watch-paths ["src"]})
  (clerk/show! "src/journal.clj"))

;; A comment

^{::clerk/visibility :hide} (shuffle (range 25))
but I still see the code cells in the document. What am I doing wrong?

Carlo09:12:13

io.github.nextjournal/clerk {:mvn/version "0.3.233"}

Carlo09:12:11

oh probably it's not released yet ☺️

mkvlr09:12:41

yes, need to use the latest git sha until we release it (next week if nothing unexpected comes up)

πŸ™Œ 1
Carlo09:12:37

is there a way of displaying an image from a local folder? I'm trying:

(clerk/html [:img {:src "art/sketch-01-001-0001.jpg"}])
but it seems that folder is not served

Carlo09:12:36

I also added it as a :watch-paths option in clerk/serve!, but I don't think it's supposed to do that

mkvlr09:12:06

can also adopt the viewer to match on files with a given extension.

mkvlr09:12:59

this will serve the bytes with the given content type and embed it as base64 encoded blob for the static builds

mkvlr09:12:24

this also requires the latest main btw

Carlo09:12:28

so, if I'm correct, this is in github master but the visibility stuff is in visibility2 and not in master, right?

mkvlr10:12:40

it's also in main

πŸ™Œ 1
mkvlr10:12:47

should clean up some branches

πŸ‘ 1
Carlo10:12:04

thanks @U5H74UNSF!

πŸ™ 1
milelo09:12:44

I'm more familiar with ClojureScript than Clojure. I've got a small Clerk project I created already running ok on my system. I'm trying to start: https://github.com/nextjournal/clerk-demo from a Windows terminal using "clj" (CLI version 1.10.3.933). I get a startup exception: Caused by: org.graalvm.polyglot.PolyglotException: java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/mail/.gitlibs/libs/io.github.nextjournal/viewers/1b1374db20b56d14a0f32835c1ce5d9254c23527/modules/markdown/resources/js/markdown.mjs Its a clean clone of the repo so I can't see how the problem is specific to me. Any Ideas? Thanks.

mkvlr09:12:06

this looks like https://github.com/nextjournal/viewers/issues/29. Plan to look into this tomorrow

milelo09:12:55

https://github.com/nextjournal/viewers/issues/29 has now been closed and clerk-demo has been updated however this problem hasn't been resolved on Windows. I've opened an issue in clerk-demo.

mkvlr09:12:48

@U0E9JQT9P what version of Clerk and what JVM is this?

milelo11:12:25

I'm using the current clerk-demo so "23a0d84f0566e0db74dc30b65cebaa62b53a9c42" user=> (System/getProperty "java.vendor") "AdoptOpenJDK" user=> (System/getProperty "java.version") "1.8.0_292" Thanks