Is there a way to generate an XML sitemap?

It’s nice that the sitemap is auto-generated. But sitemap only seems to include a few pages and none of the dynamic pages. So with 50K pages it includes 4 only. Is there a way to include the dynamic pages in there as well?