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 · 603 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, 4 days ago
3 95 2 hours ago
General · by Old Man Umby, 2 days ago
1 60 2 days ago
General · by Sebastian, 4 days ago
1 81 4 days ago
General · by Andy Miller, 2 weeks ago
0 216 2 weeks ago
General · by ready-4-IT, 6 months ago
1 716 3 weeks ago