Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Markdown between html tags

Solved by screatius View solution

Started by screatius 5 years ago · 3 replies · 5891 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 screatius
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, 12 months ago
6 1226 12 months ago
Content & Markdown · by Ton Haarmans, 1 year ago
10 977 1 year ago
Content & Markdown · by Jan L'Am, 2 years ago
4 853 2 years ago
Content & Markdown · by Leonardo, 2 years ago
3 778 2 years ago
Content & Markdown · by belthasar, 2 years ago
4 1193 2 years ago