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

@@ -48,7 +48,12 @@ Route::get('/sitemap-books-:page', function (\think\Request $Request, SiteContex
return view('sitemap/sitemap-books.xml');
})->ext('xml');
/**
* 小说详情页面。
*/
Route::get('/sitemap-forget-books-:page', function (\think\Request $Request, SiteContext $SiteContext) {
return view('sitemap/sitemap-forget-books.xml');
})->ext('xml');
/**
* 章节页面(如果包含)

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,10 +27,10 @@ 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}

View File

@@ -1,14 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{novel:pagerexp page="$Request.get.page" limit="50000"
{novel:pagerexp page="$Request.get.page" limit="40000"
sort_type="news"
d_key="key"
d_val="Novel"
p_val="page_data" button_num="10" cache_life="86400" func="generateSearchPager" export_name="resData" /}
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">
<!-- // 根据分页查询,按顺序 每页 50000个小说 -->
{foreach $resData.data as $key=>$Novel}
<url>
<loc>https://www.{$DomainModel->d_domain}{site:nclurl n_id="$Novel.n_id" n_py="$Novel.n_name_pinyin" order="zheng" page="1"/}</loc>
<lastmod>2025-04-21</lastmod>
<lastmod>{:date('Y-m-d')}</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>

View File

@@ -1,17 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{novel:pagerexp page="$Request.get.page" limit="50000"
{novel:pagerexp page="$Request.get.page" limit="40000"
sort_type="news"
d_key="key"
d_val="Novel"
p_val="page_data" button_num="10" cache_life="86400" func="generateSearchPager" export_name="resData" /}
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">
<!-- // 根据分页查询,按顺序 每页 50000个小说 -->
{foreach $resData.data as $key=>$Novel}
<url>
<loc>https://www.{$DomainModel->d_domain}{site:nurl n_id="$Novel->n_id" n_py="$Novel->n_name_pinyin"/}</loc>
<lastmod>2025-04-21</lastmod>
<lastmod>{:date('Y-m-d')}</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
{/foreach}
<!-- 最多 50,000 个 <url> 条目 -->
</urlset>

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>
<lastmod>2025-04-21</lastmod>
<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

@@ -2,7 +2,14 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.{$DomainModel->d_domain}/</loc>
<lastmod>2025-04-21</lastmod>
<lastmod>{:date('Y-m-d')}</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://www.{$DomainModel->d_domain}{$strRankUrlTemp}</loc>
<lastmod>{:date('Y-m-d')}</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
@@ -15,7 +22,7 @@
{novel:status d_key="status_key" d_val="strStatusName"}
<url>
<loc>https://www.{$DomainModel->d_domain}{site:nflurl category="$strCategoryPinyin" order="$sort_key" status="$status_key" /}</loc>
<lastmod>2025-04-21</lastmod>
<lastmod>{:date('Y-m-d')}</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>

View File

@@ -1,37 +1,39 @@
{novel:pagerexp page="1" limit="40000"
sort_type="news"
d_key="d_key"
d_val="Novel"
cache_life="86400" func="generateCategoryPager" export_name="resData" /}
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://www.example.com/sitemap-main.xml</loc>
<lastmod>2025-04-21</lastmod>
<loc>https://www.{$DomainModel->d_domain}/sitemap-main.xml</loc>
<lastmod>{:date('Y-m-d')}</lastmod>
</sitemap>
<!--小说总数量/50000 得出 sitemap-books 一共有多少个 -->
{for start="0" end="$resData.p_data.pages"}
<sitemap>
<loc>https://www.example.com/sitemap-books-1.xml</loc>
<lastmod>2025-04-21</lastmod>
<loc>https://www.{$DomainModel->d_domain}/sitemap-books-{$i+1}.xml</loc>
<lastmod>{:date('Y-m-d')}</lastmod>
</sitemap>
<sitemap>
<loc>https://www.example.com/sitemap-books-2.xml</loc>
<lastmod>2025-04-21</lastmod>
</sitemap>
<!-- ...小说总数量/50000 得出 sitemap-books一共有多少个 -->
{/for}
<!-- 小说总数量/50000 得出 sitemap-books-catalog一共有多少个,每个小说只取一个目录链接,分页不需要加入去 -->
{for start="0" end="$resData.p_data.pages"}
<sitemap>
<loc>https://www.example.com/sitemap-books-catalog-1.xml</loc>
<lastmod>2025-04-21</lastmod>
<loc>https://www.{$DomainModel->d_domain}/sitemap-books-catalog-{$i+1}.xml</loc>
<lastmod>{:date('Y-m-d')}</lastmod>
</sitemap>
<sitemap>
<loc>https://www.example.com/sitemap-books-catalog-2.xml</loc>
<lastmod>2025-04-21</lastmod>
</sitemap>
<!-- ...小说总数量/50000 得出 sitemap-books-catalog一共有多少个,每个小说只取一个目录链接,分页不需要加入去 -->
{/for}
<!-- 小说章节取最新章节 -->
{for start="0" end="$resData.p_data.pages"}
<sitemap>
<loc>https://www.example.com/sitemap-chapters-1.xml</loc>
<lastmod>2025-04-21</lastmod>
<loc>https://www.{$DomainModel->d_domain}/sitemap-chapters-{$i+1}.xml</loc>
<lastmod>{:date('Y-m-d')}</lastmod>
</sitemap>
<sitemap>
<loc>https://www.example.com/sitemap-chapters-2.xml</loc>
<lastmod>2025-04-21</lastmod>
</sitemap>
<!-- ...小说章节取最新50w条 这里生成10个索引文件即可 -->
{/for}
</sitemapindex>

View File

@@ -12,12 +12,12 @@
<!-- 社交媒体标签 -->
<meta property="og:title" content='{site:replace code="NOVEL@GETNOVELRANK@TITLE"}' />
<meta property="og:description" content='{site:replace code="NOVEL@GETNOVELRANK@DESCRIPTION"}' />
<meta property="og:url" content="https://{$DomainModel->d_domain}/paihang/all" />
<meta property="og:url" content="https://{$DomainModel->d_domain}{$strRankUrlTemp}" />
<meta property="og:type" content="book" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://{$DomainModel->d_domain}/paihang/all",
"@context": "https://{$DomainModel->d_domain}{$strRankUrlTemp}",
"@type": "book",
"headline": '{site:replace code="NOVEL@GETNOVELRANK@TITLE"}',
"description": '{site:replace code="NOVEL@GETNOVELRANK@DESCRIPTION"}',

View File

@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<!-- // TODO 根据分页查询,按顺序 每页 50000个小说 -->
{novel:pagerexp page="$Request.get.page" limit="50000"
{novel:pagerexp page="$Request.get.page" limit="40000"
sort_type="news"
d_key="key"
d_val="Novel"
p_val="page_data" button_num="10" cache_life="86400" func="generateSearchPager" export_name="resData" /}
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">
<!-- // 根据分页查询,按顺序 每页 50000个小说 -->
{foreach $resData.data as $key=>$Novel}
<url>

View File

@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<!-- // TODO 根据分页查询,按顺序 每页 50000个小说 -->
{novel:pagerexp page="$Request.get.page" limit="50000"
{novel:pagerexp page="$Request.get.page" limit="40000"
sort_type="news"
d_key="key"
d_val="Novel"
p_val="page_data" button_num="10" cache_life="86400" func="generateSearchPager" export_name="resData" /}
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">
<!-- // 根据分页查询,按顺序 每页 50000个小说 -->
{foreach $resData.data as $key=>$Novel}
<url>
@@ -14,5 +16,5 @@ p_val="page_data" button_num="10" cache_life="86400" func="generateSearchPager"
<priority>0.8</priority>
</url>
{/foreach}
<!-- 最多 50,000 个 <url> 条目 -->
</urlset>

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

@@ -7,6 +7,24 @@
<priority>1.0</priority>
</url>
<!-- 排行榜 -->
<url>
<loc>https://www.{$DomainModel->d_domain}{$strRankUrlTemp}</loc>
<lastmod>{:date('Y-m-d')}</lastmod>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
{novel:status d_key="status_key" d_val="val"}
{novel:ranksort d_key="sot_key" d_val="val"}
<url>
<loc>https://www.{$DomainModel->d_domain}{site:rankurl status="$status_key" order="$sot_key" page="1"/}</loc>
<lastmod>{:date('Y-m-d')}</lastmod>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
{/novel:ranksort}
{/novel:status}
<!-- 分类 -->
{novel:category d_key="strCategoryPinyin" d_val="strCategoryName"}
<!-- 排序 -->

View File

@@ -1,3 +1,9 @@
{novel:pagerexp page="1" limit="40000"
sort_type="news"
d_key="d_key"
d_val="Novel"
cache_life="86400" func="generateCategoryPager" export_name="resData" /}
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
@@ -5,30 +11,26 @@
<lastmod>{:date('Y-m-d')}</lastmod>
</sitemap>
<!-- TODO 小说总数量/50000 得出 sitemap-books一共有多少个 -->
<!--小说总数量/50000 得出 sitemap-books 一共有多少个 -->
{for start="0" end="$resData.p_data.pages"}
<sitemap>
<loc>https://www.{$DomainModel->d_domain}/sitemap-books-1.xml</loc>
<lastmod>{:date('Y-m-d')}</lastmod>
</sitemap>
<sitemap>
<loc>https://www.{$DomainModel->d_domain}/sitemap-books-2.xml</loc>
<loc>https://www.{$DomainModel->d_domain}/sitemap-books-{$i+1}.xml</loc>
<lastmod>{:date('Y-m-d')}</lastmod>
</sitemap>
{/for}
<!-- TODO 小说总数量/50000 得出 sitemap-books-catalog一共有多少个,每个小说只取一个目录链接,分页不需要加入去 -->
<!-- 小说总数量/50000 得出 sitemap-books-catalog一共有多少个,每个小说只取一个目录链接,分页不需要加入去 -->
{for start="0" end="$resData.p_data.pages"}
<sitemap>
<loc>https://www.{$DomainModel->d_domain}/sitemap-books-catalog-1.xml</loc>
<lastmod>{:date('Y-m-d')}</lastmod>
</sitemap>
<sitemap>
<loc>https://www.{$DomainModel->d_domain}/sitemap-books-catalog-2.xml</loc>
<loc>https://www.{$DomainModel->d_domain}/sitemap-books-catalog-{$i+1}.xml</loc>
<lastmod>{:date('Y-m-d')}</lastmod>
</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}