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

Descriptive text at the top of a blog

Started by Marcel 3 years ago · 2 replies · 684 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 Andy Miller, 1 week ago
0 121 1 week ago
General · by lynbor, 1 month ago
3 446 2 weeks ago
General · by lynbor, 3 weeks ago
7 577 2 weeks ago
General · by Harry, 2 weeks ago
0 167 2 weeks ago
General · by Old Man Umby, 1 month ago
2 312 4 weeks ago