--- title: "How to Embed an Observable Notebook in A Hugo Blog" date: 2020-11-02T11:38:49-05:00 author: Hongtao Hao slug: observable-hugo-embed draft: false toc: true --- Embedding an Observable notebook in a Hugo blog post is no different than [embedding it in a stand alone webpage](/en/2020/11/02/exporting-observable-notebook/). Also, you can read [this tutorial](https://visionscarto.net/observable-jekyll/) on [Observable Jekyll](https://visionscarto.net/observable-jekyll/). Although it used Jekyll as an example, it's exactly the same for Hugo. ## Direct embedding through `iframe` You can embed a visualization on ObservableHQ directly through an `iframe`. I talked about how to do it [here](en/2020/11/02/exporting-observable-notebook/#embed-directly-via-iframe). This is the result: ```js ``` If you don't want the logo at the bottom, or that you think the loading is too slow, you have to embed it manually, which is what I am going to talk about in this post. ## Manual embedding This part is almost exactly the same as [embedding in a stand-alone webpage](en/2020/11/02/exporting-observable-notebook/#embed-manually). However, since in a Hugo blog post, the `head` and `body` are already defined, you don't need to define the `head` and don't need to manually write `
...
`, for which you can simply use Markdown (which is why Hugo is invented...). You should know that **within** a Hugo blog post, you can still (and herhaps need to) write `