From 595ec5770df7b841217916017a352ee8a04a8a64 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Sun, 23 May 2021 16:59:47 -0600 Subject: ... literally 3 commits to fix a missing obj --- src/pyssg/rss.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/pyssg/rss.py b/src/pyssg/rss.py index ab2dff1..48710f9 100644 --- a/src/pyssg/rss.py +++ b/src/pyssg/rss.py @@ -21,8 +21,8 @@ class RSSBuilder: def build(self): # initial base replacements - self.rss = self.rss.replace('$$TITLE', config.title) - self.rss = self.rss.replace('$$LINK', config.base_url) + self.rss = self.rss.replace('$$TITLE', self.config.title) + self.rss = self.rss.replace('$$LINK', self.config.base_url) self.rss = self.rss.replace('$$PYSSGVERSION', VERSION) items_formatted: str = __get_items_formatted() self.rss = self.rss.replace('$$ITEMS', items_formatted) @@ -30,7 +30,7 @@ class RSSBuilder: current_date: str = datetime.now(tz=timezone.utc).strftime(DFORMAT) self.rss = self.rss.replace('$$CURRENTDATE', current_date) - with open(os.path.join(config.dst, 'rss.xml'), 'w') as f: + with open(os.path.join(self.config.dst, 'rss.xml'), 'w') as f: f.write(self.rss) @@ -38,7 +38,7 @@ class RSSBuilder: # i_f=items formatted for short i_f: str = '' for p in pages: - url: str = f'{config.base_url}/{p.name.replace(".md", ".html")}' + url: str = f'{self.config.base_url}/{p.name.replace(".md", ".html")}' date: str = p.c_datetime.strftime(DFORMAT) i_f = f'{i_f} \n' -- cgit v1.2.3-70-g09d2