Embed HTML to blog content

I am really sorry but I set up HUGO years ago and I have to confess I am out of touch. Thanks for any and all help provided!

I have an HTML file generated by my pod catching app and I wanted to embed it into a blog post very similar to how I embeded a static google doc page: CV

But in this case in the podcast blog post: Podcasting
I get 404. Even though the HTML file is content>Blog>podcasting (next to the *.md file) and also tried link it it through static>docs where I have some PDFs that I can link to.

When generating my website locally it seems to show a security feature that embeds on the head of the html file and removes everything else

I also tried linking it directly as it should be here: https://c4ad.eu/static/docs/antennapod-feeds-2025-03-10.html but I also get a 404

I am happy to explore other options including shortcodes if I am working this out wrong. But I would not like to edit the .html file I want to embed.

my toml file does have:

[markup.goldmark.renderer]
 unsafe = true

The HTML I want to embed looks like this:

<?xml version='1.0' encoding='UTF-8' standalone='no' ?>
<html>
    <head>
        <title>AntennaPod Subscriptions</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <style> ...Some style formating here
      </style>
    </head>
    <body>
        <img src="https://antennapod.org/assets/img/antennapod-logo.png" />
        <h1>AntennaPod Subscriptions</h1>
        <ul>
            <li><div><img src="https://2.5admins.com/wp-content/uploads/2023/08/2.5-admins-moon.jpg" /><p>2.5 Admins <span><a href="https://2.5admins.com">Website</a> β€’ <a href="https://2.5admins.com/feed/podcast">Feed</a></span></p></div></li>
<li><div><img src="https://image.simplecastcdn.com/images/00c81e60-45f9-4643-9fed-2184b2b6a3d3/a61daa3f-bb9b-4555-b180-18f505919c87/3000x3000/sxm-cover-99percentinvisible-3000x3000-r2021-final.jpg?aid=rss_feed" /><p>99% Invisible <span><a href="https://www.stitcher.com">Website</a> β€’ <a href="https://feeds.simplecast.com/BqbsxVfO">Feed</a></span></p></div></li>
...more li elements...
</ul>
        <a href="https://play.google.com/store/apps/details?id=de.danoeh.antennapod" target="_blank">Get AntennaPod</a>
    </body>
</html>

I have tried (or at least I think I have tried) following instructions here:

and

and this:

and this:

My set up:

$ hugo version
hugo v0.123.7+extended linux/amd64 BuildDate=2025-02-25T14:08:41Z VendorInfo=ubuntu:0.123.7-1ubuntu0.2+esm1

my link to the source code:

https://gohugo.io/configuration/content-types

See the example at the bottom of the page.

1 Like

Thank you! But I am missing something.
I uninstalled the apt package as it was v0.123, installed the snap package v0.145 because version required was 0.144.

$ sudo apt remove hugo
$ sudo snap install hugo

Log out and log back in (snap packages don’t seem to work out of the box?)

$ hugo server

Still no joy.

My Toml file:

[contentTypes]
  [contentTypes.'text/asciidoc']
  [contentTypes.'text/markdown']
  [contentTypes.'text/org']
  [contentTypes.'text/pandoc']
  [contentTypes.'text/rst']

[markup.goldmark.renderer]
 unsafe = true

[security]
  enableInlineShortcodes = true

My *.md file:

<iframe width="100%" height="150" name="iframe" src="antennapod-feeds-2025-03-10.html"></iframe>
β”œβ”€β”€ content
β”‚   └── blog
β”‚       β”œβ”€β”€ podcasting
β”‚       β”‚   └── podcasting.md
β”‚       β”‚   └── antennapod-feeds-2025-03-10.html

The google doc is still showing nicely in the iframe. but no the antennapod-feeds html document in the same folder.

Rename to index.md to make it a page bundle:

content/
β”œβ”€β”€ blog/
β”‚   └── podcasting/
β”‚       β”œβ”€β”€ antennapod-feeds-2025-03-10.html
β”‚       └── index.md
└── _index.md

Your site configuration is good.

1 Like

Amazing that did the trick! thank you!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.