Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dchaplinsky opened this issue Mar 11, 2015 · 0 comments
Open

Comments

@dchaplinsky
Copy link

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant