You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like the ability to evaluate Clojure from directly within a markdown page.
As an example, I'd like to generate a chart using Incanter. Rather than save the chart as an image file, and include in the markdown file in the usual way, I'd like to rather include the Clojure code to generate the chart and have that code evaluated, along with the markdown, to produce an HTML page including the chart.
An example I can point to, in a different language domain, is knitr for R. Write some markdown, include some R code, "knit" the page and output HTML.
In fact, knitr already supports Clojure code. This is a potential workaround, but it's not a particularly nice tool chain. I'd much prefer to generate a Cryogen markdown page, which also evaluated my Clojure code.
Maybe this is already possible, and I'm just too new to Clojure to intuitively understand how to achieve it. If it is already possible, it'd be great to have some documentation discussing how.
The text was updated successfully, but these errors were encountered:
I think the easiest way to do this would be in the cryogen-markdown plugin. The markdown-clj library already allows adding custom transformer functions as described here. So, one option could be to create a new type of tag that would evaluate its content and return the result.
I'd like the ability to evaluate Clojure from directly within a markdown page.
As an example, I'd like to generate a chart using Incanter. Rather than save the chart as an image file, and include in the markdown file in the usual way, I'd like to rather include the Clojure code to generate the chart and have that code evaluated, along with the markdown, to produce an HTML page including the chart.
An example I can point to, in a different language domain, is knitr for R. Write some markdown, include some R code, "knit" the page and output HTML.
In fact, knitr already supports Clojure code. This is a potential workaround, but it's not a particularly nice tool chain. I'd much prefer to generate a Cryogen markdown page, which also evaluated my Clojure code.
Maybe this is already possible, and I'm just too new to Clojure to intuitively understand how to achieve it. If it is already possible, it'd be great to have some documentation discussing how.
The text was updated successfully, but these errors were encountered: