I have the following test page for my blog in grav :
---
title: 'My Blog post one'
visible: true
---
#My blog post one
Pellentesque ornare mi nec elementum fringilla. Nam aliquam urna metus, vel convallis leo vulputate ut. Sed ac tempor turpis, ut pellentesque nisi. Nulla in dui sit amet augue iaculis euismod ac a massa. Sed sollicitudin nibh nisi, eu efficitur ligula vulputate a. Nam ullamcorper nisl non elementum dignissim. Mauris at neque sed tellus vestibulum tempor quis ut neque. Pellentesque eu dolor quis augue molestie suscipit. Duis tristique convallis mollis. Aenean eu erat sed mauris congue porta non vel urna. Sed iaculis semper malesuada. Nunc in lectus a augue lacinia dapibus vitae scelerisque mauris. Pellentesque efficitur lacus non dignissim viverra.
@font-face {
font-family: Chunkfive; src: url('Chunkfive.otf');
}
body, .usertext {
color: #F0F0F0; background: #600;
font-family: Chunkfive, sans;
}
@import url(print.css);
@media print {
a[href^=http]::after {
content: attr(href)
}
}
As you can see there is an <h1>
and a <p>
tag. Now when the indivisual blog page everything is fine, however on the listing page , where a snapshot of each blog post appears , i don’t want the <h1>
to render as a <h4>
, the part that displays the heading and para tag in the blog listing page is the following:
{% elseif truncate and page.summary != page.content %}
<div class="p-summary e-content">
{{ page.summary }}
<p><a href="{{ page.url }}">{{ 'BLOG.ITEM.CONTINUE_READING'|t }}</a></p>
</div>
How do i make the <h1>```` into a ````<h4>
tag while being displayed in the blog listing page ?
possible solution , make a config file for each blog post page , and have the heading with a key like blogpageheading
, in the indivisual blog post make this an h1 and in the listing page , use the heading as text for h4 , will this text show up in the page.summary
though ?