老模板优化
This commit is contained in:
181
docs/old-tmp-seo/25-老模板分类页Patch模板-2026-04-17.md
Normal file
181
docs/old-tmp-seo/25-老模板分类页Patch模板-2026-04-17.md
Normal file
@@ -0,0 +1,181 @@
|
||||
# 1294-SEONexus 老模板分类页 Patch 模板 - 2026-04-17
|
||||
|
||||
## 目的
|
||||
|
||||
这份文档专门服务第一批 5 个分类页文件。
|
||||
|
||||
它不是分析文档,而是一份“主 Codex 可直接照着写 patch”的模板说明。
|
||||
|
||||
适用文件:
|
||||
|
||||
- `videoDadi/video/getCategoryType.html`
|
||||
- `videoDingZhu/video/getCategoryType.html`
|
||||
- `videoBoKu/video/getCategoryType.html`
|
||||
- `videoLaoNiu/video/getCategoryType.html`
|
||||
- `videoNuNu/video/getCategoryType.html`
|
||||
|
||||
## 一、这 5 个文件当前共同问题
|
||||
|
||||
共同点几乎完全一致:
|
||||
|
||||
1. 缺少 canonical
|
||||
2. `og:url` 指向首页
|
||||
3. `CollectionPage.url` 指向首页
|
||||
|
||||
对应当前老模板写法:
|
||||
|
||||
```tpl
|
||||
<meta property="og:url" content="https://{$DomainModel->d_domain}" />
|
||||
```
|
||||
|
||||
以及:
|
||||
|
||||
```tpl
|
||||
"url": "https://{$DomainModel->d_domain}",
|
||||
```
|
||||
|
||||
## 二、目标状态
|
||||
|
||||
统一收口成:
|
||||
|
||||
1. `meta name="robots" content="index,follow"`
|
||||
2. canonical 指向当前分类页真实 URL
|
||||
3. `og:url` 指向当前分类页真实 URL
|
||||
4. `CollectionPage.url` 指向当前分类页真实 URL
|
||||
|
||||
最稳参考来源:
|
||||
|
||||
- [videoGpt1/getCategoryType.html](/www/wwwroot/VideoSource2/code/app/home/view/videoGpt1/video/getCategoryType.html:13)
|
||||
|
||||
## 三、推荐 patch 思路
|
||||
|
||||
### 第一步:在 `head` block 顶部补两行
|
||||
|
||||
在:
|
||||
|
||||
```tpl
|
||||
{block name="head"}
|
||||
```
|
||||
|
||||
后面直接补:
|
||||
|
||||
```tpl
|
||||
<meta name="robots" content="index,follow">
|
||||
<link rel="canonical" href='https://{$DomainModel->d_domain}{site:vciurl parent_category="$Request.route.strParentCategory" /}'>
|
||||
```
|
||||
|
||||
### 第二步:替换 `og:url`
|
||||
|
||||
把当前:
|
||||
|
||||
```tpl
|
||||
<meta property="og:url" content="https://{$DomainModel->d_domain}" />
|
||||
```
|
||||
|
||||
替换为:
|
||||
|
||||
```tpl
|
||||
<meta property="og:url" content='https://{$DomainModel->d_domain}{site:vciurl parent_category="$Request.route.strParentCategory" /}' />
|
||||
```
|
||||
|
||||
### 第三步:替换 JSON-LD 的 `CollectionPage.url`
|
||||
|
||||
把当前:
|
||||
|
||||
```tpl
|
||||
"url": "https://{$DomainModel->d_domain}",
|
||||
```
|
||||
|
||||
替换为:
|
||||
|
||||
```tpl
|
||||
"url": "https://{$DomainModel->d_domain}{site:vciurl parent_category="$Request.route.strParentCategory" /}",
|
||||
```
|
||||
|
||||
## 四、推荐的统一替换结果
|
||||
|
||||
如果主 Codex 想直接对照最终形态,`head` block 开头应该接近下面这样:
|
||||
|
||||
```tpl
|
||||
{block name="head"}
|
||||
<meta name="robots" content="index,follow">
|
||||
<link rel="canonical" href='https://{$DomainModel->d_domain}{site:vciurl parent_category="$Request.route.strParentCategory" /}'>
|
||||
|
||||
<!-- 社交媒体标签 -->
|
||||
<meta property="og:title" content='{site:replace code="VIDEO@GETCATEGORYINDEX@TITLE"}' />
|
||||
<meta property="og:description" content='{site:replace code="VIDEO@GETCATEGORYINDEX@DESCRIPTION"}' />
|
||||
<meta property="og:url" content='https://{$DomainModel->d_domain}{site:vciurl parent_category="$Request.route.strParentCategory" /}' />
|
||||
```
|
||||
|
||||
对应 JSON-LD 开头应接近:
|
||||
|
||||
```tpl
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "CollectionPage",
|
||||
"name": "{$DomainModel->d_name} - 最新{site:getval code="strVideoParentCategoryName" /}推荐",
|
||||
"url": "https://{$DomainModel->d_domain}{site:vciurl parent_category="$Request.route.strParentCategory" /}",
|
||||
"description": "{site:replace code="VIDEO@GETCATEGORYINDEX@DESCRIPTION"}",
|
||||
```
|
||||
|
||||
## 五、5 个文件的微差异提醒
|
||||
|
||||
这 5 个文件里真正需要注意的差异非常少:
|
||||
|
||||
### `videoNuNu`
|
||||
|
||||
它的 `ranklist` 参数写的是:
|
||||
|
||||
```tpl
|
||||
v_category_en="$Request.route.strParentCategory"
|
||||
```
|
||||
|
||||
不是别的模板常见的:
|
||||
|
||||
```tpl
|
||||
v_parent_category_en="$Request.route.strParentCategory"
|
||||
```
|
||||
|
||||
但这不影响本次 patch,因为我们只改:
|
||||
|
||||
- canonical
|
||||
- `og:url`
|
||||
- `CollectionPage.url`
|
||||
|
||||
### 其它 4 套
|
||||
|
||||
这 4 套在这次 patch 涉及的区域里基本是同构的,可以直接统一处理。
|
||||
|
||||
## 六、建议验收方式
|
||||
|
||||
每改完 1 个文件就做一次最小验收,不要 5 个全改完才看。
|
||||
|
||||
### 页面源代码验收
|
||||
|
||||
确认:
|
||||
|
||||
1. 有 canonical
|
||||
2. canonical 指向分类页自己
|
||||
3. `og:url` 指向分类页自己
|
||||
4. JSON-LD `CollectionPage.url` 指向分类页自己
|
||||
|
||||
### 域名级优先验收
|
||||
|
||||
优先看:
|
||||
|
||||
- `ningxiaowei.com`
|
||||
- `www.ningxiaowei.com`
|
||||
- `sctyjz.com`
|
||||
- `www.ap-hulan.com`
|
||||
|
||||
## 七、验收后的日志观察
|
||||
|
||||
改完这 5 个分类页之后,连续看 3 天最值得盯的是:
|
||||
|
||||
1. `category|200` 是否开始增加
|
||||
2. `/|301` 是否继续下降
|
||||
3. `home|301` 是否继续下降
|
||||
|
||||
## 一句话交接
|
||||
|
||||
> 老模板第一批最适合先落地的,就是这 5 个分类页 patch;它们结构接近、收益集中、风险低,而且能最快验证“分类页从首页附属信号变成独立聚合页”这条 SEO 主线是否开始生效。
|
||||
Reference in New Issue
Block a user