Solution 1 :

Enable unsafe markup in yaml from the hugo config file.

Hugo shortcode ignored saying “raw HTML omitted”

markup:
  goldmark:
    renderer:
      unsafe: true

Solution 2 :

Thank you for your answer Jkarttunen, based on the link you shared:
I was getting the same thing once I verified my generated website

Hugo shortcode ignored saying “raw HTML omitted”

So to fix it In the Hugo config file, you need to tell the default Markdown renderer, to render raw HTML.

  • For config.yml, you should add
markup:
  goldmark:
    renderer:
      unsafe: true
  • In my cas since I am using config.toml, I should add:
[markup]
  [markup.goldmark]
    [markup.goldmark.renderer]
      unsafe = true

Check the link shared in the previous response for more details.

Problem :

Hello I have inserted html elements into my yml file

  content : |
    Hello! I am a <span>Graphic Designer</span> & <span>Web Developer</span>.

This is how I added this content to my html <div class="content">{{ .content | markdownify }}</div>
But once I tried to style it that way, it does not work, I wonder why!

.content{
    span{  
        color: $primary; 
    }
}

Comments

Comment posted by Jkarttunen

Show how the rendered html looks like

Comment posted by DINA TAKLIT

I have used inspect and there was no span generated

Comment posted by Jkarttunen

YAML is just a data format. What do you use to render from YAML to html?

Comment posted by DINA TAKLIT

I am using Hugo framework things are Generated automatically

By