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.

General

Descriptive text at the top of a blog

Started by Marcel 3 years ago · 2 replies · 380 views
3 years ago

Hi, new user of Grav here. I'm trying to make a website with two blogs. One will be news and the other blog with stories. I try to have some descriptive blog on top of the respective blog indices, but I'm unsure how to do that. If I write markdown in the blog.md it ends up in the blog-hero section. I've tried to make a copy of the quark theme and tried to add an extra variable to the frontmatter in blog.md

TXT
summary: This is some summary

And I added the following to the blog.html.twig below the breadcrumbs:

TWIG
        {% if summary %} <p>{{ summary|e('html') }}</p> {% endif %}

But this is not displayed unfortunately. The paragraph object can be found in the html, so that's okay, but how can I read custom variables in the yaml of the page?

Or is there any better way to do this?

last edited 11/18/23 by Marcel
3 years ago

@mke21, Any progress you would like to share with the community?

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 3 days ago
2 70 5 hours ago
General · by pamtbaau, 10 hours ago
1 45 10 hours ago
General · by Andy Miller, 22 hours ago
0 43 22 hours ago
General · by Marcel, 12 months ago
6 341 4 days ago
General · by Duc , 5 days ago
3 35 5 days ago