chiark / gitweb /
theme: trim output coming from Pelican to avoid ugly empty lines.
authorVladimír Vondruš <mosra@centrum.cz>
Sat, 9 Dec 2017 22:14:31 +0000 (23:14 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Mon, 11 Dec 2017 01:48:25 +0000 (02:48 +0100)
pelican-theme/templates/archives.html
pelican-theme/templates/article.html
pelican-theme/templates/article_header.html
pelican-theme/templates/index.html
pelican-theme/templates/page.html

index 17920902652891b2abbe6a074eac638fc0723daf..2ad7421b7a7296b23556368f1d768d896b2be73d 100644 (file)
@@ -32,7 +32,7 @@
                (article.collapse_first is not defined and not M_COLLAPSE_FIRST_ARTICLE)) %}
         <div class="m-clearfix-l"></div>
 <!-- content -->
-{{ article.content }}
+{{ article.content|trim }}
 <!-- /content -->
         {% endif %}
         <footer>
index 645f94898902fce8137e9b2133dcb5951106c16b..a044ab34f49b5791e8c691155ff42c68d0fbbe92 100644 (file)
@@ -52,7 +52,7 @@
       <div class="m-container">
         <div class="m-row">
           <div class="m-col-m-10 m-push-m-1 m-nopady">
-            {{ article.summary|indent(12) }}
+            {{ article.summary|trim|indent(12) }}
           </div>
         </div>
       </div>
@@ -62,7 +62,7 @@
       <div class="m-row">
         <div class="m-col-m-10 m-push-m-1 m-nopady">
 <!-- content -->
-{{ article.content -}}
+{{ article.content|trim }}
 <!-- /content -->
         </div>
       </div>
@@ -82,7 +82,7 @@
       {{ header()|indent(6) }}
       <div class="m-clearfix-l"></div>
 <!-- content -->
-{{ article.content -}}
+{{ article.content|trim }}
 <!-- /content -->
       <footer>
         {% macro footer() %}{% include "article_footer.html" %}{% endmacro %}
index a05b659a81c0f6662ef67d9941386f7f1178a245..5804e8fee1bf724ac49f174a592742736b9ae9f4 100644 (file)
@@ -19,6 +19,6 @@
           (article.collapse_first is not defined and M_COLLAPSE_FIRST_ARTICLE))) or
         (article.hide_summary is defined and article.hide_summary != 'True') or
         (article.hide_summary is not defined and not M_HIDE_ARTICLE_SUMMARY) %}
-  {{ article.summary|indent(2) }}
+  {{ article.summary|trim|indent(2) }}
   {% endif %}
 </header>
index 2d19df3284d9540fa6aec416f83d26e7595288eb..74a702f30ea595cd57d0cf36e5dd8342704d8358 100644 (file)
@@ -27,7 +27,7 @@
                (article.collapse_first is not defined and not M_COLLAPSE_FIRST_ARTICLE)) %}
         <div class="m-clearfix-l"></div>
 <!-- content -->
-{{ article.content }}
+{{ article.content|trim }}
 <!-- /content -->
         {% endif %}
         <footer>
index abc26b39c266e1605c1098d712e8ead9d869e3c6..415e7d53afd965fbb84dcd6d82b4eb21273639e4 100644 (file)
@@ -46,7 +46,7 @@
   <div class="m-row">
     <div class="m-col-l-10 m-push-l-1 m-nopadb">
 <!-- header -->
-{{ page.header|expand_links(page) -}}
+{{ page.header|trim|expand_links(page) }}
 <!-- /header -->
     </div>
   </div>
@@ -58,7 +58,7 @@
     <div id="m-landing-cover">
       <div class="m-container">
 <!-- landing -->
-{{ page.landing|expand_links(page) -}}
+{{ page.landing|trim|expand_links(page) }}
 <!-- /landing -->
       </div>
     </div>
@@ -82,7 +82,7 @@
         </h1>
         {% endif %}
 <!-- content -->
-{{ page.content -}}
+{{ page.content|trim }}
 <!-- /content -->
       </div>
     </div>
@@ -93,7 +93,7 @@
   <div class="m-row">
     <div class="m-col-l-10 m-push-l-1 m-nopadt">
 <!-- footer -->
-{{ page.footer|expand_links(page) -}}
+{{ page.footer|trim|expand_links(page) }}
 <!-- /footer -->
     </div>
   </div>