Creating XML sitemaps with Python

2 views
10 minutes watched
1 completion

The lesson demonstrates how to generate and implement an XML sitemap in a Flask web application, including both static and dynamic pages.

Video thumbnail

Get full access

You need to subscribe to get full access to the video and lesson content.

Join 4.3K+ learners from companies like Shopify, Microsoft, Tiktok, AppSumo and Instacart.

$197
one-time payment

Generating Sitemaps in Flask

Setting Up the Project

I found an icon on IconScout and downloaded the SVG to use in the navigation and the PNG file to use as our favicon. I asked ChatGPT how to implement this in Flask, and it recommended creating a static folder with an images subfolder to store the icon.

In the layout template, we use the following URL for static content:

{{ url_for('static', filename='images/icon.png') }}

I then copied the SVG code into the navigation to create a link back to the home page. We're calling this project "Marketing Software HQ" - a nod...

Subscribe now to get full access to the lesson content.

Get started →