gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-blog] branch master updated: fix teaser


From: gnunet
Subject: [GNUnet-SVN] [taler-blog] branch master updated: fix teaser
Date: Fri, 19 Jan 2018 04:49:03 +0100

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository blog.

The following commit(s) were added to refs/heads/master by this push:
     new 0cf8d6e  fix teaser
0cf8d6e is described below

commit 0cf8d6ed1694da89bd720ee902f0fa278963fc7a
Author: Florian Dold <address@hidden>
AuthorDate: Fri Jan 19 04:48:55 2018 +0100

    fix teaser
---
 talerblog/blog/content.py           | 2 ++
 talerblog/blog/templates/index.html | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/talerblog/blog/content.py b/talerblog/blog/content.py
index 1a233bf..3360517 100644
--- a/talerblog/blog/content.py
+++ b/talerblog/blog/content.py
@@ -66,6 +66,8 @@ def add_from_html(resource_name, teaser_paragraph=0, 
title=None):
     teaser = soup.find("p", attrs={"id":["teaser"]})
     if teaser is None:
         teaser = str(paragraphs[teaser_paragraph])
+    else:
+        teaser = teaser.get_text()
     re_proc = re.compile("^/essay/[^/]+/data/[^/]+$")
     imgs = soup.find_all("img")
     extra_files = []
diff --git a/talerblog/blog/templates/index.html 
b/talerblog/blog/templates/index.html
index 8a0f157..2801fff 100644
--- a/talerblog/blog/templates/index.html
+++ b/talerblog/blog/templates/index.html
@@ -41,7 +41,7 @@
       <div class="notice">
       <h3 class="taler-installed-show"><a href="{{ url_for("article", 
article_name=article.slug) }}">{{article.title}}</a></h3>
       <h3 class="taler-installed-hide">{{article.title}} <span 
style="font-size: small;">(install wallet to buy/read)</span></h3>
-      {{ article.teaser|safe }}
+      <p>{{ article.teaser|safe }} <a href="{{ url_for("article", 
article_name=article.slug) }}">(Read more...)</a>/p>
       </div>
       {% else %}
       <em>(No articles available)</em>

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]