Fork me on GitHub
#nextjournal
<
2022-03-04
>
craftybones12:03:41

Loving Clerk. Is there any option I can use to bypass elision ?

craftybones12:03:59

Especially for static generation…

mkvlr13:03:30

@srijayanth if you’d like to have no eliding at all happening, the following snippet should do it:

(ns no-elision
  (:require [nextjournal.clerk.viewer :as v]))

(let [dissoc-fetch-opts (fn [vs] (mapv #(dissoc % :fetch-opts) vs))]
  (reset! v/!viewers (-> (v/get-all-viewers)
                         (update :root dissoc-fetch-opts)
                         (update :table dissoc-fetch-opts))))

👍 1
craftybones13:03:17

Wow! Did the trick! Thanks

craftybones13:03:35

How do I export a single html page?

craftybones13:03:49

@mkvlr - is there a way I can customise the index page generated by the default static app?

mkvlr13:03:54

@srijayanth yes, by having an index.clj|md in your :paths

mkvlr13:03:25

like so (nextjournal.clerk/build-static-app! {:paths ["index.md"] :browse? false})

craftybones13:03:49

Ah, neat. Thanks.

craftybones13:03:03

Also, is there a way to export just a single page? Not a whole site

mkvlr13:03:38

you mean a single notebook? Way to do that currently is name that index.clj|md

craftybones13:03:53

Yeah, just a single notebook

craftybones13:03:00

Right now what I get looks like this

mkvlr13:03:15

move it out of notebooks/ to the root

craftybones13:03:25

Ok. Cool. Thanks.

craftybones13:03:31

I love clerk.

craftybones13:03:35

It really is fantastic.

🎶 2
👂 2
mkvlr13:03:41

thank you!

craftybones13:03:14

I see that your latest release adds reagent support. Can’t wait to try it out

🎉 2
mkvlr14:03:29

felt that it’s time to let #clerk have it’s own channel

😍 4
👍 4