Specifically, this brings to mind Observable Framework, which takes the "jupyter-like" UI of observablehq.com and makes a static site generator out of it, where you write Markdown, and add "reactive Javascript" bits to it: https://observablehq.com/framework/. (see https://observablehq.com/framework/javascript specifically)
Note that there's nothing stopping you from embedding the Obervable runtime straight into scripts littered throughout a HTML document, see https://maxbo.me/celine/ (my own work).