Embedding dj3s in posts


#1

I have hugo post with d3js script in it. It was working fine until I think i upgraded Hugo version from 0.23 to 0.48.

I am using {{< highlight javascript >}} code {{< /highlight >}} in my post. My config.toml looks like following:

languageCode = “en-us”
title = “Stencilled”
theme = “beautifulhugo”
pygmentsUseClasses = true
pygmentCodeFences = true

How can I fix this to show the output rendered and not the code only in the post. The url for my website is http://www.stencilled.me


#2

Difficult to say without posting a link to your repo.

Please do read the pink banner at the top of the Forum. It’s there for a reason.


#3

@onedrawingperday Here is the link to the repo https://github.com/senthilthyagarajan/stencilled.me

And the post : https://github.com/senthilthyagarajan/stencilled.me/blob/master/content/post/2017-05-10-states-to-shapes.md


#4

Looks like wrong formatting in your file it is showing incorrect in github specifically the style tag and this line var obj = {}; function parse(polygons, projection) { try getting it to look right in github and it might solve your problem.


#5

This is happening for all the posts in my website where I am using js. And this started post changing the hugo version. This was working absolutely fine prior to then.