From dc55c35dd6fd615591fb5671db4d112f6dab168a Mon Sep 17 00:00:00 2001 From: Cody Scott Date: Wed, 13 Dec 2023 10:20:40 -0500 Subject: [PATCH] Fix Atom feed URL --- htmd/site.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/htmd/site.py b/htmd/site.py index c5988c4..3c9b505 100644 --- a/htmd/site.py +++ b/htmd/site.py @@ -6,7 +6,7 @@ from bs4 import BeautifulSoup from feedwerk.atom import AtomFeed from flask import ( - abort, Blueprint, Flask, make_response, render_template, url_for + abort, Blueprint, Flask, render_template, Response, url_for ) from flask_flatpages import FlatPages, pygments_style_defs from flask_frozen import Freezer @@ -183,7 +183,7 @@ def set_post_time(post, property, current_time): file.write(line) -@app.route('/feed.atom/') +@app.route('/feed.atom') def feed(): name = app.config.get('SITE_NAME') subtitle = app.config.get('SITE_DESCRIPTION') or 'Recent Blog Posts' @@ -218,7 +218,10 @@ def feed(): url=url, updated=updated, ) - ret = make_response(atom.to_string().encode('utf-8') + b'\n') + ret = Response( + atom.to_string().encode('utf-8') + b'\n', + mimetype='application/atom+xml', + ) return ret