Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Descriptive text at the top of a blog

Started by Marcel 3 years ago · 2 replies · 615 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 jeremycherfas, 1 week ago
4 182 2 days ago
General · by lynbor, 6 days ago
2 124 3 days ago
General · by Old Man Umby, 1 week ago
1 100 1 week ago
General · by Sebastian, 2 weeks ago
1 124 2 weeks ago
General · by Andy Miller, 3 weeks ago
0 248 3 weeks ago