Consider removing paragraph tag(s) from description data
igoynawamreh opened this issue · comments
By default, page(s) with Markdown
type will wrap the page.description
data with paragraph tag(s).
The page.description
should not be rendered as paragraph block. This will make it easier for theme designers to place it in their markup, this also fix inconsistency between page.title
and the page.description
.
Example
example.page
:
---
title: Example *Markdown*
description: Lorem ipsum *Markdown*.
type: Markdown
...
pages.php
:
<?php foreach ($pages as $page): ?>
<?= $page->title; ?><br>
<?= $page->description; ?>
<?php endforeach; ?>
Expected Output:
Example <em>Markdown</em><br>
Lorem ipsum <em>Markdown</em>.
Actual Output:
Example <em>Markdown</em><br>
<p>Lorem ipsum <em>Markdown</em>.</p>
Working example
https://github.com/igoynawamreh/mecha/tree/page-description
If you like it, I will create a PR. Or, is there still something that needs to be changed?
See my comments in your latest commits