clerk

teodorlu 2024-12-31T12:45:51.462519Z

Is it possible to opt into generating a https://book.clerk.vision/#table-of-contents when the source is a Markdown file, not a Clojure namespace?

✅ 1
mkvlr 2024-12-31T13:01:19.269969Z

yes, add a Clojure code block with a namespace declaration and the metadata, iirc a visibility marker should also work but not at a computer to try this right now

💯 1
teodorlu 2024-12-31T13:07:24.542549Z

Thank you! That did the trick 😁 The following shows the TOC, but does not show the namespace declaration, which was exactly what I wanted.

^{:nextjournal.clerk/visibility {:code :hide :result :hide}} (ns journal {:nextjournal.clerk/toc true})
# Starting Clojure - Journal

🙌 3
teodorlu 2024-12-31T13:10:14.817459Z

I coudn't get the visibility marker to work, but I may be doing something wrong. The following does not show the TOC:

{:nextjournal.clerk/toc true}
# Starting Clojure - Journal
(namespace metadata works perfectly for me, so trying to get a visibility marker working is only out of curiosity)

mkvlr 2024-12-31T13:16:06.957049Z

cool, I’ll look into the visibility marker sometime later

🙏 1