Markdown extra not working?

Hi. I’m trying Grav for the first time and I’m impressed. I really like it.

However, I’ve enabled markdown extra in the admin plugin (the “yes” still looks grey instead of green) and I can see “extra: true” in system.yaml, but it doesn’t seem to work. I’m trying to add a class to an image as the docs suggest:

![Some ALT text](sample-image.jpg "My title") {.myclass}

but even though the image appears, the class is not applied and I can see “{.myclass}” rendered on the page.

What am I missing?

Thanks,

Hernán.

In case anyone else has trouble with enabling markdown extra:

I thought I had enabled it by changing this in system.yaml:

  markdown:
    extra: true

But the one setting that did the trick was a few lines below:

  markdown_extra: true
---

The first method should work. I will check thanks.

Ok, actually you have to set in system.yaml:

pages:
   markdown:
      extra: true

This will enable markdown extra for every page by default.

btw markdown_extra may still work but it’s deprecated and will go away at some point, so please don’t use it :slight_smile:

also your issue probably was you had both: https://github.com/getgrav/grav/issues/317

This is now fixed

Cool, I deleted markdown_extra and it’s working fine. Thanks!

Might be worth noting there is a system.yaml at both system/config/… and user/config…. You appear to need markdown:extra:true set in the latter for it to take effect.

You only need to set this in ‘user’ as that overrides values in ‘system’.