hexojs/hexo-generator-sitemap

tags and categories cannot be generated

tim-hub opened this issue · 1 comments

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  {% for post in posts %}
  <url>
    <loc>{{ post.permalink | uriencode }}</loc>
    <lastmod>2020-07-24T09:34:13.136Z</lastmod>
    <changefreq>never</changefreq>
    <priority>0.2</priority>
  </url>
  {% endfor %}

  <url>
    <loc>{{ config.url | uriencode }}</loc>
    <lastmod>2020-07-23T09:34:13.136Z</lastmod>
    <changefreq>never</changefreq>
    <priority>0.2</priority>
  </url>

  {% for tag in tags %}
  <url>
    <loc>{{ tag.permalink | uriencode }}</loc>
    <lastmod>2020-07-23T09:34:13.136Z</lastmod>
    <changefreq>never</changefreq>
    <priority>0.1</priority>
  </url>
  {% endfor %}

  {% for cat in categories %}
  <url>
    <loc>{{ cat.permalink | uriencode }}</loc>
    <lastmod>2020-07-23T09:34:13.136Z</lastmod>
    <changefreq>never</changefreq>
    <priority>0.1</priority>
  </url>
  {% endfor %}
</urlset>

config

sitemap:
    path: archive-sitemap.xml
    tags: true
    categories: true
    template: ./sitemap_template.xml

problem solved, v2 on npm does not support tag categories yet. the master branch hst not beend released