diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-01-19 04:48:55 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-01-19 04:48:55 +0100 |
commit | 0cf8d6ed1694da89bd720ee902f0fa278963fc7a (patch) | |
tree | 3ab9c22886e8df863257bde07ba268300086fe79 /talerblog/blog | |
parent | e0564374a52fcec09181988761f44813fd58e830 (diff) | |
download | blog-0cf8d6ed1694da89bd720ee902f0fa278963fc7a.tar.gz blog-0cf8d6ed1694da89bd720ee902f0fa278963fc7a.tar.bz2 blog-0cf8d6ed1694da89bd720ee902f0fa278963fc7a.zip |
fix teaser
Diffstat (limited to 'talerblog/blog')
-rw-r--r-- | talerblog/blog/content.py | 2 | ||||
-rw-r--r-- | talerblog/blog/templates/index.html | 2 |
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> |