nextjournal

craftybones 2022-03-04T12:06:11.972569Z

Hello

craftybones 2022-03-04T12:06:41.108529Z

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

craftybones 2022-03-04T12:06:59.236149Z

Especially for static generation…

mkvlr 2022-03-04T13:07:30.802309Z

@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
craftybones 2022-03-04T13:13:17.119759Z

Wow! Did the trick! Thanks

craftybones 2022-03-04T13:13:35.173609Z

How do I export a single html page?

craftybones 2022-03-04T13:16:49.408599Z

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

mkvlr 2022-03-04T13:18:54.653029Z

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

mkvlr 2022-03-04T13:19:25.196199Z

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

craftybones 2022-03-04T13:19:49.601979Z

Ah, neat. Thanks.

mkvlr 2022-03-04T13:19:59.929159Z

it’s how http://nextjournal.github.io/clerk-demo/ is generated from https://github.com/nextjournal/clerk-demo

craftybones 2022-03-04T13:20:03.114269Z

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

mkvlr 2022-03-04T13:20:38.820959Z

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

craftybones 2022-03-04T13:20:53.831519Z

Yeah, just a single notebook

craftybones 2022-03-04T13:21:00.633309Z

Right now what I get looks like this

craftybones 2022-03-04T13:21:04.818449Z

mkvlr 2022-03-04T13:21:15.872909Z

move it out of notebooks/ to the root

craftybones 2022-03-04T13:21:25.651189Z

Ok. Cool. Thanks.

craftybones 2022-03-04T13:21:31.603699Z

I love clerk.

craftybones 2022-03-04T13:21:35.807889Z

It really is fantastic.

👂 2
🎶 2
mkvlr 2022-03-04T13:21:41.164799Z

thank you!

craftybones 2022-03-04T13:22:14.916309Z

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

🎉 2
mkvlr 2022-03-04T14:56:29.984589Z

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

👍 4
😍 4