From d037f1fdabe8fbcc226d34c25f7e7814a56ccf26 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 14 Oct 2013 15:27:20 +0200 Subject: web/macros.py: Handle multiple articles correctly Don't concatenate multiple news articles. diff --git a/web/macros.py b/web/macros.py index 978a4e4..2cf2c33 100644 --- a/web/macros.py +++ b/web/macros.py @@ -6,10 +6,14 @@ plugins_release = '1.5' mib_release = '1.0.1' release_notes = 'news/release-%s.html' % plugins_release.replace('.', '-') site_url = 'https://www.nagios-plugins.org/' -feeds = """These project news articles are also available as an [RSS -feed](rss.xml). Additional stuff is posted to [Twitter](https://twitter.com/), -so you might want to [follow us -there](https://twitter.com/intent/follow?screen_name=monitorplugins) as well.""" +feeds = """These project news articles are also available as an [RSS feed][rss]. +Additional stuff is posted to [Twitter][twitter], so you might want to [follow +us there][follow] as well. + +[rss]: rss.xml +[twitter]: https://twitter.com/ +[follow]: https://twitter.com/intent/follow?screen_name=monitorplugins +""" page = { "description": "Standard monitoring plugins for Nagios and compatible monitoring solutions.", @@ -95,7 +99,6 @@ def hook_preconvert_news(): def make_news_page(posts, current_index): marker = '' - source = list() if current_index == 0: title = 'News' teaser = ['# ' + title, feeds] @@ -103,6 +106,7 @@ def make_news_page(posts, current_index): title = 'News Page %d' % (current_index + 1) teaser = ['# ' + title] for p in posts: + source = list() timestamp = time.strptime(p.date, '%Y-%m-%d') date = time.strftime('%A, %B %-e, %Y', timestamp) teaser.append('## %s' % p.title) -- cgit v0.10-9-g596f