From 53d5309d656333fb5602d1e229e9a5b0f9691fda Mon Sep 17 00:00:00 2001 From: elpatron Date: Mon, 4 Aug 2025 11:29:06 +0200 Subject: [PATCH] Add sitemap.xml and robots.txt for SEO optimization --- app.py | 6 ++++ robots.txt | 14 ++++++++- sitemap.xml | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 sitemap.xml diff --git a/app.py b/app.py index 5566eb4..c401547 100644 --- a/app.py +++ b/app.py @@ -503,6 +503,12 @@ def api_docs(): response = make_response(render_template('swagger.html')) return add_cache_headers(response) +@app.route('/sitemap.xml') +def sitemap(): + """Serviert die Sitemap für Suchmaschinen""" + from flask import send_file + return send_file('sitemap.xml', mimetype='application/xml') + if __name__ == '__main__': app.run(debug=True, host="0.0.0.0") \ No newline at end of file diff --git a/robots.txt b/robots.txt index df21c66..4b5cafb 100644 --- a/robots.txt +++ b/robots.txt @@ -1,2 +1,14 @@ User-agent: * -Allow: / \ No newline at end of file +Allow: / + +# Sitemap +Sitemap: https://date.elpatron.me/sitemap.xml + +# Disallow private areas +Disallow: /stats +Disallow: /log/ +Disallow: /htmlcov/ + +# Allow API endpoints for documentation +Allow: /api-docs +Allow: /static/swagger.json \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 0000000..f9ed0a0 --- /dev/null +++ b/sitemap.xml @@ -0,0 +1,83 @@ + + + + + https://date.elpatron.me/ + 2025-08-03 + weekly + 1.0 + + + + + https://date.elpatron.me/api-docs + 2025-08-03 + monthly + 0.8 + + + + + https://date.elpatron.me/static/favicon.ico + 2025-08-03 + yearly + 0.1 + + + + https://date.elpatron.me/static/favicon.png + 2025-08-03 + yearly + 0.1 + + + + https://date.elpatron.me/static/favicon.svg + 2025-08-03 + yearly + 0.1 + + + + https://date.elpatron.me/static/logo.svg + 2025-08-03 + yearly + 0.1 + + + + https://date.elpatron.me/static/manifest.json + 2025-08-03 + monthly + 0.3 + + + + https://date.elpatron.me/static/service-worker.js + 2025-08-03 + monthly + 0.3 + + + + https://date.elpatron.me/static/swagger.json + 2025-08-03 + monthly + 0.5 + + + + + https://date.elpatron.me/?lang=de + 2025-08-03 + weekly + 0.9 + + + + https://date.elpatron.me/?lang=en + 2025-08-03 + weekly + 0.9 + + \ No newline at end of file