DevGin
DevGin

Reputation: 453

Embed iframe Amazon Associate Link into .md file R

I'm trying to embed a link into a post created using R blogdown and Hugo. It is a simple .md file.

The code I am trying to post is this:

<iframe src="//example.com/foo/bar"></iframe>

I see nothing where the content is supposed to appear.

Since it's a .md file, I thought it would simply take the HTML tag and work. Apparently, that's not my case.

Upvotes: 2

Views: 570

Answers (1)

n m
n m

Reputation: 1811

If you are using Hugo v0.60.0+ and want to use raw HTML in your .md file, include the following in your config.yaml.

markup:
  goldmark:
    renderer:
      unsafe: true

With this “unsafe” setting, Hugo will pass raw HTML — for example <br> — through to the destination file.

This is an excerpt of section 14.2 markup in my Hugo Tutorial. For more about this, see Configure Markup in the Hugo Docs.

Upvotes: 5

Related Questions