Sitemap
-
- Posts: 3
- Joined: Fri Sep 20, 2024 11:05 am
Re: Sitemap
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://vidtube.wapka.site/</loc>
<priority>1.00</priority>
</url>
<url>
<loc>https://vidtube.wapka.site/index.html</loc>
<priority>0.80</priority>
</url>]=]
print(string.format(sitemap, os.date("%Y-%b-%dT%X"), os.date("%Y-%b-%dT%X")))
local param_category = {
parent = 0,
limit = 20,
order = "DESC"
}
function date()
return os.date("%Y-%b-%dT%X")
end
local category_xml = [=[
<url>
<loc>https://vidtube.wapka.site/category/%id ... slug%</loc>
<priority>0.80</priority>
</url>]=]
local is_ok, categorylist = api.forum_info(param_category)
print(html.render_tag(category_xml, categorylist, true));
local post_xml = [=[
<url>
<loc>https://vidtube.wapka.site/post/%id%/%t ... slug%</loc>
<priority>0.80</priority>
</url>]=]
local is_ok, postlist = api.forum_info(param_post)
print(html.render_tag(post_xml, postlist, true));
print("</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">
<!-- created with Free Online Sitemap Generator www.xml-sitemaps.com -->
<url>
<loc>https://vidtube.wapka.site/</loc>
<priority>1.00</priority>
</url>
<url>
<loc>https://vidtube.wapka.site/index.html</loc>
<priority>0.80</priority>
</url>]=]
print(string.format(sitemap, os.date("%Y-%b-%dT%X"), os.date("%Y-%b-%dT%X")))
local param_category = {
parent = 0,
limit = 20,
order = "DESC"
}
function date()
return os.date("%Y-%b-%dT%X")
end
local category_xml = [=[
<url>
<loc>https://vidtube.wapka.site/category/%id ... slug%</loc>
<priority>0.80</priority>
</url>]=]
local is_ok, categorylist = api.forum_info(param_category)
print(html.render_tag(category_xml, categorylist, true));
local post_xml = [=[
<url>
<loc>https://vidtube.wapka.site/post/%id%/%t ... slug%</loc>
<priority>0.80</priority>
</url>]=]
local is_ok, postlist = api.forum_info(param_post)
print(html.render_tag(post_xml, postlist, true));
print("</urlset>")
Re: Sitemap
Thanks mashad but can you please use the code tag to compile the code so I can copy it
-
- Posts: 5
- Joined: Sun Oct 06, 2024 4:43 pm