This commit is contained in:
make
2025-04-23 15:45:37 +08:00
parent 30270ea7c3
commit 485ef71f9a
14 changed files with 156 additions and 91 deletions

View File

@@ -1,11 +1,18 @@
{novel:pagerexp page="$Request.get.page" limit="40000"
sort_type="news"
d_key="key"
d_val="Novel"
cache_life="86400" func="generateCategoryPager" export_name="resData" /}
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<!-- // TODO 根据分页 查询最新 50000条章节 -->
{foreach $resData.data as $key=>$Novel}
<url>
<loc>https://www.{$DomainModel->d_domain}/chapters1</loc>
<loc>https://www.{$DomainModel->d_domain}{site:lcpurl n_id="$Novel.n_id" n_py="$Novel.n_name_pinyin" /}</loc>
<lastmod>{:date('Y-m-d')}</lastmod>
<changefreq>weekly</changefreq>
<priority>0.6</priority>
</url>
<!-- 最多 50,000 个 <url> 条目 -->
{/foreach}
</urlset>

View File

@@ -27,13 +27,13 @@ cache_life="86400" func="generateCategoryPager" export_name="resData" /}
</sitemap>
{/for}
<!-- 小说章节取最新50w条 这里生成10个索引文件即可 -->
{for start="1" end="11"}
<!-- 小说章节取最新章节 -->
{for start="0" end="$resData.p_data.pages"}
<sitemap>
<loc>https://www.{$DomainModel->d_domain}/sitemap-chapters-{$i}.xml</loc>
<loc>https://www.{$DomainModel->d_domain}/sitemap-chapters-{$i+1}.xml</loc>
<lastmod>{:date('Y-m-d')}</lastmod>
</sitemap>
{/for}
</sitemapindex>