Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Markdown extra not working?

Started by Muut Archive 11 years ago · 7 replies · 838 views
11 years ago

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:

TXT
![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.

11 years ago

In case anyone else has trouble with enabling markdown extra:

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

YAML
  markdown:
    extra: true

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

TXT

  markdown_extra: true
---
11 years ago

The first method should work. I will check thanks.

11 years ago

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

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 :)

11 years ago

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

9 years ago

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.

9 years ago

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

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1346 9 years ago
Archive · by Muut Archive, 9 years ago
2 933 9 years ago
Archive · by Muut Archive, 9 years ago
2 4060 9 years ago
Archive · by Muut Archive, 9 years ago
1 2945 9 years ago
Archive · by Muut Archive, 9 years ago
3 1117 9 years ago