From e087c0727560771f45656bff2f628f996a7e82e9 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Thu, 27 May 2021 21:40:37 -0600 Subject: fix m_datetime bug --- ChangeLog | 2 ++ src/pyssg/sitemap.py | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4daacd3..c0ddc23 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ CHANGES ======= +* add tags inside article footer instead of separate html element + v0.4.0 ------ diff --git a/src/pyssg/sitemap.py b/src/pyssg/sitemap.py index e8338cb..410033f 100644 --- a/src/pyssg/sitemap.py +++ b/src/pyssg/sitemap.py @@ -34,7 +34,10 @@ class SitemapBuilder: u_f: str = '' for p in self.pages: url: str = f'{self.config.base_url}/{p.name.replace(".md", ".html")}' - date: str = p.m_datetime.strftime(DFORMAT) + if p.m_datetime is not None: + date: str = p.m_datetime.strftime(DFORMAT) + else: + date: str = p.c_datetime.strftime(DFORMAT) u_f = f'{u_f} \n' u_f = f'{u_f} {url}\n' -- cgit v1.2.3-70-g09d2