Skip to content

Commit

Permalink
Fix Atom feed URL
Browse files Browse the repository at this point in the history
  • Loading branch information
Siecje committed Dec 13, 2023
1 parent 2e9de6a commit dc55c35
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions htmd/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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


Expand Down

0 comments on commit dc55c35

Please sign in to comment.