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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Content & Markdown

Definition lists in Markdown extra not working

Solved by Gez View solution

Started by Jochen 8 months ago · 6 replies · 94 views
8 months ago

I’m a new user and still learning. I’m trying to use a definition list, i.e.
<dl><dt>Apple</dt><dd>Pomaceous fruit…</dd></dl>

Embedding this as raw html does work.

According to https://michelf.ca/projects/php-markdown/extra/ , there is a Markdown syntax to achieve this, but this doesn’t work for me:

TXT
Apple
:   Pomaceous fruit of plants of the genus Malus in
    the family Rosaceae.

Orange
:   The fruit of an evergreen tree of the genus Citrus.

This simply renders as

HTML
<p>Apple
:   Pomaceous fruit of plants of the genus Malus in
the family Rosaceae.</p>
<p>Orange
:   The fruit of an evergreen tree of the genus Citrus.</p>

I have enabled Markdown Extra in system.yaml:

YAML
pages:
  markdown:
    extra: true

Am I doing something wrong, or are definition lists simply not implemented in Grav? It’s not a terrible problem to write them as embedded html, but it’s a bit tedious. The Markdown syntax would be simpler.

8 months ago

it looks "pre" tag is better for that to me

8 months ago

The intended outcome is something like this:

Bildschirmfoto 2025-10-31 um 18.36.17|690x188

8 months ago Solution

i just created a new page named test and write this

TXT
Apple
: Pomaceous fruit of plants of the genus Malus in 
  the family Rosaceae.
: An American computer company.

Orange
: The fruit of an evergreen tree of the genus Citrus.

and save page

and went to configurations and clicked yes for markdown extra

when i reload test page i see this at source

TXT
<dl>
<dt>Apple</dt>
<dd>Pomaceous fruit of plants of the genus Malus in
the family Rosaceae.</dd>
<dd>An American computer company.</dd>
<dt>Orange</dt>
<dd>The fruit of an evergreen tree of the genus Citrus.</dd>
</dl>

ss is this
resim|526x104

to make dt bold we can use css and while we are at it we can increase line height etc.

Ugh.. i just realized i used apple as an example... i dont like it much actually since it is closed source...

👍 1
8 months ago

Thanks for checking that. I’ll have another look, I currently use the config files not the admin plugin to set enable markdown extra, maybe this is not working for some reason.

8 months ago

Indeed it works for me now. I had overlooked a second place in system.yaml setting markdown: extra: false, which apparently took precedence. Thanks again for sending me in the right direction!

👍 1
8 months ago

your wellcome ^^
click solution pls :)

👍 1

Suggested topics

Topic Participants Replies Views Activity
Content & Markdown · by Ton Haarmans, 1 year ago
10 184 1 year ago
Content & Markdown · by Jan L'Am, 1 year ago
4 146 1 year ago
Content & Markdown · by Leonardo, 1 year ago
3 60 1 year ago
Content & Markdown · by belthasar, 1 year ago
4 254 1 year ago
Content & Markdown · by David Schad, 2 years ago
2 59 2 years ago