A sitemap lists a website's pages, helping search engines find and crawl them.
Official Guide: https://www.getlektor.com/docs/guides/sitemap/
sitemap.xml
directory in the content
directorycontents.lr
to the sitemap.xml
directory containing:_template: sitemap.xml --- _model: none
Create a template file sitemap.xml
in the templates
directory, this file should contain:
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> {%- for page in [site.root] if page != this recursive %} <url><loc>{{ page|url(external=true) }}</loc></url> {{- loop(page.children|sort(attribute='path')) }} {%- endfor %} </urlset>
Configure the url
of the site in the main project file tyrel.cloud.lektorproject
[project] name = tyrel.cloud url = https://www.tyrel.cloud/
At this point you may want to go to your search engine and upload your sitemap... https://search.google.com/search-console/sitemaps?