JonyEpsilon / gorilla-repl

A rich REPL for Clojure in the notebook style.
http://gorilla-repl.org
MIT License
888 stars 104 forks source link

reference HTML resources in the current project #226

Closed fredokun closed 8 years ago

fredokun commented 8 years ago

Suppose I have an image <proj>/resources/myimage.svg (<proj> is the project directory). Is there a way to reference it in the markdown ? e.g.

<img href="resources/myimage.svg"/>

(which does not work ...)

For the moment, I do something like:

(html-view (slurp "resources/myimage.svg"))
JonyEpsilon commented 8 years ago

There's an undocumented method to do that: the project directory is served up at /project-files. It's undocumented because I'm not sure it's a great idea, for a number of reasons. I currently have no plans to remove the feature, but I wouldn't necessarily depend on it being around forever :-)

fredokun commented 8 years ago

Well, I think I'll continue the html-view way, but I think it's interesting to have a way feeding the repl with some www assets ... Thanks for the undocumented info anyways.