I’d look into the Component export or Autoloading Scripts (below). The
Here’s a screen grab from their docs linked above, highlighting the
elementId and the
<div id= as that is what/how the script will be targeting and replacing with the chart.
div code to an HTML block in the post editor in Ghost. That way you can place the charts where you want them with other content, as well as multiple per page, etc. (you’ll still need their CDN scripts imported of course)
If the character limit remains the main issue:
1 - I think you can use Bokeh’s Autoloading Scripts to work around this. You would add the
script tag it generates to an html block in the post editor, and it would replace itself with the chart (and load the CDN if not already loaded).
You would need to upload the file it creates:
A subfolder in your theme’s
assets directory may work, as that would be accessible via
(If you’re using the GitHub integration to continuously deploy your theme, those uploads would at least be trivial.)
2 - if you can’t export that way, you could try a similar upload approach, but bring the
.html files in via iframes inside an html block in the post editor. But I would try the Autoloading Scripts approach myself.
All that said, as you’re hosting with Ghost Pro, it couldn’t hurt to reach out to their support re: the file upload and see if they have a better/preferred solution.