summaryrefslogtreecommitdiff
path: root/talerblog/blog
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-01-19 04:48:55 +0100
committerFlorian Dold <florian.dold@gmail.com>2018-01-19 04:48:55 +0100
commit0cf8d6ed1694da89bd720ee902f0fa278963fc7a (patch)
tree3ab9c22886e8df863257bde07ba268300086fe79 /talerblog/blog
parente0564374a52fcec09181988761f44813fd58e830 (diff)
downloadblog-0cf8d6ed1694da89bd720ee902f0fa278963fc7a.tar.gz
blog-0cf8d6ed1694da89bd720ee902f0fa278963fc7a.tar.bz2
blog-0cf8d6ed1694da89bd720ee902f0fa278963fc7a.zip
fix teaser
Diffstat (limited to 'talerblog/blog')
-rw-r--r--talerblog/blog/content.py2
-rw-r--r--talerblog/blog/templates/index.html2
2 files changed, 3 insertions, 1 deletions
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>