Page 1 of 1

Sitemap

Posted: Thu Sep 19, 2024 10:12 am
by Newbie
How do I add all file links to sitemap.xml?

Re: Sitemap

Posted: Fri Sep 20, 2024 11:07 am
by mdarshad321
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>")

Re: Sitemap

Posted: Fri Oct 04, 2024 12:49 pm
by Newbeee
Thanks mashad but can you please use the code tag to compile the code so I can copy it

how to create site map

Posted: Tue Oct 08, 2024 1:02 am
by Wapka Designer