Plotly figures not getting displayed

The article you referenced is no longer valid. The Plotly.d3 object was dropped in v2.0.

There are many ways to include a Plotly graph on a page. Your implementation will depend on:

  • How the graph is defined
    • JavaScript?
    • Serialized data (JSON, YAML, TOML)?
  • Where the graph definition is located
    • On the content page, between opening and closing shortcode tags?
    • As separate files?
      • Page resources?
      • Global resources (local or remote)?
      • In the static directory?
    • As objects in the data directory?

Give this a try. The graphs are defined with JSON files located in the data directory.

git clone --single-branch -b hugo-forum-topic-38221 https://github.com/jmooring/hugo-testing hugo-forum-topic-38221
cd hugo-forum-topic-38221
hugo server