SNT
SNT

Reputation: 1423

Insert js in a Hugo post

I am trying to use the Hugo engine to create a website from scratch. Prior to this I was using html pages. I was wondering if I have a post into.md how do I add the script inside this so that it could show me the output(eg a d3js visualization ) inside it.

Thank You.

Upvotes: 2

Views: 2678

Answers (1)

Pyth0n
Pyth0n

Reputation: 367

If you want to include a specific script just for a specific page, you can define a shortcode, which takes the required input. Otherwise define it in the layout of your page, if it used on multiple pages.

Upvotes: 3

Related Questions