def feed(): _feed = AtomFeed(title=app.config["SiteTitle"], subtitle=app.config["SiteSubTitle"], icon=url_for("favicon", _external=True), url=request.url_root) posts = get_latest_posts(12).get("posts", []) for _post in posts: _feed.add(title=_post.title, content=_post.safe_html, content_type='html', author=_post.author.nickname, url=url_for("post", postid=_post.id, _external=True), updated=_post.updated_date, published=_post.post_date) return Response(_feed.to_string(), mimetype='application/xml')