debug
This commit is contained in:
@@ -56,7 +56,7 @@ button_num="10" cache_life="86400" func="generateCategoryPager" export_name="res
|
||||
|
||||
{block name="logo-html"}
|
||||
<h1 class="logo">
|
||||
<a href="/">{$DomainModel->d_name}-{$Request.route.strGender}{$Request.route.strCategory}{$Request.route.strStatus}免费阅读</a>
|
||||
<a href="/">{$DomainModel->d_name}-{site:getval code="strNovelSex" /}{site:getval code="strNovelCategoryName" /}{site:getval code="strNovelStatus" /}免费阅读</a>
|
||||
</h1>
|
||||
{/block}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
{block name="get-data"}
|
||||
{if $Request.route.intNovelId}
|
||||
{novel:info n_id="$Request.route.intNovelId" n_key="arrNovel" n_forge_id="0" /}
|
||||
{novel:info n_id="$Request.route.intNovelId" n_key="arrNovel" n_forge_id="$Request.route.intForgeId" /}
|
||||
{else}
|
||||
{novel:info n_id="$DomainModel->info_id" n_key="arrNovel" n_forge_id="0" /}
|
||||
{/if}
|
||||
@@ -191,7 +191,9 @@
|
||||
</p>
|
||||
<p class="xianglingtuijian">相邻推荐:
|
||||
{volist name="arrNovel.n_forge_novel" id="ForgeNovel" key="key"}
|
||||
{if $key < 100}
|
||||
{$arrGrm[$key+20]|raw}
|
||||
{/if}
|
||||
<a
|
||||
href='{site:nnurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" n_fid="$ForgeNovel.n_forge_id"/}'>{$ForgeNovel.n_forge_title}</a>
|
||||
{/volist}
|
||||
@@ -210,9 +212,11 @@
|
||||
</div>
|
||||
<div class="attentions">
|
||||
<ul class="clearfix">
|
||||
{chapter:list count="10" sort_type="dao" n_id="$arrNovel.n_id" d_key="d_key" d_val="Chapter" cache_life="86400"}
|
||||
{chapter:list count="10" sort_type="dao" n_id="$arrNovel.n_id" d_key="key" d_val="Chapter" cache_life="86400"}
|
||||
<li>
|
||||
{$arrGrm[$key]|raw}
|
||||
{if $key < 100}
|
||||
{$arrGrm[$key+20]|raw}
|
||||
{/if}
|
||||
<a href='{site:cpurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" c_sort="$Chapter.c_sort_num" c_page="0"/}'
|
||||
title="{$arrNovel.n_name}-{$Chapter.c_name}">{$Chapter.c_name}</a>
|
||||
</li>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
{block name="get-data"}
|
||||
{if $Request.route.intNovelId}
|
||||
{novel:info n_id="$Request.route.intNovelId" n_key="arrNovel" n_forge_id="0" /}
|
||||
{novel:info n_id="$Request.route.intNovelId" n_key="arrNovel" n_forge_id="$Request.route.intForgeId" /}
|
||||
{else}
|
||||
{novel:info n_id="$DomainModel->info_id" n_key="arrNovel" n_forge_id="0" /}
|
||||
{/if}
|
||||
@@ -225,7 +225,7 @@
|
||||
</div>
|
||||
<div class="pl_con">
|
||||
{volist name="arrNovel.n_forge_novel" id="ForgeNovel" key="key"}
|
||||
{if $key<20 } {$arrGrm[$key+20]|raw} {/if} <a
|
||||
{if $key<100 } {$arrGrm[$key+20]|raw} {/if} <a
|
||||
href='{$strPcPath}{site:nnurl n_id="$arrNovel.n_id" n_py="$arrNovel.n_name_pinyin" n_fid="$ForgeNovel.n_forge_id"/}'
|
||||
class="red">{$ForgeNovel.n_forge_title}</a>
|
||||
{/volist}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<a href="/site.txt">网站地图</a>
|
||||
{site:forgelist count="30" d_key="d_key" d_val="ForgeNovel" cache_life="86400"}
|
||||
<a
|
||||
href='{$strPcPath}{site:nnurl n_id="$ForgeNovel.n_id" n_py="$ForgeNovel.n_name_pinyin" n_fid="$ForgeNovel.n_forge_id"/}'>
|
||||
href='{site:nnurl n_id="$ForgeNovel.n_id" n_py="$ForgeNovel.n_name_pinyin" n_fid="$ForgeNovel.n_forge_id"/}'>
|
||||
{$ForgeNovel.n_forge_title}
|
||||
</a>
|
||||
{/site:forgelist}
|
||||
|
||||
294
code/app/home/view/kuangYu/sitemap/index.md
Normal file
294
code/app/home/view/kuangYu/sitemap/index.md
Normal file
@@ -0,0 +1,294 @@
|
||||
对于一个小说站点(如你提到的包含首页、分类列表、排行榜、男生/女生频道、详情页面、章节页面、目录页面等),配置 Sitemap 时需要根据页面类型的重要性和 SEO 目标选择性地包含 URL,并合理组织以优化搜索引擎抓取和索引。以下是针对小说站点特点的 Sitemap 配置建议,包括哪些页面应该包含、如何处理大量 URL,以及相关的最佳实践。
|
||||
|
||||
---
|
||||
|
||||
### 一、小说站点页面类型分析
|
||||
根据你提供的信息,小说站点的页面类型可以分为以下几类,每类页面的 SEO 价值和是否需要包含在 Sitemap 中有所不同:
|
||||
|
||||
| 页面类型 | 描述 | SEO 价值 | 是否包含在 Sitemap |
|
||||
|------------------|----------------------------------------------------------------------|---------------------------------------|--------------------|
|
||||
| **首页** | 网站主入口,通常包含推荐小说、导航等。 | 高(核心流量入口) | 是 |
|
||||
| **分类列表** | 按题材、类型(如玄幻、言情)展示小说列表,可能有多页(如 `page=2`)。| 高(引导用户到具体小说) | 是(仅包含主页面) |
|
||||
| **排行榜** | 热门小说排行,可能按日、周、月或类型(如男生/女生)排序。 | 中到高(吸引点击,动态更新) | 是(视情况精选) |
|
||||
| **男生/女生频道**| 针对不同用户群的分类页面(如男生玄幻、女生穿越)。 | 高(细分用户需求) | 是 |
|
||||
| **详情页面** | 小说详情页,包含简介、封面、目录链接等。 | 高(核心转化页面) | 是 |
|
||||
| **章节页面** | 小说具体章节内容,通常数量庞大。 | 中到低(内容分散,SEO 价值有限) | 视情况(可选) |
|
||||
| **目录页面** | 小说章节列表,汇总所有章节链接。 | 中(便于用户导航,SEO 价值中等) | 是 |
|
||||
|
||||
---
|
||||
|
||||
### 二、Sitemap 配置策略
|
||||
#### 1. 哪些 URL 应该包含?
|
||||
基于小说站点的特点,建议优先包含以下页面:
|
||||
|
||||
- **首页**:
|
||||
- 包含站点的唯一首页 URL(如 `https://www.example.com/`)。
|
||||
- 设置高优先级(如 `<priority>1.0</priority>`)和频繁更新(如 `<changefreq>daily</changefreq>`)。
|
||||
|
||||
- **分类列表(主页面)**:
|
||||
- 包含每个分类的主页面(如 `https://www.example.com/category/xuanhuan`)。
|
||||
- 排除分页 URL(如 `https://www.example.com/category/xuanhuan?page=2`),因为分页内容重复且 SEO 价值低。
|
||||
- 示例:玄幻、言情、历史等分类页面。
|
||||
|
||||
- **男生/女生频道**:
|
||||
- 包含频道主页(如 `https://www.example.com/male`、`https://www.example.com/female`)。
|
||||
- 如果频道下有子分类(如男生玄幻、女生穿越),也应包含。
|
||||
|
||||
- **排行榜(精选)**:
|
||||
- 包含主要排行榜页面(如 `https://www.example.com/rank/hot`、`https://www.example.com/rank/male`)。
|
||||
- 如果排行榜页面频繁更新(如每日排行),可设置 `<changefreq>daily</changefreq>`。
|
||||
- 排除次要或动态参数页面(如 `?sort=week`),避免重复内容。
|
||||
|
||||
- **详情页面**:
|
||||
- 包含所有小说详情页面(如 `https://www.example.com/book/123`)。
|
||||
- 这些页面是 SEO 的核心,吸引搜索流量(如用户搜索小说名)。
|
||||
- 使用 `<lastmod>` 反映小说更新时间,提示搜索引擎重新抓取。
|
||||
|
||||
- **目录页面**:
|
||||
- 包含每个小说的目录页面(如 `https://www.example.com/book/123/chapters`)。
|
||||
- 目录页面便于用户导航,且可能被搜索引擎索引为长尾关键词(如“小说名 章节列表”)。
|
||||
|
||||
- **章节页面(可选)**:
|
||||
- **不建议全部包含**:小说章节页面数量庞大(可能数十万到数百万),SEO 价值较低(用户很少通过搜索直接进入具体章节)。
|
||||
- **可选策略**:
|
||||
- 只包含最新章节(如最近 30 天的章节),吸引搜索引擎抓取更新内容。
|
||||
- 只包含热门小说的前几章(如前 10 章),作为引流入口。
|
||||
- 如果包含,设置较低优先级(如 `<priority>0.3</priority>`)。
|
||||
|
||||
#### 2. 哪些 URL 应该排除?
|
||||
- **分页 URL**:如分类列表的 `?page=2`,重复内容无 SEO 价值。
|
||||
- **动态参数 URL**:如 `?sort=latest` 或 `?utm_source=...`,应规范化到标准 URL。
|
||||
- **不可索引页面**:
|
||||
- 已设置 `<meta name="robots" content="noindex">` 的页面。
|
||||
- 被 `robots.txt` 屏蔽的页面(如 `Disallow: /user/`)。
|
||||
- **用户生成内容**:
|
||||
- 如评论页、用户个人中心、搜索结果页(`?q=keyword`)。
|
||||
- **临时页面**:
|
||||
- 如促销活动页、测试页面。
|
||||
- **错误页面**:如 404、500 页面。
|
||||
|
||||
---
|
||||
|
||||
### 三、处理大量 URL 的策略
|
||||
小说站点通常有大量 URL(尤其是章节页面),可能超过 Sitemap 的限制(50,000 条 URL 或 50MB)。以下是应对方法:
|
||||
|
||||
#### 1. 使用 Sitemap 索引文件
|
||||
- 将 URL 分组到多个子 Sitemap 文件(如 `sitemap-books.xml`、`sitemap-chapters.xml`),每文件不超过 50,000 条 URL。
|
||||
- 创建一个 Sitemap 索引文件(如 `sitemap_index.xml`)引用所有子 Sitemap。
|
||||
- 示例:
|
||||
```xml
|
||||
<?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>
|
||||
</sitemap>
|
||||
<sitemap>
|
||||
<loc>https://www.example.com/sitemap-books.xml</loc>
|
||||
<lastmod>2025-04-21</lastmod>
|
||||
</sitemap>
|
||||
<sitemap>
|
||||
<loc>https://www.example.com/sitemap-chapters.xml</loc>
|
||||
<lastmod>2025-04-21</lastmod>
|
||||
</sitemap>
|
||||
</sitemapindex>
|
||||
```
|
||||
|
||||
#### 2. 分组策略
|
||||
- **按页面类型分组**:
|
||||
- `sitemap-main.xml`:首页、分类列表、排行榜、男生/女生频道。
|
||||
- `sitemap-books.xml`:小说详情页面和目录页面。
|
||||
- `sitemap-chapters.xml`:章节页面(如果包含)。
|
||||
- **按更新频率分组**:
|
||||
- 频繁更新的页面(如排行榜、最新章节)单独分组,设置 `<changefreq>daily</changefreq>`。
|
||||
- **按小说分组**:
|
||||
- 为每部小说生成单独的 Sitemap(如 `sitemap-book123.xml`),包含其详情页、目录页和部分章节页。
|
||||
|
||||
#### 3. 动态生成 Sitemap
|
||||
- **脚本生成**:
|
||||
- 使用 Python、PHP 等脚本从数据库查询 URL,生成 Sitemap 文件。
|
||||
- 示例(Python,参考前文):
|
||||
```python
|
||||
from lxml import etree
|
||||
import datetime
|
||||
|
||||
# 模拟数据库查询
|
||||
urls = [
|
||||
{'loc': 'https://www.example.com/', 'lastmod': '2025-04-21', 'changefreq': 'daily', 'priority': '1.0'},
|
||||
{'loc': 'https://www.example.com/book/123', 'lastmod': '2025-04-21', 'changefreq': 'weekly', 'priority': '0.8'},
|
||||
{'loc': 'https://www.example.com/book/123/chapters', 'lastmod': '2025-04-21', 'changefreq': 'weekly', 'priority': '0.6'},
|
||||
]
|
||||
|
||||
urlset = etree.Element("urlset", xmlns="http://www.sitemaps.org/schemas/sitemap/0.9")
|
||||
for url in urls:
|
||||
url_element = etree.SubElement(urlset, "url")
|
||||
loc = etree.SubElement(url_element, "loc")
|
||||
loc.text = url['loc']
|
||||
lastmod = etree.SubElement(url_element, "lastmod")
|
||||
lastmod.text = url['lastmod']
|
||||
changefreq = etree.SubElement(url_element, "changefreq")
|
||||
changefreq.text = url['changefreq']
|
||||
priority = etree.SubElement(url_element, "priority")
|
||||
priority.text = url['priority']
|
||||
|
||||
tree = etree.ElementTree(urlset)
|
||||
tree.write("sitemap-main.xml", pretty_print=True, xml_declaration=True, encoding="UTF-8")
|
||||
```
|
||||
|
||||
- **定时任务**:
|
||||
- 使用 cron 任务每天或每周生成 Sitemap,上传到根目录。
|
||||
- 示例(Linux cron):
|
||||
```bash
|
||||
0 2 * * * python3 /path/to/generate_sitemap.py
|
||||
```
|
||||
|
||||
- **触发式更新**:
|
||||
- 在小说更新(如新章节发布)时,触发脚本更新相关 Sitemap。
|
||||
|
||||
#### 4. 伪静态 Sitemap
|
||||
- 配置服务器将 `sitemap_index.xml` 等请求重定向到动态脚本,实时生成 XML 内容。
|
||||
- 示例(Apache + PHP,参考前文):
|
||||
```apache
|
||||
RewriteEngine On
|
||||
RewriteRule ^sitemap_index\.xml$ sitemap_index.php [L]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 四、robots.txt 配置
|
||||
在 `robots.txt` 中声明 Sitemap 索引文件,使用绝对路径:
|
||||
```txt
|
||||
User-agent: *
|
||||
Disallow: /user/
|
||||
Disallow: /search/
|
||||
Sitemap: https://www.example.com/sitemap_index.xml
|
||||
```
|
||||
|
||||
- 确保不通过 `Disallow` 屏蔽 Sitemap 文件。
|
||||
- 如果 Sitemap 托管在 CDN(如 `https://cdn.example.com/sitemap_index.xml`),在 `robots.txt` 中使用 CDN 地址,并验证所有权。
|
||||
|
||||
---
|
||||
|
||||
### 五、SEO 优化建议
|
||||
1. **优先级设置**:
|
||||
- 首页:`<priority>1.0</priority>`
|
||||
- 分类/频道/详情页:`<priority>0.8</priority>`
|
||||
- 目录页:`<priority>0.6</priority>`
|
||||
- 章节页(若包含):`<priority>0.3</priority>`
|
||||
|
||||
2. **更新频率**:
|
||||
- 首页、排行榜:`<changefreq>daily</changefreq>`
|
||||
- 分类/频道/详情/目录页:`<changefreq>weekly</changefreq>`
|
||||
- 章节页:`<changefreq>monthly</changefreq>`(或 `never` 如果不频繁更新)
|
||||
|
||||
3. **规范化 URL**:
|
||||
- 确保只包含规范 URL(如 `https://www.example.com/book/123` 而非 `http://example.com/book/123`)。
|
||||
- 使用 `<link rel="canonical">` 或 Sitemap 统一规范版本。
|
||||
|
||||
4. **避免重复内容**:
|
||||
- 排除带参数的 URL(如 `?sort=latest`)。
|
||||
- 如果男生/女生频道与分类列表有重复内容,选择主要入口包含在 Sitemap 中。
|
||||
|
||||
5. **图片 Sitemap(可选)**:
|
||||
- 为小说封面图片创建图片 Sitemap,优化图片搜索排名。
|
||||
- 示例:
|
||||
```xml
|
||||
<url>
|
||||
<loc>https://www.example.com/book/123</loc>
|
||||
<image:image>
|
||||
<image:loc>https://www.example.com/images/book123.jpg</image:loc>
|
||||
<image:title>小说封面</image:title>
|
||||
</image:image>
|
||||
</url>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 六、注意事项
|
||||
1. **章节页面数量庞大**:
|
||||
- 如果每部小说有数百章节,章节页面可能占主导。建议只包含最新或热门章节,或完全排除章节页面,依靠目录页面引导爬虫。
|
||||
2. **抓取预算**:
|
||||
- 小说站点 URL 数量多,需优化 Sitemap 避免浪费搜索引擎的抓取预算。
|
||||
3. **动态更新**:
|
||||
- 小说站点内容更新频繁(如新章节发布),建议动态生成 Sitemap 或频繁更新。
|
||||
4. **验证 Sitemap**:
|
||||
- 提交 `sitemap_index.xml` 到 Google Search Console、Bing Webmaster Tools,检查是否被正确解析。
|
||||
- 使用 GSC 的“索引覆盖率”报告,确认重要页面(如详情页)是否被索引。
|
||||
|
||||
---
|
||||
|
||||
### 七、示例 Sitemap 配置
|
||||
#### 索引文件(`sitemap_index.xml`)
|
||||
```xml
|
||||
<?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>
|
||||
</sitemap>
|
||||
<sitemap>
|
||||
<loc>https://www.example.com/sitemap-books.xml</loc>
|
||||
<lastmod>2025-04-21</lastmod>
|
||||
</sitemap>
|
||||
</sitemapindex>
|
||||
```
|
||||
|
||||
#### 主 Sitemap(`sitemap-main.xml`)
|
||||
```xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<url>
|
||||
<loc>https://www.example.com/</loc>
|
||||
<lastmod>2025-04-21</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.example.com/category/xuanhuan</loc>
|
||||
<lastmod>2025-04-21</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.example.com/male</loc>
|
||||
<lastmod>2025-04-21</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.example.com/rank/hot</loc>
|
||||
<lastmod>2025-04-21</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>0.7</priority>
|
||||
</url>
|
||||
</urlset>
|
||||
```
|
||||
|
||||
#### 小说 Sitemap(`sitemap-books.xml`)
|
||||
```xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<url>
|
||||
<loc>https://www.example.com/book/123</loc>
|
||||
<lastmod>2025-04-21</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://www.example.com/book/123/chapters</loc>
|
||||
<lastmod>2025-04-21</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>0.6</priority>
|
||||
</url>
|
||||
</urlset>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 八、结论
|
||||
- **不需包含所有 URL**:小说站点应优先包含首页、分类列表、男生/女生频道、排行榜、详情页面和目录页面。章节页面可根据需要部分包含或完全排除。
|
||||
- **精选策略**:重点包含 SEO 价值高的页面(如详情页),排除分页、动态参数、低价值页面。
|
||||
- **大型站点处理**:使用 Sitemap 索引文件和子 Sitemap,按页面类型分组,动态生成以应对大量 URL。
|
||||
- **SEO 优化**:设置合理的 `<priority>` 和 `<changefreq>`,定期更新 Sitemap,验证索引效果。
|
||||
|
||||
如果你需要针对小说站点的具体脚本(生成 Sitemap 或伪静态配置)、CMS 插件推荐,或其他细节(如图片 Sitemap、robots.txt 优化),请告诉我!
|
||||
3
code/app/home/view/kuangYu/sitemap/robots.txt
Normal file
3
code/app/home/view/kuangYu/sitemap/robots.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
User-agent: *
|
||||
Disallow:
|
||||
Sitemap: https://{$DomainModel->d_domain}/sitemap_index.xml
|
||||
17
code/app/home/view/kuangYu/sitemap/sitemap-books-catalog.xml
Normal file
17
code/app/home/view/kuangYu/sitemap/sitemap-books-catalog.xml
Normal file
@@ -0,0 +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"
|
||||
d_key="key"
|
||||
d_val="Novel"
|
||||
p_val="page_data" button_num="10" cache_life="86400" func="generateSearchPager" export_name="resData" /}
|
||||
|
||||
{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>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
{/foreach}
|
||||
<!-- 最多 50,000 个 <url> 条目 -->
|
||||
</urlset>
|
||||
17
code/app/home/view/kuangYu/sitemap/sitemap-books.xml
Normal file
17
code/app/home/view/kuangYu/sitemap/sitemap-books.xml
Normal file
@@ -0,0 +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"
|
||||
d_key="key"
|
||||
d_val="Novel"
|
||||
p_val="page_data" button_num="10" cache_life="86400" func="generateSearchPager" export_name="resData" /}
|
||||
|
||||
{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>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
{/foreach}
|
||||
<!-- 最多 50,000 个 <url> 条目 -->
|
||||
</urlset>
|
||||
11
code/app/home/view/kuangYu/sitemap/sitemap-chapters.xml
Normal file
11
code/app/home/view/kuangYu/sitemap/sitemap-chapters.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<!-- // TODO 根据分页 查询最新 50000条章节 -->
|
||||
<url>
|
||||
<loc>https://www.{$DomainModel->d_domain}/chapters1</loc>
|
||||
<lastmod>2025-04-21</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>0.6</priority>
|
||||
</url>
|
||||
<!-- 最多 50,000 个 <url> 条目 -->
|
||||
</urlset>
|
||||
28
code/app/home/view/kuangYu/sitemap/sitemap-main.xml
Normal file
28
code/app/home/view/kuangYu/sitemap/sitemap-main.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<url>
|
||||
<loc>https://www.{$DomainModel->d_domain}/</loc>
|
||||
<lastmod>2025-04-21</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
|
||||
<!-- 分类 -->
|
||||
{novel:category d_key="strCategoryPinyin" d_val="strCategoryName"}
|
||||
<!-- 排序 -->
|
||||
{novel:sort d_key="sort_key" d_val="strSortName"}
|
||||
<!-- 状态 -->
|
||||
{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>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
{/novel:status}
|
||||
{/novel:sort}
|
||||
{/novel:category}
|
||||
|
||||
|
||||
<!-- 注意 所有链接不要分页,有分页的取第一页即可 -->
|
||||
</urlset>
|
||||
37
code/app/home/view/kuangYu/sitemap/sitemap_index.xml
Normal file
37
code/app/home/view/kuangYu/sitemap/sitemap_index.xml
Normal file
@@ -0,0 +1,37 @@
|
||||
<?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>
|
||||
</sitemap>
|
||||
|
||||
<sitemap>
|
||||
<loc>https://www.example.com/sitemap-books-1.xml</loc>
|
||||
<lastmod>2025-04-21</lastmod>
|
||||
</sitemap>
|
||||
<sitemap>
|
||||
<loc>https://www.example.com/sitemap-books-2.xml</loc>
|
||||
<lastmod>2025-04-21</lastmod>
|
||||
</sitemap>
|
||||
<!-- ...小说总数量/50000 得出 sitemap-books一共有多少个 -->
|
||||
|
||||
<sitemap>
|
||||
<loc>https://www.example.com/sitemap-books-catalog-1.xml</loc>
|
||||
<lastmod>2025-04-21</lastmod>
|
||||
</sitemap>
|
||||
<sitemap>
|
||||
<loc>https://www.example.com/sitemap-books-catalog-2.xml</loc>
|
||||
<lastmod>2025-04-21</lastmod>
|
||||
</sitemap>
|
||||
<!-- ...小说总数量/50000 得出 sitemap-books-catalog一共有多少个,每个小说只取一个目录链接,分页不需要加入去 -->
|
||||
|
||||
<sitemap>
|
||||
<loc>https://www.example.com/sitemap-chapters-1.xml</loc>
|
||||
<lastmod>2025-04-21</lastmod>
|
||||
</sitemap>
|
||||
<sitemap>
|
||||
<loc>https://www.example.com/sitemap-chapters-2.xml</loc>
|
||||
<lastmod>2025-04-21</lastmod>
|
||||
</sitemap>
|
||||
<!-- ...小说章节取最新50w条 这里生成10个索引文件即可 -->
|
||||
</sitemapindex>
|
||||
@@ -7,32 +7,33 @@
|
||||
'{strNovelSex}' => '当前页面小说是男生还是女生 小说',
|
||||
'{strNovelCategoryName}' => '当前页面小说分类名字',
|
||||
'{strNovelStatus}' => '当前页面小说状态 是连载还是完结',
|
||||
'{strNovelOrder}' => '当前页面小说排序 全部排序,最新入库,最近更新,推荐',
|
||||
|
||||
|
||||
这个是分类或者书库的路由,公用一套视图模板
|
||||
/shuku/:strGender/:strCategory/:strStatus/page:intPage
|
||||
/shuku/:strGender/:strCategory/:strStatus/:strNovelOrder/page:intPage
|
||||
|
||||
|
||||
请根据路由和上面的替换标识,你帮忙设计100套最友好seo的 tkd 替换模板,字数要符合常规,不要超标也不要少,质量要保证
|
||||
返回格式:
|
||||
title :[
|
||||
'{strNovelSex}{strNovelCategoryName}{strNovelStatus}小说 - {strSiteName} - 第{intPage}页',
|
||||
'{strNovelSex}{strNovelCategoryName}{strNovelStatus}小说 - {strSiteName} - 第{intPage}页',
|
||||
'{strNovelSex}{strNovelCategoryName}{strNovelStatus}{strNovelOrder}小说 - {strSiteName} - 第{intPage}页',
|
||||
'{strNovelSex}{strNovelOrder}{strNovelCategoryName}{strNovelStatus}小说 - {strSiteName} - 第{intPage}页',
|
||||
..
|
||||
]
|
||||
|
||||
keywords: [
|
||||
'{strNovelCategoryName}, {strNovelSex}小说, {strNovelStatus}小说, {strSiteName}, 免费阅读',
|
||||
'{strNovelCategoryName}, {strNovelSex}小说, {strNovelStatus}小说, {strSiteName},{strNovelOrder}, 免费阅读',
|
||||
..
|
||||
]
|
||||
description: [
|
||||
'{strSiteName}提供{strNovelSex}{strNovelCategoryName}{strNovelStatus}小说免费阅读,第{intPage}页汇聚热门作品,欢迎体验{strSiteDomain}!',
|
||||
'{strSiteName}提供{strNovelSex}{strNovelCategoryName}{strNovelStatus}{strNovelOrder}小说免费阅读,第{intPage}页汇聚热门作品,欢迎体验{strSiteDomain}!',
|
||||
..
|
||||
]
|
||||
|
||||
|
||||
|
||||
好的,我会根据你提供的书库路由 `/shuku/:strGender/:strCategory/:strStatus/page:intPage` 和替换标识,设计一个最优的 SEO 友好的 TKD 模板。你的案例已经给出了一个分类页的模板,我会在此基础上优化,确保它既符合书库页面的特点,又最大化 SEO 效果。
|
||||
好的,我会根据你提供的书库路由 `/shuku/:strGender/:strCategory/:strStatus/:strNovelOrder/page:intPage` 和替换标识,设计一个最优的 SEO 友好的 TKD 模板。你的案例已经给出了一个分类页的模板,我会在此基础上优化,确保它既符合书库页面的特点,又最大化 SEO 效果。
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user