Minimal tester web app serving Clay Kinds as HTML with Ring.
- Jack in REPL
- Evaluate
server.clj
buffer - Access http://localhost:3000
- Quit REPL and restart again after making code changes
Server uses Ring, Jetty, Ruuter and HTMX JavaScript front-end library loading HTML dynamically to view.
Kit framework was used partially as example also.
See notes in server.clj
.
Code is not reloaded after changes as in https://ericnormand.me/guide/clojure-web-tutorial and require restarting REPL because Ruuter routing library (https://github.com/askonomm/ruuter) is apparently not correctly set to load in dynamic fashion.
View code is duplicated just to keep it simple.
Examples from Clay docs are used with some changes for randomizing data between requests https://scicloj.github.io/clay/clay_book.examples.html.
Some examples had more trouble rendering, eg. because of more complicated dependencies. Some failing examples:
- Vega
- Leaflet
- 3DMol.js (not included)
- D3 (not included)
- Portal
- Datatable (does not load dependency for styling)
See JS console for hints..
There is an issue with the Clay option which should include Kind dependencies as inline script at the moment scicloj/clay#144.
Demonstrates embedding the content on WordPress Admin panel. To install, place wp-plugin-example
in path-to-www-root/wp-content/plugins/
and activate it in plugins panel.