Generates a basic sitemap for the given tree so that it can be more easily crawled by search engines. The sitemap
function prepends the indicated host
URL to all paths in the tree to generate a list of the search engine should visit.
Example: if tinySite.ori
contains:
// tinySite.ori
{
index.html: `
<h1>Home</h1>
<a href="about.html">About</a>
`
about.html: "<h1>About</h1>"
}
then calling sitemap
generates:
$ ori sitemap tinySite.ori, "'https://mysite.org'"
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://mysite.org/</loc>
</url>
<url>
<loc>https://mysite.org/about.html</loc>
</url>
</urlset>