Add comprehensive SEO improvements: meta tags, robots.txt, sitemap.xml, and favicon. Fix meta description rendering issues with proper HTML entity encoding. Update port configuration to use PORT environment variable.
This commit is contained in:
@@ -256,6 +256,30 @@ def health_check():
|
||||
})
|
||||
|
||||
|
||||
@main_bp.route('/robots.txt')
|
||||
def robots_txt():
|
||||
"""
|
||||
Serve the robots.txt file.
|
||||
|
||||
Returns:
|
||||
robots.txt content
|
||||
"""
|
||||
from flask import current_app
|
||||
return current_app.send_static_file('robots.txt')
|
||||
|
||||
|
||||
@main_bp.route('/sitemap.xml')
|
||||
def sitemap_xml():
|
||||
"""
|
||||
Serve the sitemap.xml file.
|
||||
|
||||
Returns:
|
||||
sitemap.xml content
|
||||
"""
|
||||
from flask import current_app
|
||||
return current_app.send_static_file('sitemap.xml')
|
||||
|
||||
|
||||
@main_bp.errorhandler(404)
|
||||
def not_found_error(error):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user