From b3470843ef23a45c9a0bb81813ec0212a9fa9f06 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Wed, 9 Oct 2013 14:33:30 +0200 Subject: web/macros.py: Use full URLs in RSS file Make sure to specify URLs such as https://www.nagios-plugins.org/foo.html instead of /foo.html in the RSS file. 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 = { "keywords": "Nagios, Icinga, Shinken, Monitoring, Official, Plugins, Open, Source, Free, Software" } release_notes = 'doc/release-notes/' + plugins_release.replace('.', '-') + '.html' +site_url = 'https://www.nagios-plugins.org/' _RSS = """ @@ -43,14 +44,14 @@ def hook_postconvert_rss(): posts.sort(key=lambda p: p.date, reverse=True) for p in posts: title = p.post - link = '%s/%s' % (options.base_url.rstrip('/'), p.url) + link = '%s/%s' % (site_url.rstrip('/'), p.url) desc = hx(p.html) date = time.mktime(time.strptime('%s 12' % p.date, '%Y-%m-%d %H')) date = email.utils.formatdate(date) items.append(_RSS_ITEM % (title, link, desc, link, date)) items = ''.join(items) title = 'Nagios Plugins' - link = '%s/news/index.html' % options.base_url.rstrip('/') + link = '%s/news/index.html' % site_url.rstrip('/') desc = 'Announcements published by the Nagios Plugins Development Team.' date = email.utils.formatdate() rss = _RSS % (title, link, desc, date, date, items) -- cgit v0.10-9-g596f