add robots.txt / sitemap.xml / favicon.ico
This commit is contained in:
23
app.py
23
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)
|
||||
|
||||
BIN
static/favicon.ico
Normal file
BIN
static/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
8
static/robots.txt
Normal file
8
static/robots.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
User-agent: *
|
||||
|
||||
Allow: /
|
||||
Disallow: /home
|
||||
Disallow: /home2
|
||||
Disallow: /immagini
|
||||
|
||||
Sitemap: https://hersel.it/sitemap.xml
|
||||
7
static/sitemap.xml
Normal file
7
static/sitemap.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<url>
|
||||
<loc>https://hersel.it/</loc>
|
||||
<lastmod>2025-04-30</lastmod>
|
||||
</url>
|
||||
</urlset>
|
||||
Reference in New Issue
Block a user