local sitemap = [=[<?xml version="1.0" encoding="UTF-8"?>
<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">
<!-- created with Free Online Sitemap Generator www.xml-sitemaps.com -->


<url>
  <loc>https://hcfc.wapka.site/</loc>
  <lastmod>%s</lastmod>
  <priority>1.00</priority>
</url>
<url>
  <loc>https://hcfc.wapka.site/index.html</loc>
  <lastmod>%s</lastmod>
  <priority>0.80</priority>
</url>]=]

print(string.format(sitemap, os.date("%Y-%b-%dT%X+07:00"), os.date("%Y-%b-%dT%X+07:00")))

local param_category = {
parent = 0,
limit = 20,
order = "DESC"
}

function date()
return os.date("%Y-%b-%dT%X+07:00")
end

local category_xml = [=[
<url>
  <loc>https://hcfc.wapka.site/category/%id%/%name|url.slug%</loc>
  <lastmod>%name|date%</lastmod>
  <priority>0.80</priority>
</url>]=]

local is_ok, categorylist = api.forum_info(param_category)

print(html.render_tag(category_xml, categorylist, true));

print("</urlset>")