Skip to content

Commit

Permalink
Add one unifying sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
Savjee committed Jul 19, 2024
1 parent 98a6043 commit f40326c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/site/robots.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ Disallow: /

sitemap: https://simplyexplained.com/sitemap-blogposts.txt
sitemap: https://simplyexplained.com/sitemap-videos.txt
sitemap: https://simplyexplained.com/sitemap.txt
sitemap: https://simplyexplained.com/rss.xml
15 changes: 15 additions & 0 deletions src/site/sitemaps/sitemap.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
layout: null
permalink: sitemap.txt
---
{%- comment -%}
WARNING: DON'T CHANGE THE FORMATTING
This was done so there is exactly 1 URL per line. Adding
more linebreaks will result in a file with empty lines.
{%- endcomment -%}
{%- assign collection_names = 'trivia,posts,videos,courses,newsletter' | split: ',' -%}
{%- for collection_name in collection_names -%}
{%- for item in collections[collection_name] -%}
{% baseUrl %}{{ item.url }}
{% endfor -%}
{%- endfor -%}

0 comments on commit f40326c

Please sign in to comment.