diff options
author | David Luevano Alvarado <david@luevano.xyz> | 2021-05-23 16:59:47 -0600 |
---|---|---|
committer | David Luevano Alvarado <david@luevano.xyz> | 2021-05-23 16:59:47 -0600 |
commit | 595ec5770df7b841217916017a352ee8a04a8a64 (patch) | |
tree | 4975986dcea96c46d4e24d58eb879bec47acf7b1 /src | |
parent | 16941098453252415c76abc4468ac4e5459124b2 (diff) |
... literally 3 commits to fix a missing obj
Diffstat (limited to 'src')
-rw-r--r-- | src/pyssg/rss.py | 8 |
1 files changed, 4 insertions, 4 deletions
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} <item>\n' |