From c0be486968fe3d375d1f408eae7f954e1f5f82fc Mon Sep 17 00:00:00 2001 From: mjfernez Date: Thu, 10 Mar 2022 18:34:22 -0500 Subject: Fixes RSS issues. Changes time tracking to git This commit primarily changes the code base to base the file last modified time on the output of "git log". This adds dateutil and git itself as a dependency, but those are pretty common... This also fixes some minor issues including: - missing / between mjfer.net and the URI - README up to date with latest changes - linting --- views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'views.py') diff --git a/views.py b/views.py index d69ac51..fda6152 100644 --- a/views.py +++ b/views.py @@ -55,7 +55,7 @@ def render_file(path): { 'title': path.split('.')[0].upper(), 'parent_dir': '/' + '/'.join(path.split('/')[:-1]), - 'last_update': file_last_modified(abs_path) + 'last_update': file_last_modified(path), } ) if abs_path.endswith('.html'): @@ -134,6 +134,6 @@ def render_rss_feed(): feed = render_template("feed.xml", **context) response = make_response(feed) response.headers['Content-Type'] = str( - siteconfig.MIMETYPES.get(".xml") + siteconfig.MIMETYPES.get(".xml") ) return response -- cgit v1.2.3