浏览代码

Simple content layout: Remove paragraphs from markdownify result

Daniel Rudolf 9 年之前
父节点
当前提交
838f16aa4d
共有 1 个文件被更改,包括 8 次插入2 次删除
  1. 8 2
      _layouts/simple-content.html

+ 8 - 2
_layouts/simple-content.html

@@ -15,11 +15,17 @@
         <div class="light-wrapper">
             <div class="inner">
                 {% if page.headline or page.title %}
-                    <h1 class="aligncenter">{% if page.headline %}{{ page.headline | markdownify }}{% else %}{{ page.title }}{% endif %}</h1>
+                    <h1 class="aligncenter">
+                        {% if page.headline %}
+                            {{ page.headline | markdownify | remove: '<p>' | remove: '</p>' }}
+                        {% else %}
+                            {{ page.title }}
+                        {% endif %}
+                    </h1>
                 {% endif %}
                 {% if page.description %}
                     <p class="description aligncenter">
-                        {{ page.description | markdownify }}
+                        {{ page.description | markdownify | remove: '<p>' | remove: '</p>' }}
                     </p><br />
                 {% endif %}