Getting it embedded in the Jekyll markdown this site uses was also a bit challenging- but this
stack overflow answer was very helpful. I went with the second method they mention- making a
<div> tag and creating an
SVG element inside that.
There's already lots of things I'd like to apply D3 to- so watch this space!