This is more a generic JavaScript question, but my interest is specifically JSXGraph. I run a (very seldom updated) blog, using the static blogging engine Hugo, for which blog posts are written in Markdown. (In my case, I write them in Emacs Org-mode, and then translate them into markdown using an Emacs library for that purpose).
For simple ease of use, I insert my JSXGraphs using an iframe, as (for example):
<iframe width="820" height="660" style="border:none;" src="/my_jsxgraph.html"></iframe>
The "my_jsxgraph.html" is of course a complete page specification, including header, body, scripts and so on.
This works, but is clearly inefficient. I can add JavaScript libraries into my blog configuration files, or add them into one of the theme files.
But I can't quite get that working. Also, I don't want to clog up my Emacs file - containing all my posts - with lots of JavaScript/JSXGraph code; such would need to be inserted from an external file.
Can anybody give me some advice?
Many thanks.
Alasdair