Skip to content

It seems that sitemap extension is only able to generate 100 urls. #2

@dchaplinsky

Description

@dchaplinsky

I've got an ugly workaround however:

var urlset = function() {
  return {
    urls: site.search({per_page: 100, page: 1, all: true}).results,
    urls2: site.search({per_page: 100, page: 2, all: true}).results
  }
};

exports.urlset = urlset;

exports.get = {
  "sitemap": function() {
    response.render("system/sitemap.xml.tpl", {}, {"Content-Type": "text/xml"});
  }
};
<?xml version="1.0" encoding="UTF-8"?>
<pop:sitemap:urlset>
<urlset
      xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
            http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
  <pop:urls>
    <url>
      <pop:sm:url wrap="loc"/>
      <pop:updated_at format="yyyy-mm-dd" wrap="lastmod" />
    </url>
  </pop:urls>
  <pop:urls2>
    <url>
      <pop:sm:url wrap="loc"/>
      <pop:updated_at format="yyyy-mm-dd" wrap="lastmod" />
    </url>
  </pop:urls2>
</urlset>
</pop:sitemap:urlset>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions