summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/macros.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/web/macros.py b/web/macros.py
index 5964c7b..27e91d5 100644
--- a/web/macros.py
+++ b/web/macros.py
@@ -9,6 +9,7 @@ page = {
9 "keywords": "Nagios, Icinga, Shinken, Monitoring, Official, Plugins, Open, Source, Free, Software" 9 "keywords": "Nagios, Icinga, Shinken, Monitoring, Official, Plugins, Open, Source, Free, Software"
10} 10}
11release_notes = 'doc/release-notes/' + plugins_release.replace('.', '-') + '.html' 11release_notes = 'doc/release-notes/' + plugins_release.replace('.', '-') + '.html'
12site_url = 'https://www.nagios-plugins.org/'
12 13
13_RSS = """<?xml version="1.0" encoding="UTF-8"?> 14_RSS = """<?xml version="1.0" encoding="UTF-8"?>
14<rss version="2.0"> 15<rss version="2.0">
@@ -43,14 +44,14 @@ def hook_postconvert_rss():
43 posts.sort(key=lambda p: p.date, reverse=True) 44 posts.sort(key=lambda p: p.date, reverse=True)
44 for p in posts: 45 for p in posts:
45 title = p.post 46 title = p.post
46 link = '%s/%s' % (options.base_url.rstrip('/'), p.url) 47 link = '%s/%s' % (site_url.rstrip('/'), p.url)
47 desc = hx(p.html) 48 desc = hx(p.html)
48 date = time.mktime(time.strptime('%s 12' % p.date, '%Y-%m-%d %H')) 49 date = time.mktime(time.strptime('%s 12' % p.date, '%Y-%m-%d %H'))
49 date = email.utils.formatdate(date) 50 date = email.utils.formatdate(date)
50 items.append(_RSS_ITEM % (title, link, desc, link, date)) 51 items.append(_RSS_ITEM % (title, link, desc, link, date))
51 items = ''.join(items) 52 items = ''.join(items)
52 title = 'Nagios Plugins' 53 title = 'Nagios Plugins'
53 link = '%s/news/index.html' % options.base_url.rstrip('/') 54 link = '%s/news/index.html' % site_url.rstrip('/')
54 desc = 'Announcements published by the Nagios Plugins Development Team.' 55 desc = 'Announcements published by the Nagios Plugins Development Team.'
55 date = email.utils.formatdate() 56 date = email.utils.formatdate()
56 rss = _RSS % (title, link, desc, date, date, items) 57 rss = _RSS % (title, link, desc, date, date, items)