Skip to content

Commit

Permalink
Merge pull request #123 from everyleaf/add-sitemap
Browse files Browse the repository at this point in the history
Sitemapの追加
  • Loading branch information
yakitorii authored Jan 10, 2025
2 parents c1f2d52 + d899066 commit 0d67fa9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
8 changes: 8 additions & 0 deletions robots.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
permalink: /robots.txt
eleventyExcludeFromCollections: true
---
Sitemap: https://https://everyleaf.github.io/hotwire_ja/sitemap.xml

User-agent: *
Disallow:
16 changes: 16 additions & 0 deletions sitemap.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
permalink: /sitemap.xml
eleventyExcludeFromCollections: true
---
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% for page in collections.all %}
{% if not page.data.draft %}
<url>
<loc>{{ site.url }}{{ page.url | url }}</loc>
<lastmod>{{ page.date.toISOString() }}</lastmod>
<changefreq>{{ page.data.changeFreq if page.data.changeFreq else "monthly" }}</changefreq>
</url>
{% endif %}
{% endfor %}
</urlset>

0 comments on commit 0d67fa9

Please sign in to comment.