🔍 sitemap
This commit is contained in:
7
app.py
7
app.py
@@ -232,6 +232,13 @@ def api_comic(comic_id):
|
||||
return jsonify(comic)
|
||||
|
||||
|
||||
@app.route('/sitemap.xml')
|
||||
def sitemap():
|
||||
"""Serve the static sitemap.xml file"""
|
||||
from flask import send_from_directory
|
||||
return send_from_directory('static', 'sitemap.xml', mimetype='application/xml')
|
||||
|
||||
|
||||
@app.errorhandler(404)
|
||||
def page_not_found(e):
|
||||
"""404 error handler"""
|
||||
|
||||
Reference in New Issue
Block a user