diff --git a/app.py b/app.py index 9cd919c..36f24ef 100644 --- a/app.py +++ b/app.py @@ -3,13 +3,30 @@ # Copyright Hersel Giannella -from quart import Quart +from quart import Quart, send_from_directory from config import config from routes.home import route_home -app = Quart(__name__) +app = Quart( + __name__, + template_folder="templates", + static_folder="static", +) +# favicon.ico, sitemap.xml and robots.txt +@app.route('/favicon.ico') +async def favicon(): + return await send_from_directory(app.static_folder, 'favicon.ico') + +@app.route('/sitemap.xml') +async def sitemap(): + return await send_from_directory(app.static_folder, 'sitemap.xml') + +@app.route('/robots.txt') +async def robots(): + return await send_from_directory(app.static_folder, 'robots.txt') + +# BluePrint Routes app.register_blueprint(route_home) - if __name__ == '__main__': app.run(debug=config.DEBUG, host=config.APP_HOST, port=config.APP_PORT) diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 0000000..c3d3d6c Binary files /dev/null and b/static/favicon.ico differ diff --git a/static/robots.txt b/static/robots.txt new file mode 100644 index 0000000..e194769 --- /dev/null +++ b/static/robots.txt @@ -0,0 +1,8 @@ +User-agent: * + +Allow: / +Disallow: /home +Disallow: /home2 +Disallow: /immagini + +Sitemap: https://hersel.it/sitemap.xml \ No newline at end of file diff --git a/static/sitemap.xml b/static/sitemap.xml new file mode 100644 index 0000000..92541c5 --- /dev/null +++ b/static/sitemap.xml @@ -0,0 +1,7 @@ + + + + https://hersel.it/ + 2025-04-30 + +