Skip to content

Commit

Permalink
🔍 Create sitemap.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
ABGEO committed Mar 10, 2021
1 parent 11d1dee commit 95bb6cc
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ def page_not_found(e):


from app.views import (
auth, main, pwa
auth, main, static
)

app.register_blueprint(auth.bp)
app.register_blueprint(main.bp)
app.register_blueprint(pwa.bp)
app.register_blueprint(static.bp)
4 changes: 4 additions & 0 deletions app/static/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
User-agent: *
Disallow:

Sitemap: https://nomrebi.abgeo.dev/sitemap.xml
19 changes: 19 additions & 0 deletions app/static/sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url>
<loc>https://nomrebi.abgeo.dev/</loc>
<changefreq>never</changefreq>
<priority>1</priority>
</url>
<url>
<loc>https://nomrebi.abgeo.dev/about</loc>
<changefreq>never</changefreq>
<priority>1</priority>
</url>
<url>
<loc>https://nomrebi.abgeo.dev/auth/</loc>
<changefreq>never</changefreq>
<priority>1</priority>
</url>
</urlset>
12 changes: 11 additions & 1 deletion app/views/pwa.py → app/views/static.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
)


bp = Blueprint('pwa', __name__)
bp = Blueprint('static', __name__)


@bp.route('/manifest.json')
Expand All @@ -16,3 +16,13 @@ def service_worker():
response = make_response(send_from_directory('static', 'assets/js/service-worker.js'))
response.headers['Cache-Control'] = 'no-cache'
return response


@bp.route('/robots.txt')
def robots_txt():
return send_from_directory('static', 'robots.txt')


@bp.route('/sitemap.xml')
def sitemap():
return send_from_directory('static', 'sitemap.xml')

1 comment on commit 95bb6cc

@vercel
Copy link

@vercel vercel bot commented on 95bb6cc Mar 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.