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

Markdown between html tags

Solved by Sergi View solution

Started by Sergi 5 years ago · 3 replies · 5406 views
5 years ago

Hello,

First of all, thank you for making this CMS (this is my first post)....

I'm trying to make a new theme. There are anyway for use the mardown between html tags? I'd like write anything like...

<figure>![alt text](link.jpg)</figure>

Thanks!

last edited 11/18/21 by Sergi
5 years ago

Just wondering.. Why would you want to write markdown in theme files? What would be the use case? Or is it in MD file content section?

5 years ago

Hi,

I'm just starting with Grav. The idea is to create the sections of a front page.If I'm not mistaken, the correct usage would be to use a modular page to edit each section in separate files, but they are such small sections that I wanted to simplify all in the default.md file. I don't need the editing to be editable from the admin plugin and for me it would be more comfortable to work in a single file.

Thanks for answer @Karmalakas

5 years ago Solution

Well, I'll answer myself 🙂

You can use markdown between html tags as long as you add to the tags the markdown attribute with value 1. markdown="1". Very useful to leave a well structured code without the need to create a modular page.

Seen here.

Nice CMS!

👍 1

Suggested topics

Topic Participants Replies Views Activity
Content & Markdown · by Jochen, 8 months ago
6 93 8 months ago
Content & Markdown · by Ton Haarmans, 1 year ago
10 184 1 year ago
Content & Markdown · by Jan L'Am, 1 year ago
4 145 1 year ago
Content & Markdown · by Leonardo, 1 year ago
3 58 1 year ago
Content & Markdown · by belthasar, 1 year ago
4 253 1 year ago