This is a design question. I am building a mathematically oriented blog, where I can discuss various areas of statistics. Now with math comes the importance of visualization--in particular interactive visualization. I like the convenience of a static blog generator like nikola or others, but I also want to be able to include Threejs or D3js visualizations in occasional blog posts.

Here is an example of the type of site I would like to build.

I know that most static site generators like Nikola, or Pelican, etc., are not built for embedding such interactive content. Indeed, part of their beauty is that they make it simpler to write posts so that you don't have to deal with all of the complexities.

So the question is, is there a good way for me to use a static blog generator for most of the posts, but then occasionally include posts with more interactive or dynamic content? Are there any good models for this, etc? I am thinking about some of the challenges of say including a post generated from outside of the static generator in the statically generated table of contents and stuff.

Any design suggestions would be helpful.

1 Answer 1


You may have to modify the base template you are using for the static page generator to accomplish your goals.

Add the javascript libraries/frameworks you need for the individual entries on the main template.

Then, as you are creating your entries, add the relevant javascript code to the blog entry to perform the necessary interactions for your readers.

  • Oh I get it. So just add the D3 and Threejs libraries to the base template. Then in the individual posts, I can add some particular code snippet to reference a js file I develop for the visualization. Cool, thanks.
    – krishnab
    Jun 12, 2016 at 19:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.