From 3d531238d7f64ae70010d324363ed22e7029d768 Mon Sep 17 00:00:00 2001 From: Ruslan Date: Fri, 15 May 2026 12:50:55 +0000 Subject: [PATCH] SEO: meta tags, OG, JSON-LD, robots.txt, sitemap, keywords in content --- app/main.py | 12 ++++++++++++ app/static/robots.txt | 11 +++++++++++ app/static/sitemap.xml | 8 ++++++++ app/templates/login.html | 32 ++++++++++++++++++++++++++++++-- 4 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 app/static/robots.txt create mode 100644 app/static/sitemap.xml diff --git a/app/main.py b/app/main.py index e599a13..2be15ad 100644 --- a/app/main.py +++ b/app/main.py @@ -424,6 +424,18 @@ def admin_page(request: Request, admin: User = Depends(require_admin), db: Sessi + +@app.get("/robots.txt", include_in_schema=False) +def robots_txt(): + from fastapi.responses import FileResponse + return FileResponse("static/robots.txt", media_type="text/plain") + + +@app.get("/sitemap.xml", include_in_schema=False) +def sitemap_xml(): + from fastapi.responses import FileResponse + return FileResponse("static/sitemap.xml", media_type="application/xml") + @app.get("/api/public/services-by-category") def public_services_by_category(db: Session = Depends(get_db)): services = db.execute( diff --git a/app/static/robots.txt b/app/static/robots.txt new file mode 100644 index 0000000..e279eb6 --- /dev/null +++ b/app/static/robots.txt @@ -0,0 +1,11 @@ +User-agent: * +Allow: / +Disallow: /admin +Disallow: /api/ +Disallow: /go/ +Disallow: /s/ +Disallow: /w/ +Disallow: /u/ +Disallow: /rdp/ + +Sitemap: https://stend.4mont.ru/sitemap.xml diff --git a/app/static/sitemap.xml b/app/static/sitemap.xml new file mode 100644 index 0000000..dbd24ab --- /dev/null +++ b/app/static/sitemap.xml @@ -0,0 +1,8 @@ + + + + https://stend.4mont.ru/ + weekly + 1.0 + + diff --git a/app/templates/login.html b/app/templates/login.html index d13069b..500f101 100644 --- a/app/templates/login.html +++ b/app/templates/login.html @@ -3,7 +3,35 @@ - МОНТ - инфрастуктурный полигон + Инфраструктурный полигон МОНТ — демо и пилоты российского ПО + + + + + + + + + + + + + + +