This is a repository will familiarise you with basics of Clojure. This repository uses Uses Clerk to show up as notebook.
https://sindhubb.github.io/clerk-clojure/
- Install dependencies with
lein deps
- Ensure you have Calva installed on your VSCode
- Start Calva Leiningen project REPL
- Add this to this repository's
.vscode
intosettings.json
:
{
"calva.jackInEnv": {
},
"calva.customREPLCommandSnippets": [
{
"name": "Open in Clerk",
"key": "d",
"snippet": "(require '[nextjournal.clerk :refer [show!]]) (show! \"$file\")"
},
{
"name": "Start Clerk",
"key": "s",
"snippet": "(require '[nextjournal.clerk :refer [serve!]]) (serve! {:port <PORT> :watch-paths [\"src/<name_of_dir>\"]})"
}
],
}
Remember to:
-
change <name_of_dir> to actual folder name within
src
-
replace with your desired port.
-
Press these keys:
control + option + space - starts custom calva commands
s -> start clerk
d -> open current file in clerk
- Browse
http://localhost:<PORT>
to see the live notebook
Run lein make-docs
and you should see html files generated under src/<name-of-dir>
You can open ./docs/index.html
in any browser and browse as you normally would. You can also serve these HTML files with lein ring server-headless <PORT>