cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblot...@apache.org
Subject docs commit: Fixing overflow and rendering of next/previous on blog pages.
Date Tue, 15 Sep 2015 21:23:49 GMT
Repository: cordova-docs
Updated Branches:
  refs/heads/cordova-website 03447084e -> 8f3feddc7


Fixing overflow and rendering of next/previous on blog pages.


Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/8f3feddc
Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/8f3feddc
Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/8f3feddc

Branch: refs/heads/cordova-website
Commit: 8f3feddc726eb0d97951e28676b7bdfe3d43a1e9
Parents: 0344708
Author: Dmitry Blotsky <dmitry.blotsky@gmail.com>
Authored: Tue Sep 15 14:23:46 2015 -0700
Committer: Dmitry Blotsky <dmitry.blotsky@gmail.com>
Committed: Tue Sep 15 14:23:46 2015 -0700

----------------------------------------------------------------------
 www/_layouts/post.html | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/8f3feddc/www/_layouts/post.html
----------------------------------------------------------------------
diff --git a/www/_layouts/post.html b/www/_layouts/post.html
index 5ab4b06..d22fa18 100644
--- a/www/_layouts/post.html
+++ b/www/_layouts/post.html
@@ -15,12 +15,12 @@ layout: blog
             <div class="post">
                 <header>
                     <div class="title">{{ page.title }}</div>
-                    <div class="author">By: 
+                    <div class="author">By:
                         {% if page.author.url %}
                           <a href="{{ page.author.url }}">{{ page.author.name }}</a>
                         {% else %}
                           {{ page.author.name }}
-                        {% endif %} 
+                        {% endif %}
                     </div>
                     <div class="date">{{ page.date | date_to_string }}</div>
                 </header>
@@ -38,7 +38,9 @@ layout: blog
                                 <br>
                                 <a class="title" href="{{ site.baseurl }}{{ page.previous.url
}}">{{ page.previous.title }}</a>
                                 <div class="date"> {{ page.previous.date | date_to_string
}} - By {{ page.previous.author.name }} </div>
-                                <div class="content"> {{ page.previous.content | strip_html
| truncate:130 }} </div>
+                                <p class="content">
+                                    {{ page.previous.excerpt | strip_html | truncatewords:12
}}
+                                </p>
                             {% endif %}
                         </div>
                         <div class="col-sm-6">
@@ -48,7 +50,20 @@ layout: blog
                                 <br>
                                 <a class="title" href="{{ site.baseurl }}{{ page.next.url
}}">{{ page.next.title }}</a>
                                 <div class="date"> {{ page.next.date | date_to_string
}} - By {{ page.next.author.name}} </div>
-                                <div class="content"> {{ page.next.content | strip_html
| truncate:130 }} </div>
+                                <p class="content">
+                                    <!--
+                                        NOTE:
+                                            the markdownify filter is used here
+                                            because posts are rendered in sequence;
+                                            that is, the next post's content isn't
+                                            yet rendered at the time that this post
+                                            is being rendered, so page.next.excerpt
+                                            is still in Markdown and not HTML
+
+                                        Reference: https://github.com/jekyll/jekyll/issues/2860
+                                    -->
+                                    {{ page.next.excerpt | markdownify | strip_html | truncatewords:12
}}
+                                </p>
                             {% endif %}
                         </div>
                     </div>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message