Skip to content
Grav 2.0 is officially stable. Read the announcement →
General

Descriptive text at the top of a blog

Started by Marcel 3 years ago · 2 replies · 486 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 ian russell, 4 days ago
2 114 3 days ago
General · by pamtbaau, 1 month ago
2 376 1 week ago
General · by Hanns Mattes, 1 month ago
2 357 2 weeks ago
General · by Andy Miller, 1 month ago
0 260 1 month ago
General · by Jerry Hunt, 1 month ago
2 401 1 month ago