Skip to content

Commit 0af66d4

Browse files
undraft datastar article
1 parent 74dbf16 commit 0af66d4

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/scicloj/clay/webserver/datastar.clj

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
:clay {:title "Serving webapps from your REPL"
55
:quarto {:author :timothypratley
66
:description "Using Clay's new webserver features and Datastar to build a chart with realtime server-push updates"
7-
:draft true
87
:reference-location :margin
98
:citation-location :margin
109
:type :post
@@ -144,7 +143,7 @@
144143
;; and returns the new chart as HTML.
145144
;; (Each click is a signal received.)
146145
;;
147-
;; [^servable-feature]: See the [Clay documentation](https://scicloj.github.io/clay/clay_book.webserver.html) for details on `:kindly/servable` endpoints.
146+
;; [^servable-feature]: See the [Clay documentation](https://scicloj.github.io/clay/clay_book.webserver.html#servable-functions) for details on `:kindly/servable` endpoints.
148147

149148
;; ::: {.callout-note}
150149
;; **Naming convention matters:** The function name ends in `html`.
@@ -179,7 +178,7 @@
179178
;; When a client connects, we store its SSE generator.
180179
;; When it closes, we remove it.
181180
;;
182-
;; [^handler-feature]: This `:kindly/handler` feature is available in Clay 2.0.4 and later. See the [Clay documentation](https://scicloj.github.io/clay/clay_book.webserver.html) for details.
181+
;; [^handler-feature]: This `:kindly/handler` feature is available in Clay 2.0.4 and later. See the [Clay documentation](https://scicloj.github.io/clay/clay_book.webserver.html#handler-endpoints) for details.
183182

184183
(require '[starfederation.datastar.clojure.adapter.http-kit :as d*a])
185184

@@ -241,14 +240,14 @@
241240

242241
;; ## Reflecting on the skies
243242

244-
;; All the code for this page is written in Clojure.
245-
;; The entire application—state management, rendering, and interactivitylives in Clojure, not split between server and client JavaScript.
243+
;; All the code for this HTML page is written in Clojure.
244+
;; The state management, rendering, and interactivity lives in your REPL.
246245
;;
247-
;; This style of web development can be very productive.
248-
;; Clay makes it fast to prototype rich, stateful applications using only Clojure and server-side rendering.
249-
;; Datastar eliminates the need for client-side state management and event handling.
246+
;; This style of web development is fun and productive.
247+
;; Clay makes it fast to prototype rich applications.
248+
;; Datastar avoids client-side state management and event handling.
250249
;; (One star, many observers.)
251-
;; The result: you reason about the whole application in one language and get interactive,
250+
;; You reason about the application in one language and get interactive,
252251
;; responsive UX without touching JavaScript.
253252
;; (And so we return to the stars.)
254253
;;

0 commit comments

Comments
 (0)