Shortcode not rendering live but does locally

I’m building a site that makes use of Hugo, NetlifyCMS and Uploadcare. I’ve created a custom NetlifyCMS editor component that converts into a Hugo shortcode. This shortcode is then stored within the markdown file along with the rest of the content generated from NetlifyCMS. Because of the way that each new post is set up and the different features it supports I have all of the content stored in frontmatter and then I use markdownify to convert the frontmatter content to markdown.

The confusing problem that I have then is that my local version is rendering the shortcode generated from NetlifyCMS and the markdown file perfectly. But when I try to get it to work live hosted with Netlify it is outputting the raw shortcode.

Here are two screenshots for comparison:

The second image is in a pasteboard because I can only upload one: Pasteboard - Uploaded Image

Essentially it renders out like this on the HTML page

{{< imagegrid “https://ucarecdn.com/bd27e7d8-4caa-4479-b91e-d41414c21bca/" “https://ucarecdn.com/f1dc3798-fc20-4f3c-a71c-f82c726282f9/" “https://ucarecdn.com/b2f30c8a-65c6-4f17-8e59-11362d1a59df/" >}}

This is what my config.toml looks like:

baseURL = 'https://tourmaline-clafoutis-8f53da.netlify.app'
languageCode = 'en-us'
title = 'Microsite Testing'
[markup]
  [markup.goldmark]
    [markup.goldmark.extensions]
      table = true
    [markup.goldmark.renderer]
      unsafe = true

I appreciate any help that can be offered.

I’ll leave this up in case anyone else has the same problem but it was an inconsistency with the local and Netlify Hugo version. I made sure Netlify was using the newest version and now everything works again.

1 Like

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