本次更新

1.domain 增加了几个字段,已经 backup,
2.视图模板,替换模板分组,替换模板 数据增加了seed 播种
3. 标记了TODO
This commit is contained in:
make
2025-04-05 20:41:47 +08:00
parent 25bf602048
commit 9945b6b137
52 changed files with 2675 additions and 255 deletions

View File

@@ -157,6 +157,9 @@ class Site extends BaseController
"d_name" => $Request->post('d_name'),
"d_keywords" => $Request->post('d_keywords'),
"d_description" => $Request->post('d_description'),
"d_index_title" => $Request->post('d_index_title'),
"d_index_keywords" => $Request->post('d_index_keywords'),
"d_index_description" => $Request->post('d_index_description'),
"d_statis" => $Request->post('d_statis'),
"d_logo_type" => $Request->post('d_logo_type'),
"d_text_log" => $Request->post('d_text_log'),
@@ -341,7 +344,8 @@ class Site extends BaseController
$this->validate($arrData, $arrRule);
$arrSfgId = explode(',', $arrData['sfg_id']);
SubjectFomartGroupModel::where('sfg_id', $arrSfgId)->delete();
SubjectFomartGroupModel::whereIn('sfg_id', $arrSfgId)->delete();
return $this->success();
}
@@ -458,7 +462,7 @@ class Site extends BaseController
$this->validate($arrData, $arrRule);
$arrSfId = explode(',', $arrData['sf_id']);
SubjectFomartModel::where('sf_id', $arrSfId)->delete();
SubjectFomartModel::whereIn('sf_id', $arrSfId)->delete();
return $this->success();
}

View File

@@ -76,6 +76,7 @@ abstract class BaseController
{
ConverterMovel::setVal([
'strSiteName' => $this->request->DomainModel->d_name,
'strSiteDomain' => $this->request->DomainModel->d_domain,
'strSiteKeywords' => $this->request->DomainModel->d_keywords,
'strSiteDescription' => $this->request->DomainModel->d_description,
]);

View File

@@ -82,7 +82,7 @@ Route::get('/pc/books/:name-:n_id/chapter/latest', [Novel::class, 'getNovelLates
/**
* 小说目录页面
* /xiaoshuo/[name]-[novel-id]/mulu/order/[page]
* /xiaoshuo/[小说拼音]-[小说id]/mulu/order/[page]
*/
Route::get('/xiaoshuo/:name-:intNovelId/mulu/:strOrder/[:intPage]', [Novel::class, 'getNovelChapterAll'])
->append(['boolIsMobile' => true, 'intUriType' => 1])
@@ -93,13 +93,13 @@ Route::get('/pc/xiaoshuo/:name-:intNovelId/mulu/:strOrder/[:intPage]', [Novel::c
->pattern(['intNovelId' => '\d+', 'name' => '[\w-]+', 'strOrder' => 'zheng|dao', 'intPage' => '\d+']);
/**
* kan
* kan-小说详情
*/
Route::get('/pc/kan/:name-:n_id-:n_forge_id', [Novel::class, 'getKanNovelInfo'])
Route::get('/pc/kan-xiaoshuo/:name-:n_id-:n_forge_id', [Novel::class, 'getKanNovelInfo'])
->append(['boolIsMobile' => false, 'intUriType' => 2])
->pattern(['n_id' => '\d+','n_forge_id' => '\d+', 'name' => '[\w-]+',]);
Route::get('/kan/:name-:n_id-:n_forge_id', [Novel::class, 'getKanNovelInfo'])
Route::get('/kan-xiaoshuo/:name-:n_id-:n_forge_id', [Novel::class, 'getKanNovelInfo'])
->append(['boolIsMobile' => true, 'intUriType' => 2])
->pattern(['n_id' => '\d+','n_forge_id' => '\d+', 'name' => '[\w-]+',]);

View File

@@ -42,6 +42,21 @@ class Index extends BaseController
$strStatus = '已完结';
$arrEndNovelRankNovel = $NovelModel->getRankNovelOnCache($strKey, 10, 0, 'total',$strStatus);
// Title 模板
ConverterMovel::setVal([
'strIndexTitle' => $this->request->DomainModel->d_index_title,
'strIndexKeywords' => $this->request->DomainModel->d_index_keywords,
'strIndexDescription' => $this->request->DomainModel->d_index_description,
]);
// $strTitle = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__));
$strTitleTemplate = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__).'@TITLE');
$strKeywordsTemplate = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__).'@KEYWORDS');
$strDescriptionTemplate = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__).'@DESCRIPTION');
$strTitle = ConverterMovel::convert($strTitleTemplate);
$strKeywords = ConverterMovel::convert($strKeywordsTemplate);
$strDescription = ConverterMovel::convert($strDescriptionTemplate);
View::assign([
'arrRecommendNovel' => $arrRecommendNovel,
@@ -50,7 +65,10 @@ class Index extends BaseController
'arrWeekRankNovel' => $arrWeekRankNovel,
'arrMoonRankNovel' => $arrMoonRankNovel,
'arrEndNovelRankNovel' => $arrEndNovelRankNovel,
'strPageCode' => 'home'
'strPageCode' => 'home',
'strTitle' => $strTitle,
'strKeywords' => $strKeywords,
'strDescription' => $strDescription,
]);
if ($boolIsMobile) {
@@ -109,10 +127,20 @@ class Index extends BaseController
// 最近更新-随机50
$arrNewsUpdateNovel = $NovelModel->getSexNovelOnCache($Request->DomainModel->d_domain, 50);
$strTitle = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__));
$strTitle = ConverterMovel::convert($strTitle);
// Title 模板
ConverterMovel::setVal([
'strIndexTitle' => $this->request->DomainModel->d_index_title,
'strIndexKeywords' => $this->request->DomainModel->d_index_keywords,
'strIndexDescription' => $this->request->DomainModel->d_index_description,
]);
// $strTitle = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__));
$strTitleTemplate = $Request->DomainModel->getFomartSubject('INDEX@INDEX@TITLE');
$strKeywordsTemplate = $Request->DomainModel->getFomartSubject('INDEX@INDEX@KEYWORDS');
$strDescriptionTemplate = $Request->DomainModel->getFomartSubject('INDEX@INDEX@DESCRIPTION');
$strTitle = ConverterMovel::convert($strTitleTemplate);
$strKeywords = ConverterMovel::convert($strKeywordsTemplate);
$strDescription = ConverterMovel::convert($strDescriptionTemplate);
View::assign([
'arrNewsUpdateNovel' => $arrNewsUpdateNovel,
@@ -129,6 +157,8 @@ class Index extends BaseController
'arrAdBanner' => [],
'strPageCode' => 'home',
'strTitle' => $strTitle,
'strKeywords' => $strKeywords,
'strDescription' => $strDescription,
]);

View File

@@ -57,15 +57,29 @@ class Novel extends BaseController
$strStatus = '已完结';
$arrEdnNovelRankNovel = $NovelModel->getRankNovelOnCache($strKey, 10, 0, 'total', $strStatus);
// Title 模板
ConverterMovel::setVal([
'intPage' => 1,
]);
// $strTitle = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__));
$strTitleTemplate = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__) . '@TITLE');
$strKeywordsTemplate = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__) . '@KEYWORDS');
$strDescriptionTemplate = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__) . '@DESCRIPTION');
$strTitle = ConverterMovel::convert($strTitleTemplate);
$strKeywords = ConverterMovel::convert($strKeywordsTemplate);
$strDescription = ConverterMovel::convert($strDescriptionTemplate);
View::assign([
'arrDayRankNovel' => $arrDayRankNovel,
'arrWeekRankNovel' => $arrWeekRankNovel,
'arrMoonRankNovel' => $arrMoonRankNovel,
'arrTotalRankNovel' => $arrTotalRankNovel,
'arrNewsNovelRankNovel' => $arrNewsNovelRankNovel,
'arrEdnNovelRankNovel' => $arrEdnNovelRankNovel,
'strTitle' => $strTitle,
'strKeywords' => $strKeywords,
'strDescription' => $strDescription,
'strPageCode' => 'rank'
]);
if ($boolIsMobile) {
@@ -96,6 +110,11 @@ class Novel extends BaseController
'nansheng-xiaoshuo' => 1,
'nvsheng-xiaoshuo' => 1,
];
$arrSexChinese = [
'all' => '',
'nansheng-xiaoshuo' => '男生',
'nvsheng-xiaoshuo' => '女生',
];
if (!key_exists($strGender, $arrSex)) {
return response('Bad Request', 400);
@@ -105,7 +124,7 @@ class Novel extends BaseController
// 分类
if ($strCategory == 'all') {
$strSearchCategory = NULL;
$strSearchCategory = '';
} else if (!in_array($strCategory, CategoryModel::$arrCategoryPinYin)) {
return response('Bad Request', 400);
} else {
@@ -151,6 +170,25 @@ class Novel extends BaseController
$strBaseUrl = sprintf('/shuku/%s/%s/%s/page{page}', $strGender, $strCategory, $strStatus);
$arrPaginator = CusteomPage02::generate($intPage, $arrPage['total'], $intLimit, $strBaseUrl, $intButtomNum);
// TODO 下面的值要处理成汉字 start
// 更新值
ConverterMovel::setVal([
'intPage' => $intPage,
'strNovelSex' => $arrSexChinese[$strGender], //汉字 男生或者女生
'strNovelCategoryName' => str_replace("小说", "", $strSearchCategory), // 小说分类名汉字 玄幻 都市 。。。 ; 注意不要带 小说 2字tkd 会重复堆叠
'strNovelStatus' => $strSearchStatus, // 小说状态 汉字
]);
// TODO end
// $strTitle = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__));
$strTitleTemplate = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__) . '@TITLE');
$strKeywordsTemplate = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__) . '@KEYWORDS');
$strDescriptionTemplate = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__) . '@DESCRIPTION');
$strTitle = ConverterMovel::convert($strTitleTemplate);
$strKeywords = ConverterMovel::convert($strKeywordsTemplate);
$strDescription = ConverterMovel::convert($strDescriptionTemplate);
View::assign([
'arrNovel' => $arrPage['data'],
'strPageCode' => 'library',
@@ -159,12 +197,15 @@ class Novel extends BaseController
'strStatus' => $strStatus,
'intPage' => $intPage,
'intTotalPage' => $arrPage['pages'],
// TODO 返回所有分类了,应该只返回对应 性别的分类,暂时按下面的返回了,你看看要咋处理
// TODO 返回所有分类了,应该只返回对应 性别的分类,暂时按下面的返回了,你看看需要改不 start
// 'arrCategory' => array_combine(array_values(CategoryModel::$arrCategoryPinYin), array_values(CategoryModel::$arrCategory)),
'arrCategoryAll' => CategoryModel::$arrCategoryAll,
// TODO end
'arrPaginator' => $arrPaginator,
'strTitle' => $strTitle,
'strKeywords' => $strKeywords,
'strDescription' => $strDescription,
]);
return View::fetch($strTemplate);
@@ -224,12 +265,30 @@ class Novel extends BaseController
$intCount = 20;
$arrNewsUpdateNovel = $NovelModel->getCommonNovelOnCache($strKey, $intLifeTime, $intCount, $intType, NULL, ['og_novel_update_time' => -1]);
// 更新值
ConverterMovel::setVal([
'intPage' => 1,
'strNovelSex' => $strNovelChannel == 'boys' ? '男生' : '女生', //汉字 男生或者女生
]);
// $strTitle = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__));
$strTitleTemplate = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__) . '@TITLE');
$strKeywordsTemplate = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__) . '@KEYWORDS');
$strDescriptionTemplate = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__) . '@DESCRIPTION');
$strTitle = ConverterMovel::convert($strTitleTemplate);
$strKeywords = ConverterMovel::convert($strKeywordsTemplate);
$strDescription = ConverterMovel::convert($strDescriptionTemplate);
View::assign([
'arrRecommendSerializationNovel' => $arrRecommendSerializationNovel,
'arrRecommendEndNovel' => $arrRecommendEndNovel,
'arrNewsUpdateNovel' => $arrNewsUpdateNovel,
'arrAdBanner' => [],
'strPageCode' => $strNovelChannel
'strPageCode' => $strNovelChannel,
'strTitle' => $strTitle,
'strKeywords' => $strKeywords,
'strDescription' => $strDescription,
]);
if ($boolIsMobile) {
return View::fetch();
@@ -372,16 +431,26 @@ class Novel extends BaseController
$arrRelateveNovel = $NovelModel->getNovel(['n_id' => [
'$in' => $arrRelateveNId,
]], 10);
// echo '<pre>';
// var_dump($arrNovel);exit;
// $strNovel = '斗罗大陆';
// 更新值
ConverterMovel::setVal([
'intPage' => 1,
'strNovelName' => $arrNovel['og_novel_book_name'],
'strNovelAuthor' => $arrNovel['og_novel_author'],
'strNovelCategoryName' => $arrNovel['og_novel_category'],
'strNovelSex' => '男生', // TODO 汉字 男生或者女生
'strNovelStatus' => $arrNovel['og_novel_status'],
'strNovelDescription' => $arrNovel['n_page_description'],
]);
// ConverterMovel::setVal("strNovelName", $strNovel);
$strTitleTemplate = $Request->DomainModel->getFomartSubject('NOVEL@GETNOVELINFO@TITLE');
$strKeywordsTemplate = $Request->DomainModel->getFomartSubject('NOVEL@GETNOVELINFO@KEYWORDS');
$strDescriptionTemplate = $Request->DomainModel->getFomartSubject('NOVEL@GETNOVELINFO@DESCRIPTION');
// $strTitle = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__));
$strTitle = ConverterMovel::convert($strTitleTemplate);
$strKeywords = ConverterMovel::convert($strKeywordsTemplate);
$strDescription = ConverterMovel::convert($strDescriptionTemplate);
// $strTitle = ConverterMovel::convert($strTitle);
View::assign([
'arrRelateveNovel' => $arrRelateveNovel,
@@ -390,7 +459,9 @@ class Novel extends BaseController
'arrNovelClicks' => $arrNovelClicks,
'strFocus' => $strFocus,
'strPageCode' => 'boy',
// 'strTitle' => $strTitle,
'strTitle' => $strTitle,
'strKeywords' => $strKeywords,
'strDescription' => $strDescription,
]);
if ($boolIsMobile) {
@@ -420,7 +491,6 @@ class Novel extends BaseController
// 分品拼音
$arrNovel['category_pinyin'] = CategoryModel::getPinYinByZh($arrNovel['og_novel_category']);
// 最后章节
$ChapterModel = new ChapterModel;
$arrLatestChapter = $ChapterModel->getLatestChapter($intNId);
@@ -452,16 +522,25 @@ class Novel extends BaseController
$arrRelateveNovel = $NovelModel->getNovel(['n_id' => [
'$in' => $arrRelateveNId,
]], 10);
// echo '<pre>';
// var_dump($arrNovel);exit;
$strNovel = '斗罗大陆';
// 更新值
ConverterMovel::setVal([
'intPage' => 1,
'strNovelName' => $arrNovel['og_novel_book_name'],
'strNovelAuthor' => $arrNovel['og_novel_author'],
'strNovelCategoryName' => $arrNovel['og_novel_category'],
'strNovelSex' => '男生', // TODO 汉字 男生或者女生
'strNovelStatus' => $arrNovel['og_novel_status'],
'strNovelDescription' => $arrNovel['n_page_description'],
]);
ConverterMovel::setVal("strNovelName", $strNovel);
$strTitleTemplate = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__) . '@TITLE');
$strKeywordsTemplate = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__) . '@KEYWORDS');
$strDescriptionTemplate = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__) . '@DESCRIPTION');
$strTitle = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__));
$strTitle = ConverterMovel::convert($strTitle);
$strTitle = ConverterMovel::convert($strTitleTemplate);
$strKeywords = ConverterMovel::convert($strKeywordsTemplate);
$strDescription = ConverterMovel::convert($strDescriptionTemplate);
View::assign([
'arrRelateveNovel' => $arrRelateveNovel,
@@ -471,6 +550,8 @@ class Novel extends BaseController
'strFocus' => $strFocus,
'strPageCode' => 'boy',
'strTitle' => $strTitle,
'strKeywords' => $strKeywords,
'strDescription' => $strDescription,
]);
if ($boolIsMobile) {
return View::fetch();
@@ -523,10 +604,26 @@ class Novel extends BaseController
['id' => 8, 'name' => '小说3', 'author' => '作者3'],
];
// 最新章节 取最新5章节
// 相邻推荐->关联的 kan 数据
// 精品推荐->同分类随机10条数据
// 最新要点->取新意章节, 随机提取一部分内容 大概150字数
// 更新值
ConverterMovel::setVal([
'intPage' => 1,
'strNovelName' => $arrNovel['og_novel_book_name'],
'strNovelAuthor' => $arrNovel['og_novel_author'],
'strNovelCategoryName' => $arrNovel['og_novel_category'],
'strNovelStatus' => $arrNovel['og_novel_status'],
'strNovelDescription' => $arrNovel['n_page_description'],
'strNovelChapterName' => $arrChapter['name'] ?? '',
'strNovelChapterSort' => $arrChapter['c_sort_num'] ?? '',
]);
$strTitleTemplate = $Request->DomainModel->getFomartSubject('NOVEL@GETNOVELCHAPTER@TITLE');
$strKeywordsTemplate = $Request->DomainModel->getFomartSubject('NOVEL@GETNOVELCHAPTER@KEYWORDS');
$strDescriptionTemplate = $Request->DomainModel->getFomartSubject('NOVEL@GETNOVELCHAPTER@DESCRIPTION');
$strTitle = ConverterMovel::convert($strTitleTemplate);
$strKeywords = ConverterMovel::convert($strKeywordsTemplate);
$strDescription = ConverterMovel::convert($strDescriptionTemplate);
View::assign([
'arrNewsNovel' => $arrNewsNovel,
@@ -542,6 +639,9 @@ class Novel extends BaseController
'intNovelId' => $intNId,
'intChapterSort' => $arrChapter['c_sort_num'] ?? 0,
'intChapterPage' => $arrChapter['c_page'] ?? 0,
'strTitle' => $strTitle,
'strKeywords' => $strKeywords,
'strDescription' => $strDescription,
]);
if ($boolIsMobile) {
return View::fetch('getNovelChapter');
@@ -583,9 +683,28 @@ class Novel extends BaseController
$arrNextChapter = $ChapterModel->getNextChapter($arrChapter['n_id'], $arrChapter['c_sort_num'], $arrChapter['c_page']);
}
$arrCategoryAll = CategoryModel::$arrCategoryAll;
// 更新值
ConverterMovel::setVal([
'intPage' => 1,
'strNovelName' => $arrNovel['og_novel_book_name'],
'strNovelAuthor' => $arrNovel['og_novel_author'],
'strNovelCategoryName' => $arrNovel['og_novel_category'],
'strNovelStatus' => $arrNovel['og_novel_status'],
'strNovelDescription' => $arrNovel['n_page_description'],
'strNovelChapterName' => $arrChapter['name'],
'strNovelChapterSort' => $arrChapter['c_sort_num'],
]);
$strTitleTemplate = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__) . '@TITLE');
$strKeywordsTemplate = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__) . '@KEYWORDS');
$strDescriptionTemplate = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__) . '@DESCRIPTION');
$strTitle = ConverterMovel::convert($strTitleTemplate);
$strKeywords = ConverterMovel::convert($strKeywordsTemplate);
$strDescription = ConverterMovel::convert($strDescriptionTemplate);
View::assign([
'arrNovel' => $arrNovel,
'arrCategoryAll' => $arrCategoryAll,
@@ -596,6 +715,9 @@ class Novel extends BaseController
'intNovelId' => $intNovelId,
'intChapterSort' => $intChapterSort,
'intChapterPage' => $intChapterPage,
'strTitle' => $strTitle,
'strKeywords' => $strKeywords,
'strDescription' => $strDescription,
]);
if ($boolIsMobile) {
return View::fetch();
@@ -645,7 +767,26 @@ class Novel extends BaseController
$strBaseUrl = sprintf('/pc/xiaoshuo/%s-%s/mulu/%s/{page}', $arrNovel['og_novel_pin_yin'], $intNId, $strOrder);
$arrPaginator = CusteomPage02::generate($intPage, $arrPage['total'], $intLimit, $strBaseUrl, $intButtomNum);
// 更新值
ConverterMovel::setVal([
'intPage' => $intPage,
'strNovelSex' => '男生', // TODO 汉字 男生或者女生
'strNovelName' => $arrNovel['og_novel_book_name'],
'strNovelAuthor' => $arrNovel['og_novel_author'],
'strNovelCategoryName' => $arrNovel['og_novel_category'],
'strNovelStatus' => $arrNovel['og_novel_status'],
'strNovelDescription' => $arrNovel['n_page_description'],
]);
$strTitleTemplate = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__) . '@TITLE');
$strKeywordsTemplate = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__) . '@KEYWORDS');
$strDescriptionTemplate = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__) . '@DESCRIPTION');
$strTitle = ConverterMovel::convert($strTitleTemplate);
$strKeywords = ConverterMovel::convert($strKeywordsTemplate);
$strDescription = ConverterMovel::convert($strDescriptionTemplate);
View::assign([
'arrNovel' => $arrNovel,
'arrPage' => $arrPage,
@@ -655,6 +796,9 @@ class Novel extends BaseController
'strOrder' => $strOrder,
'strPageCode' => 'chapters',
'intLimit' => $intLimit,
'strTitle' => $strTitle,
'strKeywords' => $strKeywords,
'strDescription' => $strDescription,
]);
if ($boolIsMobile) {
return View::fetch();
@@ -673,13 +817,13 @@ class Novel extends BaseController
{
$boolIsMobile = $Request->param('boolIsMobile');
$strKeywords = (string)$Request->get('keyword');
$strSearchKeywords = (string)$Request->get('keyword');
$intPage = (int)$Request->get('page', 1);
$intLimit = 20;
$strKey = sprintf('%s:PC:Novel:Search:%s:Page:%s:Limit:%s', $Request->DomainModel->d_domain, $strKeywords, $intPage, $intLimit);
$strKey = sprintf('%s:PC:Novel:Search:%s:Page:%s:Limit:%s', $Request->DomainModel->d_domain, $strSearchKeywords, $intPage, $intLimit);
if (empty($strKeywords)) {
if (empty($strSearchKeywords)) {
return response('请输入搜索的关键字', 400);
}
@@ -687,30 +831,49 @@ class Novel extends BaseController
$arrFilter = [
'$or' => [
['og_novel_book_name' => ['$regex' => $strKeywords, '$options' => 'i']],
['og_novel_author' => ['$regex' => $strKeywords, '$options' => 'i']],
['og_novel_category' => ['$regex' => $strKeywords, '$options' => 'i']],
['og_description' => ['$regex' => $strKeywords, '$options' => 'i']],
['og_novel_book_name' => ['$regex' => $strSearchKeywords, '$options' => 'i']],
['og_novel_author' => ['$regex' => $strSearchKeywords, '$options' => 'i']],
['og_novel_category' => ['$regex' => $strSearchKeywords, '$options' => 'i']],
['og_description' => ['$regex' => $strSearchKeywords, '$options' => 'i']],
]
];
$arrPage = $NovelModel->getCommonPageOnCache($arrFilter, $intPage, $intLimit, [], $strKey);
$intButtomNum = 10;
$strBaseUrl = sprintf('/search.html?keyword=%s&page={page}', $strKeywords);
$strBaseUrl = sprintf('/search.html?keyword=%s&page={page}', $strSearchKeywords);
$arrPaginator = CusteomPage02::generate($intPage, $arrPage['total'], $intLimit, $strBaseUrl, $intButtomNum);
// 更新值
ConverterMovel::setVal([
'intPage' => $intPage,
'strNovelSex' => '男生', // TODO 汉字 男生或者女生 // 取搜所的第一个小说的男生或者女生
'strSearchKeywords' => $strSearchKeywords,
'strNovelCategoryName' => '玄幻', // TODO 取搜所的第一个小说的分类 汉字(不带小说2字)
'strNovelStatus' => '完结', // TODO 取搜所的第一个小说的状态
]);
$strTitleTemplate = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__) . '@TITLE');
$strKeywordsTemplate = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__) . '@KEYWORDS');
$strDescriptionTemplate = $Request->DomainModel->getFomartSubject(getFomartSubjectKey(__METHOD__) . '@DESCRIPTION');
$strTitle = ConverterMovel::convert($strTitleTemplate);
$strKeywords = ConverterMovel::convert($strKeywordsTemplate);
$strDescription = ConverterMovel::convert($strDescriptionTemplate);
View::assign([
'arrPage' => $arrPage,
'arrPaginator' => $arrPaginator,
'strKeywords' => $strKeywords,
'strSearchKeywords' => $strSearchKeywords,
'intPage' => $intPage,
'intTotalPage' => $arrPage['pages'],
'strPageCode' => 'search'
'strPageCode' => 'search',
'strTitle' => $strTitle,
'strKeywords' => $strKeywords,
'strDescription' => $strDescription,
]);
// echo $strKeywords;exit;
if ($boolIsMobile) {
return View::fetch();
} else {

View File

@@ -1,6 +1,23 @@
{extend name="baseH5" /}
{block name='nav-active-class'}home{/block}
{block name="title"}{/block}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
{block name="head"}
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" />
<meta property="og:description" content="{$strDescription??''}" />
<meta property="og:url" content="{Request->DomainModel->d_domain}" />
<meta property="og:type" content="article" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "{$strTitle??''}",
"description": "{$strDescription??''}",
"datePublished": "2025-04-05"
}
</script>
{block name="head-js"}{/block}
{block name="logo-html"}

View File

@@ -1,6 +1,23 @@
{extend name="baseH5" /}
{block name='nav-active-class'}home{/block}
{block name="title"}{/block}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
{block name="head"}
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" />
<meta property="og:description" content="{$strDescription??''}" />
<meta property="og:url" content="{Request->DomainModel->d_domain}" />
<meta property="og:type" content="article" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "{$strTitle??''}",
"description": "{$strDescription??''}",
"datePublished": "2025-04-05"
}
</script>
{block name="head-js"}{/block}
{block name="logo-html"}

View File

@@ -1,6 +1,23 @@
{extend name="baseH5" /}
{block name='nav-active-class'}home{/block}
{block name="title"}{/block}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
{block name="head"}
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" />
<meta property="og:description" content="{$strDescription??''}" />
<meta property="og:url" content="{Request->DomainModel->d_domain}" />
<meta property="og:type" content="article" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "{$strTitle??''}",
"description": "{$strDescription??''}",
"datePublished": "2025-04-05"
}
</script>
{block name="head-js"}{/block}
{block name="logo-html"}

View File

@@ -1,6 +1,23 @@
{extend name="baseH5" /}
{block name='nav-active-class'}home{/block}
{block name="title"}{/block}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
{block name="head"}
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" />
<meta property="og:description" content="{$strDescription??''}" />
<meta property="og:url" content="{Request->DomainModel->d_domain}" />
<meta property="og:type" content="article" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "{$strTitle??''}",
"description": "{$strDescription??''}",
"datePublished": "2025-04-05"
}
</script>
{block name="head-js"}{/block}
{block name="logo-html"}

View File

@@ -1,6 +1,23 @@
{extend name="baseH5" /}
{block name='nav-active-class'}home{/block}
{block name="title"}{/block}
{extend name="baseH5" /}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
{block name="head"}
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" />
<meta property="og:description" content="{$strDescription??''}" />
<meta property="og:url" content="{Request->DomainModel->d_domain}" />
<meta property="og:type" content="article" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "{$strTitle??''}",
"description": "{$strDescription??''}",
"datePublished": "2025-04-05"
}
</script>
{block name="head-js"}{/block}
{block name="logo-html"}

View File

@@ -2,11 +2,15 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
<meta name="keywords" content="狂雨小说">
<meta name="description" content="狂雨小说">
<title>01 天龙问世_我真是一条龙-狂雨小说</title>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow" />
<meta http-equiv="Cache-Control" content="no-transform, max-age=3600" />
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
<meta name="keywords" content="{$strKeywords??''}">
<meta name="description" content="{$strDescription??''}">
<title>{$strTitle??''}</title>
<link rel="icon" href="/template/kuangyu/public/img/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="/template/kuangyu/reader/wap/css/style.css" type="text/css">
<link rel="stylesheet" href="//at.alicdn.com/t/font_934628_byagqjb6vae.css" type="text/css">
<link rel="stylesheet" href="/public/layer/need/layer.css" type="text/css">

View File

@@ -1,6 +1,23 @@
{extend name="baseH5" /}
{block name='nav-active-class'}home{/block}
{block name="title"}{/block}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
{block name="head"}
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" />
<meta property="og:description" content="{$strDescription??''}" />
<meta property="og:url" content="{Request->DomainModel->d_domain}" />
<meta property="og:type" content="article" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "{$strTitle??''}",
"description": "{$strDescription??''}",
"datePublished": "2025-04-05"
}
</script>
{block name="head-js"}{/block}
{block name="logo-html"}
@@ -43,18 +60,11 @@
<div class="attentions">
<div class="page_num"><a href="/xiaoshuo/gui-zu-nong-min-106/mulu/zheng/1" class="z">上一页</a><select
onchange="self.location.href=options[selectedIndex].value">
<option value="/xiaoshuo/gui-zu-nong-min-106/mulu/zheng/1">第1-100章</option>
<option selected="selected" value="/index/47010/1/">第101-200章</option>
<option value="/xiaoshuo/gui-zu-nong-min-106/mulu/zheng/2">第201-300章</option>
<option value="/xiaoshuo/gui-zu-nong-min-106/mulu/zheng/3">第301-400章</option>
<option value="/xiaoshuo/gui-zu-nong-min-106/mulu/zheng/4">第401-500章</option>
</select><a href="/xiaoshuo/gui-zu-nong-min-106/mulu/zheng/2" class="y">下一页</a>
</div>
<!-- 目录下拉分页-->
{include file="Public/allChapterPage" /}
<ul class="clearfix">
{volist name="arrChapter" id="Chapter" key="key"}
{volist name="arrPage.data" id="Chapter" key="key"}
<li>
<a href="/xiaoshuo/{$arrNovel.og_novel_pin_yin}-{$arrNovel.n_id}/zhang-{$Chapter.c_sort_num}"
title="{$Chapter.name}">{$Chapter.name}</a>
@@ -62,15 +72,9 @@
{/volist}
</ul>
<div class="page_num"><a href="/xiaoshuo/gui-zu-nong-min-106/mulu/zheng/1" class="z">上一页</a><select
onchange="self.location.href=options[selectedIndex].value">
<option value="/xiaoshuo/gui-zu-nong-min-106/mulu/zheng/1">第1-100章</option>
<option selected="selected" value="/index/47010/1/">第101-200章</option>
<option value="/xiaoshuo/gui-zu-nong-min-106/mulu/zheng/2">第201-300章</option>
<option value="/xiaoshuo/gui-zu-nong-min-106/mulu/zheng/3">第301-400章</option>
<option value="/xiaoshuo/gui-zu-nong-min-106/mulu/zheng/4">第401-500章</option>
</select><a href="/xiaoshuo/gui-zu-nong-min-106/mulu/zheng/2" class="y">下一页</a>
</div>
<!-- 目录下拉分页-->
{include file="Public/allChapterPage" /}
<div class="chapters-more">
</div>
</div>

View File

@@ -1,6 +1,23 @@
{extend name="baseH5" /}
{block name='nav-active-class'}home{/block}
{block name="title"}{/block}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
{block name="head"}
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" />
<meta property="og:description" content="{$strDescription??''}" />
<meta property="og:url" content="{Request->DomainModel->d_domain}" />
<meta property="og:type" content="article" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "{$strTitle??''}",
"description": "{$strDescription??''}",
"datePublished": "2025-04-05"
}
</script>
{block name="head-js"}{/block}
{block name="logo-html"}

View File

@@ -1,6 +1,23 @@
{extend name="baseH5" /}
{block name='nav-active-class'}home{/block}
{block name="title"}{/block}
{extend name="baseH5" /}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
{block name="head"}
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" />
<meta property="og:description" content="{$strDescription??''}" />
<meta property="og:url" content="{Request->DomainModel->d_domain}" />
<meta property="og:type" content="article" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "{$strTitle??''}",
"description": "{$strDescription??''}",
"datePublished": "2025-04-05"
}
</script>
{block name="head-js"}{/block}
{block name="logo-html"}

View File

@@ -1,6 +1,23 @@
{extend name="baseH5" /}
{block name='nav-active-class'}home{/block}
{block name="title"}{/block}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
{block name="head"}
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" />
<meta property="og:description" content="{$strDescription??''}" />
<meta property="og:url" content="{Request->DomainModel->d_domain}" />
<meta property="og:type" content="article" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "{$strTitle??''}",
"description": "{$strDescription??''}",
"datePublished": "2025-04-05"
}
</script>
{block name="head-js"}{/block}
{block name="logo-html"}

View File

@@ -1,6 +1,23 @@
{extend name="basePcUser" /}
{block name='nav-active-class'}home{/block}
{block name="title"}{/block}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
{block name="head"}
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" />
<meta property="og:description" content="{$strDescription??''}" />
<meta property="og:url" content="{Request->DomainModel->d_domain}" />
<meta property="og:type" content="article" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "{$strTitle??''}",
"description": "{$strDescription??''}",
"datePublished": "2025-04-05"
}
</script>
{block name="head-js"}{/block}

View File

@@ -1,6 +1,23 @@
{extend name="basePcUser" /}
{block name='nav-active-class'}home{/block}
{block name="title"}{/block}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
{block name="head"}
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" />
<meta property="og:description" content="{$strDescription??''}" />
<meta property="og:url" content="{Request->DomainModel->d_domain}" />
<meta property="og:type" content="article" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "{$strTitle??''}",
"description": "{$strDescription??''}",
"datePublished": "2025-04-05"
}
</script>
{block name="head-js"}{/block}

View File

@@ -1,6 +1,23 @@
{extend name="basePcUser" /}
{block name='nav-active-class'}home{/block}
{block name="title"}{/block}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
{block name="head"}
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" />
<meta property="og:description" content="{$strDescription??''}" />
<meta property="og:url" content="{Request->DomainModel->d_domain}" />
<meta property="og:type" content="article" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "{$strTitle??''}",
"description": "{$strDescription??''}",
"datePublished": "2025-04-05"
}
</script>
{block name="head-js"}{/block}

View File

@@ -1,6 +1,23 @@
{extend name="basePc" /}
{block name='nav-active-class'}home{/block}
{block name="title"}{/block}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
{block name="head"}
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" />
<meta property="og:description" content="{$strDescription??''}" />
<meta property="og:url" content="{Request->DomainModel->d_domain}" />
<meta property="og:type" content="article" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "{$strTitle??''}",
"description": "{$strDescription??''}",
"datePublished": "2025-04-05"
}
</script>
{block name="head-js"}{/block}

View File

@@ -1,6 +1,23 @@
{extend name="basePc" /}
{block name='nav-active-class'}home{/block}
{block name="title"}{/block}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
{block name="head"}
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" />
<meta property="og:description" content="{$strDescription??''}" />
<meta property="og:url" content="{Request->DomainModel->d_domain}" />
<meta property="og:type" content="article" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "{$strTitle??''}",
"description": "{$strDescription??''}",
"datePublished": "2025-04-05"
}
</script>
{block name="head-js"}{/block}

View File

@@ -1,6 +1,23 @@
{extend name="basePc" /}
{block name='nav-active-class'}home{/block}
{block name="title"}{/block}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
{block name="head"}
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" />
<meta property="og:description" content="{$strDescription??''}" />
<meta property="og:url" content="{Request->DomainModel->d_domain}" />
<meta property="og:type" content="article" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "{$strTitle??''}",
"description": "{$strDescription??''}",
"datePublished": "2025-04-05"
}
</script>
{block name="head-js"}{/block}
{block name="head-css"}
<link rel="canonical" href='{Request->DomainModel->d_domain}/{site:nurl n_id="$arrNovel[n_id]" n_py="$arrNovel[og_novel_pin_yin]" /}'>

View File

@@ -1,6 +1,23 @@
{extend name="basePc" /}
{block name='nav-active-class'}home{/block}
{block name="title"}{/block}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
{block name="head"}
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" />
<meta property="og:description" content="{$strDescription??''}" />
<meta property="og:url" content="{Request->DomainModel->d_domain}" />
<meta property="og:type" content="article" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "{$strTitle??''}",
"description": "{$strDescription??''}",
"datePublished": "2025-04-05"
}
</script>
{block name="head-js"}{/block}
{block name="head-css"}

View File

@@ -1,6 +1,23 @@
{extend name="basePc" /}
{block name='nav-active-class'}boy{/block}
{block name="title"}{/block}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
{block name="head"}
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" />
<meta property="og:description" content="{$strDescription??''}" />
<meta property="og:url" content="{Request->DomainModel->d_domain}" />
<meta property="og:type" content="article" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "{$strTitle??''}",
"description": "{$strDescription??''}",
"datePublished": "2025-04-05"
}
</script>
{block name="head-css"}

View File

@@ -2,14 +2,16 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<meta name="keywords" content="狂雨小说">
<meta name="description" content="狂雨小说">
<title>01 天龙问世_我真是一条龙-狂雨小说</title>
<meta name="robots" content="index, follow" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="keywords" content="{$strKeywords??''}">
<meta name="description" content="{$strDescription??''}">
<title>{$strTitle??''}</title>
<link rel="icon" href="/template/kuangyu/public/img/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="/template/kuangyu/reader/web/css/style.css" type="text/css">
<link rel="stylesheet" href="/public/layer/need/layer.css" type="text/css">
{block name="head-css"}
<link rel="canonical" href='{Request->DomainModel->d_domain}/pc/xiaoshuo/{$arrNovel.og_novel_pin_yin}-{$arrNovel.n_id}/zhang-{$arrChapter.c_sort_num}'>
<link rel="canonical" href='{Request->DomainModel->d_domain}/pc/xiaoshuo/{$arrNovel.og_novel_pin_yin}-{$arrNovel.n_id}/zhang-{$arrChapter.c_sort_num ?? 1}'>
{/block}
</head>
@@ -139,19 +141,21 @@
data-info="0|-1|486ef2abee55d|0">
<div class="main-text-wrap">
<div class="text-head">
<h3 class="j_chapterName">{$arrChapter.name}</h3>
<h3 class="j_chapterName">{$arrChapter.name ?? ''}</h3>
<div class="text-info cf">
<div class="info fl">
<a href='/pc{site:nurl n_id="$arrNovel[n_id]" n_py="$arrNovel[og_novel_pin_yin]" /}' target="_blank"> <em class="iconfont"></em> {$arrNovel.og_novel_book_name}</a>
<a href="javascript:"
target="_blank"> <em class="iconfont"></em> {$arrNovel.og_novel_author}</a>
<i><em class="iconfont"></em><span class="j_chapterWordCut">2000</span></i>
<i><em class="iconfont"></em><span class="j_updateTime">{$arrChapter.created_at}</span></i>
<i><em class="iconfont"></em><span class="j_updateTime">{$arrChapter.created_at ?? ''}</span></i>
</div>
</div>
</div>
<div class="read-content j_readContent">
{$arrChapter.content|raw}
{if $arrChapter && $arrChapter.content}
{$arrChapter.content|raw }
{/if}
</div>
</div>
</div>
@@ -170,14 +174,14 @@
<span></span>
</div>
<div class="chapter-control dib-wrap">
{if $arrChapter.c_sort_num == 1}
{if $arrChapter && $arrChapter.c_sort_num && $arrChapter.c_sort_num == 1}
<a id="j_chapterPrev" href="javascript:void(0);">上一章</a>
{else}
<a id="j_chapterPrev" href="/pc/xiaoshuo/{$arrNovel.og_novel_pin_yin}-{$arrNovel.n_id}/zhang-{$arrPreChapter.c_sort_num}">上一章</a>
<a id="j_chapterPrev" href="/pc/xiaoshuo/{$arrNovel.og_novel_pin_yin}-{$arrNovel.n_id}/zhang-{$arrPreChapter.c_sort_num ?? 1}">上一章</a>
{/if}
<span>|</span>
{if $arrNextChapter && $arrNextChapter.c_sort_num}
<a id="j_chapterNext" href="/pc/xiaoshuo/{$arrNovel.og_novel_pin_yin}-{$arrNovel.n_id}/zhang-{$arrNextChapter.c_sort_num}">下一章</a>
<a id="j_chapterNext" href="/pc/xiaoshuo/{$arrNovel.og_novel_pin_yin}-{$arrNovel.n_id}/zhang-{$arrNextChapter.c_sort_num ?? 1}">下一章</a>
{/if}
</div>
</div>

View File

@@ -1,6 +1,23 @@
{extend name="basePc" /}
{block name='nav-active-class'}home{/block}
{block name="title"}{/block}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
{block name="head"}
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" />
<meta property="og:description" content="{$strDescription??''}" />
<meta property="og:url" content="{Request->DomainModel->d_domain}" />
<meta property="og:type" content="article" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "{$strTitle??''}",
"description": "{$strDescription??''}",
"datePublished": "2025-04-05"
}
</script>
{block name="head-css"}
<link rel="canonical" href='{Request->DomainModel->d_domain}/xiaoshuo/$arrNovel.og_novel_pin_yin-$arrNovel.n_id/mulu/zheng" /}'>
{/block}

View File

@@ -1,7 +1,23 @@
{extend name="basePc" /}
{block name='nav-active-class'}home{/block}
{block name="title"}{/block}
{block name="head-js"}{/block}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
{block name="head"}
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" />
<meta property="og:description" content="{$strDescription??''}" />
<meta property="og:url" content="{Request->DomainModel->d_domain}" />
<meta property="og:type" content="article" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "{$strTitle??''}",
"description": "{$strDescription??''}",
"datePublished": "2025-04-05"
}
</script>
{block name="head-css"}
<link rel="canonical" href='{Request->DomainModel->d_domain}/{site:nurl n_id="$arrNovel[n_id]" n_py="$arrNovel[og_novel_pin_yin]" /}'>
{/block}
@@ -132,7 +148,7 @@
<div class="pl_con">
{volist name="arrNovel.n_forge_novel" id="ForgeNovel" key="key"}
<!-- n_forge_id -->
<a href='/pc/kan/{$arrNovel.og_novel_pin_yin}-{$arrNovel.n_id}-{$ForgeNovel.n_forge_id}' target="_blank" class="red">{$ForgeNovel.n_forge_title}</a>
<a href='/pc/kan-xiaoshuo/{$arrNovel.og_novel_pin_yin}-{$arrNovel.n_id}-{$ForgeNovel.n_forge_id}' target="_blank" class="red">{$ForgeNovel.n_forge_title}</a>
{/volist}
</div>

View File

@@ -1,6 +1,24 @@
{extend name="basePc" /}
{block name='nav-active-class'}home{/block}
{block name="title"}{/block}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
{block name="head"}
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" />
<meta property="og:description" content="{$strDescription??''}" />
<meta property="og:url" content="{Request->DomainModel->d_domain}" />
<meta property="og:type" content="article" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "{$strTitle??''}",
"description": "{$strDescription??''}",
"datePublished": "2025-04-05"
}
</script>
{block name="head-css"}
<link rel="canonical" href="{Request->DomainModel->d_domain}/paihang/all">
{/block}

View File

@@ -1,6 +1,23 @@
{extend name="basePc" /}
{block name='nav-active-class'}home{/block}
{block name="title"}{/block}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
{block name="head"}
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" />
<meta property="og:description" content="{$strDescription??''}" />
<meta property="og:url" content="{Request->DomainModel->d_domain}" />
<meta property="og:type" content="article" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "{$strTitle??''}",
"description": "{$strDescription??''}",
"datePublished": "2025-04-05"
}
</script>
{block name="head-js"}{/block}
@@ -10,7 +27,7 @@
<div class="find">
<div class="fi_t">
<div class="result">搜索<span style="color:red">“{$strKeywords}”</span>相关结果共有 <span style="color:red">{$arrPage.total}</span> 部小说</div>
<div class="result">搜索<span style="color:red">“{$strSearchKeywords}”</span>相关结果共有 <span style="color:red">{$arrPage.total}</span> 部小说</div>
<!-- <div class="boFi">
<span>{$strKeywords}<s></s></span>
<input type="text" class="search-val" url="/search.html" name="search_keyword" value="1"

View File

@@ -1,6 +1,7 @@
{extend name="basePcUser" /}
{block name='nav-active-class'}home{/block}
{block name="title"}{/block}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
{block name="head-js"}{/block}

View File

@@ -1,8 +1,26 @@
{extend name="basePc" /}
{block name='nav-active-class'}home{/block}
{block name="title"}{/block}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
{block name="head"}
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" />
<meta property="og:description" content="{$strDescription??''}" />
<meta property="og:url" content="{Request->DomainModel->d_domain}" />
<meta property="og:type" content="article" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "{$strTitle??''}",
"description": "{$strDescription??''}",
"datePublished": "2025-04-05"
}
</script>
{/block}
{block name="head-js"}{/block}
<link rel="canonical" href="/" />
{block name="main"}
<div class="content">

View File

@@ -0,0 +1,33 @@
{if !empty($arrPaginator)}
<div class="page_num">
{volist name="arrPaginator" id="item"}
{eq name="item.type" value="prev"}
<a href="{$item.url ?: '#'}"
class="z {$item.disabled ? 'disabled' : ''}">
{$item.label}
</a>
{/eq}
{/volist}
<select onchange="self.location.href=options[selectedIndex].value">
{volist name="arrPaginator" id="item"}
{eq name="item.type" value="page"}
<?php $start = ($item['label'] - 1) * $intLimit + 1; ?>
<?php $end = $item['label'] * $intLimit; ?>
<option value="{$item.url}" {$item.current ? 'selected' : ''}>
第{$start}-{$end}章
</option>
{/eq}
{/volist}
</select>
{volist name="arrPaginator" id="item"}
{eq name="item.type" value="next"}
<a href="{$item.url ?: '#'}"
class="y {$item.disabled ? 'disabled' : ''}">
{$item.label}
</a>
{/eq}
{/volist}
</div>
{/if}

View File

@@ -1,6 +1,23 @@
{extend name="baseH5User" /}
{block name='nav-active-class'}home{/block}
{block name="title"}{/block}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
{block name="head"}
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" />
<meta property="og:description" content="{$strDescription??''}" />
<meta property="og:url" content="{Request->DomainModel->d_domain}" />
<meta property="og:type" content="article" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "{$strTitle??''}",
"description": "{$strDescription??''}",
"datePublished": "2025-04-05"
}
</script>
{block name="head-js"}{/block}
{block name="head-name"}我的书架{/block}

View File

@@ -1,6 +1,23 @@
{extend name="baseH5User" /}
{block name='nav-active-class'}home{/block}
{block name="title"}{/block}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
{block name="head"}
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" />
<meta property="og:description" content="{$strDescription??''}" />
<meta property="og:url" content="{Request->DomainModel->d_domain}" />
<meta property="og:type" content="article" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "{$strTitle??''}",
"description": "{$strDescription??''}",
"datePublished": "2025-04-05"
}
</script>
{block name="head-js"}{/block}
{block name="head-name"}最近阅读{/block}

View File

@@ -1,6 +1,23 @@
{extend name="baseH5User" /}
{block name='nav-active-class'}home{/block}
{block name="title"}{/block}
{block name="title"}{$strTitle??''}{/block}
{block name="keywords"}{$strKeywords??''}{/block}
{block name="description"}{$strDescription??''}{/block}
{block name="head"}
<!-- 社交媒体标签 -->
<meta property="og:title" content="{$strTitle??''}" />
<meta property="og:description" content="{$strDescription??''}" />
<meta property="og:url" content="{Request->DomainModel->d_domain}" />
<meta property="og:type" content="article" />
<!-- 结构化数据 -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "{$strTitle??''}",
"description": "{$strDescription??''}",
"datePublished": "2025-04-05"
}
</script>
{block name="head-js"}{/block}
{block name="head-name"}用户中心{/block}

View File

@@ -3,16 +3,23 @@
<head>
<meta charset="UTF-8" />
<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<title>狂雨小说</title>
<meta name="keywords" content="狂雨小说" />
<meta name="description" content="狂雨小说" />
<meta name="robots" content="index, follow" />
<meta http-equiv="Cache-Control" content="no-transform, max-age=3600" />
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
<link rel="stylesheet" href="/template/kuangyu/home/new_wap/css/style.css" />
<title>{block name="title"}{/block}</title>
<meta name="description" content='{block name="keywords"}{/block}'>
<meta name="description" content='{block name="description"}{/block}'>
<link rel="icon" href="/template/kuangyu/public/img/favicon.ico" type="image/x-icon" />
<link rel="preload" href="/template/kuangyu/home/new_wap/css/style.css" as="style" onload="this.rel='stylesheet'" />
<link rel="stylesheet" href="/template/kuangyu/home/new_wap/css/style.css" type="text/css">
<link rel="preload" href="/template/kuangyu/public/css/common.css" as="style" onload="this.rel='stylesheet'" />
<link rel="stylesheet" href="/template/kuangyu/public/css/common.css" type="text/css">
<link rel="stylesheet" type="text/css" href="/template/kuangyu/public/css/mulu.css">
<link rel="preload" href="/template/kuangyu/public/css/mulu.css" as="style" onload="this.rel='stylesheet'" />
<link rel="stylesheet" href="/template/kuangyu/public/css/mulu.css" type="text/css">
<link rel="stylesheet" href="/public/layer/need/layer.css" />
{block name="head"}{/block}
{block name="head-css"}{/block}
{block name="head-js"}{/block}
</head>
@@ -98,6 +105,12 @@
<script src="/template/kuangyu/public/js/common.js"></script>
{block name="footer-js"}{/block}
<!-- 全局统计 -->
{site:cfg code="PUBLIC_TONGJI_CODE" encode="false"/}
<!-- TODO 站点统计 这个无法渲染 -->
{Request->DomainModel->d_statis}
</body>
</html>

View File

@@ -1,13 +1,19 @@
<html data-dpr="1" style="font-size: 39px;">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
<title>狂雨小说</title>
<meta name="format-detection" content="telephone=no">
<meta charset="UTF-8" />
<meta name="robots" content="index, follow" />
<meta http-equiv="Cache-Control" content="no-transform, max-age=3600" />
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
<meta name="keywords" content="{$strKeywords??''}">
<meta name="description" content="{$strDescription??''}">
<title>{$strTitle??''}</title>
<link rel="icon" href="/template/kuangyu/public/img/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="/template/kuangyu/user/wap/css/style.css">
<script type="text/javascript" src="/template/kuangyu/user/wap/js/flexible.min.js"></script>
{block name="head"}{/block}
{block name="head-css"}{/block}
{block name="head-js"}{/block}
</head>
<body style="font-size: 12px;">
@@ -18,7 +24,7 @@
<div class="app_header_back"></div>
<div class="app_header_h1">
{block name="head-name"}{/block}
<a href="/user.html"> <i class="shujiaIco"></i>
<a href="/user"> <i class="shujiaIco"></i>
</a> <i class="moreIco"></i>
</div>
</div>
@@ -28,13 +34,13 @@
<a href="/">首页</a>
</li>
<li class="icon2">
<a href="/shuku.html">书库</a>
<a href="/shuku">书库</a>
</li>
<li class="icon3">
<a href="/bookshelf.html">书架</a>
<a href="/bookshelf">书架</a>
</li>
<li class="icon4">
<a href="/user.html">个人中心</a>
<a href="/user">个人中心</a>
</li>
</ul>
</div>
@@ -45,6 +51,12 @@
<script src="/public/jquery/jquery-3.7.1.min.js"></script>
<script type="text/javascript" src="/template/kuangyu/user/wap/js/user.js"></script>
<script src="/template/kuangyu/public/js/common.js"></script>
<!-- 全局统计 -->
{site:cfg code="PUBLIC_TONGJI_CODE" encode="false"/}
<!-- TODO 站点统计 这个无法渲染 -->
{Request->DomainModel->d_statis}
</body>
</html>

View File

@@ -3,14 +3,22 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<meta name="keywords" content="狂雨小说">
<meta name="description" content="狂雨小说">
<title>{$strTitle??''}</title>
<meta name="robots" content="index, follow" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{block name="title"}{/block}</title>
<meta name="description" content='{block name="keywords"}{/block}'>
<meta name="description" content='{block name="description"}{/block}'>
<link rel="icon" href="/template/kuangyu/public/img/favicon.ico" type="image/x-icon" />
<link rel="preload" href="/template/kuangyu/home/bai_web/css/style.css" as="style" onload="this.rel='stylesheet'" />
<link rel="stylesheet" href="/template/kuangyu/home/bai_web/css/style.css" type="text/css">
<link rel="preload" href="/template/kuangyu/public/css/common.css" as="style" onload="this.rel='stylesheet'" />
<link rel="stylesheet" href="/template/kuangyu/public/css/common.css" type="text/css">
<link rel="stylesheet" type="text/css" href="/template/kuangyu/public/css/mulu.css">
<link rel="preload" href="/template/kuangyu/public/css/mulu.css" as="style" onload="this.rel='stylesheet'" />
<link rel="stylesheet" href="/template/kuangyu/public/css/mulu.css" type="text/css">
<link rel="stylesheet" href="/public/layer/need/layer.css" type="text/css">
{block name="head"}{/block}
{block name="head-css"}{/block}
{block name="head-js"}{/block}
</head>
@@ -74,6 +82,12 @@
{block name="footer-js"}{/block}
<!-- 全局统计 -->
{site:cfg code="PUBLIC_TONGJI_CODE" encode="false"/}
<!-- TODO 站点统计 这个无法渲染 -->
{Request->DomainModel->d_statis}
</body>
</html>

View File

@@ -2,35 +2,42 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title>狂雨小说</title>
<meta name="robots" content="index, follow" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="keywords" content="{$strKeywords??''}">
<meta name="description" content="{$strDescription??''}">
<title>{$strTitle??''}</title>
<link rel="icon" href="/template/kuangyu/public/img/favicon.ico" type="image/x-icon" />
<link href="/template/kuangyu/user/web/css/user.css" rel="stylesheet">
<link rel="stylesheet" href="/template/kuangyu/public/css/common.css" type="text/css">
{block name="head"}{/block}
{block name="head-css"}{/block}
{block name="head-js"}{/block}
</head>
<body style="">
<body>
<div class="mod-header">
<div class="ibody">
<!--搜索部分 start-->
<div class="wrap1200 logo iMod">
<a href="/pc/user.html" class="fl imotie">个人中心</a>
<a href="/pc/user" class="fl imotie">个人中心</a>
<ul class="iUl">
<li>
<a href="/pc/index.html">首页</a>
<a href="/pc/">首页</a>
</li>
<li>
<a href="/pc/user.html">个人中心</a>
<a href="/pc/user">个人中心</a>
</li>
<li class="accounts">
<a href="javaScript:;">账户设置</a>
<p style="display: none;">
<a href="/pc/user.html">个人信息</a>
<a href="/pc/user">个人信息</a>
<!-- <a href="/user/user/password.html">修改密码</a> -->
</p>
</li>
</ul>
<div class="searchbox">
<form action="/search.html" method="get">
<form action="/search" method="get">
<div class="searchbox-inner">
<input type="text" name="keyword" placeholder="找书" class="searchinput" value="">
<i class="search-icon"></i>
@@ -42,12 +49,12 @@
<div class="login_after" id="mod_login_after">
<span class="yh">
<img src="/template/kuangyu/user/web/images/user-icon.png" alt="123456">
<a href="/pc/user.html">123456</a>
<a href="/pc/user">123456</a>
</span>
<ul class="xiala">
<li><i class="iconfont"></i><a href="/pc/bookshelf.html">我的书架</a></li>
<li><i class="iconfont"></i><a href="/pc/user.html">个人中心</a></li>
<!-- <li><i class="iconfont"></i><a href="/user/user/logout.html">退出</a></li> -->
<li><i class="iconfont"></i><a href="/pc/bookshelf">我的书架</a></li>
<li><i class="iconfont"></i><a href="/pc/user">个人中心</a></li>
<!-- <li><i class="iconfont"></i><a href="/user/user/logout">退出</a></li> -->
</ul>
</div>
</div>
@@ -87,20 +94,16 @@
</p>
<ul>
<li>
<a href="/pc/bookshelf.html">
<a href="/pc/bookshelf">
<i class="iconfont"></i>
我的书架 </a>
</li>
<li>
<a href="/pc/history.html">
<a href="/pc/history">
<i class="iconfont"></i>
最近阅读 </a>
</li>
<!-- <li>
<a href="/user/comment/index.html">
<i class="iconfont"></i>
我的评论 </a>
</li> -->
</ul>
<p class="title">
<i class="iconfont"></i>
@@ -127,6 +130,12 @@
<script type="text/javascript" src="/template/kuangyu/user/web/js/jquery.SuperSlide.js"></script>
<script type="text/javascript" src="/template/kuangyu/user/web/js/user.js"></script>
<script src="/template/kuangyu/public/js/common.js"></script>
<!-- 全局统计 -->
{site:cfg code="PUBLIC_TONGJI_CODE" encode="false"/}
<!-- TODO 站点统计 这个无法渲染 -->
{Request->DomainModel->d_statis}
</body>
</html>

View File

@@ -0,0 +1,212 @@
最牛的seo 优化大师
这个是 替换标识
'{strSiteName}' => '这个是网站名',
'{strSiteDomain}' => '这个是站点域名',
'{strSiteKeywords}' => '这个是网站关键字',
'{strSiteDescription}' => '这个是网站描述',
'{strIndexTitle}' => '这个是首页Title',
'{strIndexKeywords}' => '这个是首页Keywords',
'{strIndexDescription}' => '这个是首页Description',
'{strNovelName}' => '这个是当前页面小说描述',
'{strNovelChapterName}' => '当前页面小说章节名字',
'{strNovelChapterSort}' => '当前页面小说章节排序号',
'{strNovelCategoryName}' => '当前页面小说分类名字',
'{strNovelSex}' => '当前页面小说是男生还是女生 小说',
'{strNovelStatus}' => '当前页面小说状态 是连载还是完结',
'{intPage}' => '当前页面分页页码',
'{strNovelAuthor}' => '小说作者',
'{strNovelDescription}' => '小说简介',
'{strSearchKeywords}' => '搜索关键词',
这个是分类或者书库的路由,公用一套视图模板
/shuku/:strGender/:strCategory/:strStatus/page:intPage
请根据路由和上面的替换标识你帮忙设计一个最友好seo的 tkd 替换模板
案列-分类的:
title '{strNovelSex}{strNovelCategoryName}{strNovelStatus}小说 - {strSiteName} - 第{intPage}页'
keywords: '{strNovelCategoryName}, {strNovelSex}小说, {strNovelStatus}小说, {strSiteName}, 免费阅读'
description: '{strSiteName}提供{strNovelSex}{strNovelCategoryName}{strNovelStatus}小说免费阅读,第{intPage}页汇聚热门作品,欢迎体验{strSiteDomain}'
好的,我会根据你提供的书库路由 `/shuku/:strGender/:strCategory/:strStatus/page:intPage` 和替换标识,设计一个最优的 SEO 友好的 TKD 模板。你的案例已经给出了一个分类页的模板,我会在此基础上优化,确保它既符合书库页面的特点,又最大化 SEO 效果。
---
### **分析**
#### **路由特点**
- **路由**`/shuku/:strGender/:strCategory/:strStatus/page:intPage`
- `:strGender`:性别筛选(男生/女生/全部)。
- `:strCategory`:分类(如玄幻、言情)。
- `:strStatus`:状态(连载/完结/全部)。
- `:intPage`:分页页码。
- **页面类型**:书库或分类页面,展示符合筛选条件的小说列表,支持分页。
- **SEO 目标**
- 突出筛选条件(性别、分类、状态)。
- 支持分页优化。
- 融入品牌词并吸引点击。
#### **替换标识使用**
- **核心字段**
- `{strNovelSex}`:对应 `:strGender`
- `{strNovelCategoryName}`:对应 `:strCategory`
- `{strNovelStatus}`:对应 `:strStatus`
- `{intPage}`:对应 `:intPage`
- `{strSiteName}``{strSiteDomain}`:品牌词。
- **不适用字段**
- `{strNovelName}``{strNovelChapterName}``{strNovelChapterSort}``{strNovelAuthor}``{strNovelDescription}`:书库页不涉及具体小说。
- `{strSearchKeywords}`:搜索页专用。
#### **SEO 优化原则**
- **Title**简洁60 字符内),突出筛选条件和品牌。
- **Keywords**覆盖分类、性别、状态等核心词5-10 个。
- **Description**:吸引点击,融入筛选条件和网站特色。
---
### **优化后的 TKD 模板**
以下是基于你的案例优化后的 TKD 模板:
#### **1. Title**(控制在 60 字符以内)
- **模板**`{strNovelSex}{strNovelCategoryName}{strNovelStatus}小说 - {strSiteName} - 第{intPage}页`
- **优化点**
- 保留你的案例结构,简洁直观。
- `{intPage}` 仅在大于 1 时显示,避免首页面冗余。
- **示例**`/shuku/nansheng-xiaoshuo/xuanhuan/lianzai/page2`
- `男生玄幻连载小说 - 这个是网站名 - 第2页`
#### **2. Keywords**5-10 个核心词)
- **模板**`{strNovelCategoryName}小说, {strNovelSex}小说, {strNovelStatus}小说, {strSiteName}, 免费小说, 在线阅读`
- **优化点**
- 增加“免费小说”和“在线阅读”,提升行业词覆盖。
- `{strSiteName}` 作为品牌词,不重复 `{strSiteKeywords}`,保持简洁。
- **示例**
- `玄幻小说, 男生小说, 连载小说, 这个是网站名, 免费小说, 在线阅读`
#### **3. Description**150-160 字符)
- **模板**`{strSiteName}提供{strNovelSex}{strNovelCategoryName}{strNovelStatus}小说免费在线阅读,第{intPage}页精选热门作品,畅享{strSiteDomain}`
- **优化点**
- 替换“欢迎体验”为“畅享”,更吸引移动端用户。
- 加入“精选热门作品”,提升点击欲望。
- **示例**
- `这个是网站名提供男生玄幻连载小说免费在线阅读第2页精选热门作品畅享这个是站点域名`
---
### **参数映射**
- `{strNovelSex}`
- `nansheng-xiaoshuo` → '男生'
- `nvsheng-xiaoshuo` → '女生'
- `all` → ''(空)
- `{strNovelCategoryName}`
- `xuanhuan` → '玄幻'
- `yanqing` → '言情'
- `all` → ''(需完整映射表)
- `{strNovelStatus}`
- `lianzai` → '连载'
- `wanjie` → '完结'
- `all` → ''(空)
- `{intPage}`:直接使用路由中的 `:intPage`
- `{strSiteName}` → '这个是网站名'
- `{strSiteDomain}` → '这个是站点域名'
- `{strSiteTitle}` → '这个是网站标题'
- `{strSiteKeywords}` → '这个是网站关键字'
- `{strNovelName}``{strNovelChapterName}``{strNovelChapterSort}``{strNovelAuthor}``{strNovelDescription}``{strSearchKeywords}` → 空
---
### **完整拼接示例**
#### **1. 全默认:`/shuku/all/all/all/page1`**
- **Title**`小说 - 这个是网站名`
- **Keywords**`小说, 这个是网站名, 免费小说, 在线阅读`
- **Description**`这个是网站名提供小说免费在线阅读第1页精选热门作品畅享这个是站点域名`
#### **2. 具体筛选:`/shuku/nansheng-xiaoshuo/xuanhuan/lianzai/page2`**
- **Title**`男生玄幻连载小说 - 这个是网站名 - 第2页`
- **Keywords**`玄幻小说, 男生小说, 连载小说, 这个是网站名, 免费小说, 在线阅读`
- **Description**`这个是网站名提供男生玄幻连载小说免费在线阅读第2页精选热门作品畅享这个是站点域名`
#### **3. 女生完结:`/shuku/nvsheng-xiaoshuo/yanqing/wanjie/page1`**
- **Title**`女生言情完结小说 - 这个是网站名`
- **Keywords**`言情小说, 女生小说, 完结小说, 这个是网站名, 免费小说, 在线阅读`
- **Description**`这个是网站名提供女生言情完结小说免费在线阅读第1页精选热门作品畅享这个是站点域名`
---
### **实现代码(伪代码)**
```php
public function getLibrary($strGender, $strCategory, $strStatus, $intPage) {
$genderMap = [
'nansheng-xiaoshuo' => '男生',
'nvsheng-xiaoshuo' => '女生',
'all' => ''
];
$categoryMap = [
'xuanhuan' => '玄幻',
'yanqing' => '言情',
// 更多分类...
];
$statusMap = [
'lianzai' => '连载',
'wanjie' => '完结',
'all' => ''
];
$replacements = [
'{strSiteName}' => '这个是网站名',
'{strSiteDomain}' => '这个是站点域名',
'{strSiteTitle}' => '这个是网站标题',
'{strSiteKeywords}' => '这个是网站关键字',
'{strNovelSex}' => $genderMap[$strGender] ?? '',
'{strNovelCategoryName}' => $categoryMap[$strCategory] ?? $strCategory,
'{strNovelStatus}' => $statusMap[$strStatus] ?? '',
'{intPage}' => $intPage,
'{strNovelName}' => '',
'{strNovelChapterName}' => '',
'{strNovelChapterSort}' => '',
'{strNovelAuthor}' => '',
'{strNovelDescription}' => '',
'{strSearchKeywords}' => ''
];
$pageStr = $intPage > 1 ? " - 第{intPage}页" : '';
$title = "{strNovelSex}{strNovelCategoryName}{strNovelStatus}小说 - {strSiteName}{$pageStr}";
$keywords = "{strNovelCategoryName}小说, {strNovelSex}小说, {strNovelStatus}小说, {strSiteName}, 免费小说, 在线阅读";
$description = "{strSiteName}提供{strNovelSex}{strNovelCategoryName}{strNovelStatus}小说免费在线阅读,第{intPage}页精选热门作品,畅享{strSiteDomain}";
foreach ($replacements as $key => $value) {
$title = str_replace($key, $value, $title);
$keywords = str_replace($key, $value, $keywords);
$description = str_replace($key, $value, $description);
}
return view('library', [
'title' => $title,
'keywords' => $keywords,
'description' => $description,
'gender' => $strGender,
'category' => $strCategory,
'status' => $strStatus,
'page' => $intPage
]);
}
```
---
### **SEO 优化亮点**
1. **动态筛选**`{strNovelSex}``{strNovelCategoryName}``{strNovelStatus}` 组合覆盖多种搜索意图(如“男生玄幻连载小说”)。
2. **分页友好**:首页面简洁,后续页面自然融入 `{intPage}`,可配合 `rel="next/prev"`
3. **品牌强化**`{strSiteName}``{strSiteDomain}` 提升网站辨识度。
4. **行业词**:增加“免费小说”“在线阅读”,契合用户搜索习惯。
---
### **与你的案例对比**
- **Title**:保留你的结构,优化分页显示。
- **Keywords**:增加“免费小说”“在线阅读”,提升覆盖。
- **Description**:用“畅享”替代“欢迎体验”,更吸引人。
这个 TKD 模板是书库页面的最优 SEO 方案。如果需要进一步调整(比如更短的 Title 或特定关键词),可以告诉我!

View File

@@ -0,0 +1,187 @@
最牛的seo 优化大师
这个是 替换标识
'{strSiteName}' => '这个是网站名',
'{strSiteDomain}' => '这个是站点域名',
'{strSiteKeywords}' => '这个是网站关键字',
'{strSiteDescription}' => '这个是网站描述',
'{strIndexTitle}' => '这个是首页Title',
'{strIndexKeywords}' => '这个是首页Keywords',
'{strIndexDescription}' => '这个是首页Description',
'{strNovelName}' => '这个是当前页面小说描述',
'{strNovelChapterName}' => '当前页面小说章节名字',
'{strNovelChapterSort}' => '当前页面小说章节排序号',
'{strNovelCategoryName}' => '当前页面小说分类名字',
'{strNovelSex}' => '当前页面小说是男生还是女生 小说',
'{strNovelStatus}' => '当前页面小说状态 是连载还是完结',
'{intPage}' => '当前页面分页页码',
'{strNovelAuthor}' => '小说作者',
'{strNovelDescription}' => '小说简介',
'{strSearchKeywords}' => '搜索关键词',
这个是小说排行榜的路由,公用一套视图模板
/paihang/all
请根据路由和上面的替换标识你帮忙设计一个最友好seo的 tkd 替换模板
案列-分类的:
title '{strNovelSex}{strNovelCategoryName}{strNovelStatus}小说 - {strSiteName} - 第{intPage}页'
keywords: '{strNovelCategoryName}, {strNovelSex}小说, {strNovelStatus}小说, {strSiteName}, 免费阅读'
description: '{strSiteName}提供{strNovelSex}{strNovelCategoryName}{strNovelStatus}小说免费阅读,第{intPage}页汇聚热门作品,欢迎体验{strSiteDomain}'
好的,我会根据你提供的小说排行榜路由 `/paihang/all` 和替换标识,设计一个最优的 SEO 友好的 TKD 模板。小说排行榜页面与分类页面不同,它展示的是热门或推荐的小说列表,通常不涉及具体的性别、分类或状态筛选,而是突出“排行榜”这一特性。以下是我的设计:
---
### **分析**
#### **路由特点**
- **路由**`/paihang/all`
- `all`:表示全部排行榜(可能是默认或唯一的排行榜类型)。
- 无显式分页参数,但可能通过视图逻辑支持分页(如 `?page=2`)。
- **页面类型**:小说排行榜页面,展示热门小说列表,可能按点击量、更新时间等排序。
- **SEO 目标**
- 突出“排行榜”特性,吸引搜索热门小说的用户。
- 支持分页优化(如果有)。
- 融入品牌词并提升点击率。
#### **替换标识使用**
- **核心字段**
- `{strSiteName}``{strSiteDomain}``{strSiteKeywords}`:品牌和公用关键词。
- `{intPage}`:分页页码(若支持分页)。
- **不适用字段**
- `{strNovelSex}``{strNovelCategoryName}``{strNovelStatus}`:排行榜页面不涉及具体筛选。
- `{strNovelName}``{strNovelChapterName}``{strNovelChapterSort}``{strNovelAuthor}``{strNovelDescription}`:不涉及单本小说。
- `{strSearchKeywords}`:搜索页专用。
- `{strIndexTitle}``{strIndexKeywords}``{strIndexDescription}`:首页专用。
#### **SEO 优化原则**
- **Title**简洁60 字符内),突出排行榜和品牌。
- **Keywords**:覆盖排行榜相关词和网站公用关键词。
- **Description**:吸引点击,强调热门小说和免费阅读。
---
### **优化后的 TKD 模板**
以下是专为小说排行榜页面设计的 TKD 模板:
#### **1. Title**(控制在 60 字符以内)
- **模板**`小说排行榜 - {strSiteName} - 第{intPage}页`
- **优化点**
- “小说排行榜”作为核心关键词,匹配用户搜索(如“小说排行榜”)。
- `{strSiteName}` 强化品牌。
- `{intPage}` 仅在大于 1 时显示,避免首页面冗余。
- **示例**`/paihang/all`,假设无分页或 `intPage = 1`
- `小说排行榜 - 这个是网站名`
#### **2. Keywords**5-10 个核心词)
- **模板**`小说排行榜, 热门小说, 小说推荐, {strSiteKeywords}, {strSiteName}, 免费阅读`
- **优化点**
- “小说排行榜”、“热门小说”、“小说推荐”突出页面主题。
- `{strSiteKeywords}` 复用网站公用关键词(如“这个是网站关键字”)。
- `{strSiteName}` 作为品牌词。
- “免费阅读”增加行业词覆盖。
- **示例**(假设 `{strSiteKeywords}` = '小说, 免费小说, 在线阅读'
- `小说排行榜, 热门小说, 小说推荐, 小说, 免费小说, 在线阅读, 这个是网站名, 免费阅读`
#### **3. Description**150-160 字符)
- **模板**`{strSiteName}提供小说排行榜,第{intPage}页精选热门小说免费阅读,最新排行一览无余,畅享{strSiteDomain}`
- **优化点**
- 突出“排行榜”和“热门小说”,吸引用户。
- “免费阅读”和“畅享”提升点击欲望。
- `{strSiteName}``{strSiteDomain}` 强化品牌。
- **示例**
- `这个是网站名提供小说排行榜第1页精选热门小说免费阅读最新排行一览无余畅享这个是站点域名`
---
### **参数映射**
- `{strSiteName}` → '这个是网站名'
- `{strSiteDomain}` → '这个是站点域名'
- `{strSiteKeywords}` → '这个是网站关键字'(假设为“小说, 免费小说, 在线阅读”)
- `{intPage}` → 默认 '1'(若路由支持分页,则从参数获取,如 `?page=2`
- `{strNovelName}``{strNovelSex}``{strNovelCategoryName}``{strNovelStatus}``{strNovelChapterName}``{strNovelChapterSort}``{strNovelAuthor}``{strNovelDescription}``{strSearchKeywords}` → 空
---
### **完整拼接示例**
#### **路由:`/paihang/all`(假设 intPage = 1**
- 假设:
- `{strSiteKeywords}` = '小说, 免费小说, 在线阅读'
- `{intPage}` = '1'
- **Title**
- `小说排行榜 - 这个是网站名`
- **Keywords**
- `小说排行榜, 热门小说, 小说推荐, 小说, 免费小说, 在线阅读, 这个是网站名, 免费阅读`
- **Description**
- `这个是网站名提供小说排行榜第1页精选热门小说免费阅读最新排行一览无余畅享这个是站点域名`
#### **路由:`/paihang/all?page=2`(假设支持分页)**
- `{intPage}` = '2'
- **Title**
- `小说排行榜 - 这个是网站名 - 第2页`
- **Keywords**
- `小说排行榜, 热门小说, 小说推荐, 小说, 免费小说, 在线阅读, 这个是网站名, 免费阅读`
- **Description**
- `这个是网站名提供小说排行榜第2页精选热门小说免费阅读最新排行一览无余畅享这个是站点域名`
---
### **实现代码(伪代码)**
```php
public function getRanking() {
$replacements = [
'{strSiteName}' => '这个是网站名',
'{strSiteDomain}' => '这个是站点域名',
'{strSiteKeywords}' => '小说, 免费小说, 在线阅读', // 使用你配置的公用关键词
'{strSiteDescription}' => '这个是网站描述',
'{intPage}' => request()->input('page', 1), // 默认第1页假设分页通过查询参数传入
'{strNovelName}' => '',
'{strNovelSex}' => '',
'{strNovelCategoryName}' => '',
'{strNovelStatus}' => '',
'{strNovelChapterName}' => '',
'{strNovelChapterSort}' => '',
'{strNovelAuthor}' => '',
'{strNovelDescription}' => '',
'{strSearchKeywords}' => ''
];
$pageStr = $replacements['{intPage}'] > 1 ? " - 第{intPage}页" : '';
$title = "小说排行榜 - {strSiteName}{$pageStr}";
$keywords = "小说排行榜, 热门小说, 小说推荐, {strSiteKeywords}, {strSiteName}, 免费阅读";
$description = "{strSiteName}提供小说排行榜,第{intPage}页精选热门小说免费阅读,最新排行一览无余,畅享{strSiteDomain}";
foreach ($replacements as $key => $value) {
$title = str_replace($key, $value, $title);
$keywords = str_replace($key, $value, $keywords);
$description = str_replace($key, $value, $description);
}
return view('ranking', [
'title' => $title,
'keywords' => $keywords,
'description' => $description,
'page' => $replacements['{intPage}']
]);
}
```
---
### **SEO 优化亮点**
1. **排行榜特性**`小说排行榜` 匹配用户搜索(如“小说排行榜 2023”
2. **公用关键词**`{strSiteKeywords}` 融入 Keywords提升网站整体相关性。
3. **分页支持**`{intPage}` 动态调整,首页面简洁,后续页面自然扩展。
4. **品牌强化**`{strSiteName}``{strSiteDomain}` 提升辨识度。
5. **吸引点击**:突出“热门小说”和“免费阅读”,契合用户需求。
---
### **与分类案例的区别**
- **分类页**:聚焦筛选条件(如“男生玄幻连载小说”),多类别。
- **排行榜页**:聚焦热门小说推荐(如“小说排行榜”),无具体筛选。
这个 TKD 模板是小说排行榜页面的最优 SEO 方案。如果你的 `{strSiteKeywords}` 有具体值(而不是“这个是网站关键字”),或路由支持其他参数(比如不同排行榜类型),请告诉我,我再调整!你觉得如何?

View File

@@ -0,0 +1,208 @@
最牛的seo 优化大师
这个是 替换标识
'{strSiteName}' => '这个是网站名',
'{strSiteDomain}' => '这个是站点域名',
'{strSiteKeywords}' => '这个是网站关键字',
'{strSiteDescription}' => '这个是网站描述',
'{strIndexTitle}' => '这个是首页Title',
'{strIndexKeywords}' => '这个是首页Keywords',
'{strIndexDescription}' => '这个是首页Description',
'{strNovelName}' => '这个是当前页面小说描述',
'{strNovelChapterName}' => '当前页面小说章节名字',
'{strNovelChapterSort}' => '当前页面小说章节排序号',
'{strNovelCategoryName}' => '当前页面小说分类名字',
'{strNovelSex}' => '当前页面小说是男生还是女生 小说',
'{strNovelStatus}' => '当前页面小说状态 是连载还是完结',
'{intPage}' => '当前页面分页页码',
'{strNovelAuthor}' => '小说作者',
'{strNovelDescription}' => '小说简介',
'{strSearchKeywords}' => '搜索关键词',
这个是小说章节目录页面的路由
/xiaoshuo/[小说拼音]-[小说id]/mulu/order/[page]
请根据路由和上面的替换标识你帮忙设计一个最友好seo的 tkd 替换模板
案列-分类的:
title '{strNovelSex}{strNovelCategoryName}{strNovelStatus}小说 - {strSiteName} - 第{intPage}页'
keywords: '{strNovelCategoryName}, {strNovelSex}小说, {strNovelStatus}小说, {strSiteName}, 免费阅读'
description: '{strSiteName}提供{strNovelSex}{strNovelCategoryName}{strNovelStatus}小说免费阅读,第{intPage}页汇聚热门作品,欢迎体验{strSiteDomain}'
好的,我会根据你提供的小说章节目录页面路由 `/xiaoshuo/[小说拼音]-[小说id]/mulu/order/[page]` 和替换标识,设计一个最优的 SEO 友好的 TKD 模板。小说章节目录页面与分类页面和章节页面不同,它展示的是某本小说的章节列表,通常按顺序排列并支持分页,因此需要突出小说名、目录特性以及分页信息。以下是我的设计:
---
### **分析**
#### **路由特点**
- **路由**`/xiaoshuo/[小说拼音]-[小说id]/mulu/order/[page]`
- `[小说拼音]`:小说拼音(如 `douluodalu`)。
- `[小说id]`:小说 ID`123`)。
- `/mulu/`:表示章节目录。
- `order`:可能表示排序方式(假设为固定值,未明确变化)。
- `[page]`:分页页码。
- **页面类型**:小说章节目录页面,展示某本小说的所有章节列表,支持分页。
- **SEO 目标**
- 突出小说名和“章节目录”特性,吸引搜索目录的用户。
- 支持分页优化。
- 融入品牌词并提升点击率。
#### **替换标识使用**
- **核心字段**
- `{strNovelName}`:小说标题。
- `{intPage}`:分页页码。
- `{strNovelAuthor}`:小说作者。
- `{strNovelCategoryName}`:小说分类。
- `{strNovelSex}`:男生/女生小说。
- `{strNovelStatus}`:连载/完结。
- `{strSiteName}``{strSiteDomain}``{strSiteKeywords}`:品牌和公用关键词。
- **不适用字段**
- `{strNovelChapterName}``{strNovelChapterSort}`:目录页不涉及具体章节。
- `{strSearchKeywords}`:搜索页专用。
- `{strIndexTitle}``{strIndexKeywords}``{strIndexDescription}`:首页专用。
#### **SEO 优化原则**
- **Title**简洁60 字符内),突出小说名和目录特性。
- **Keywords**:覆盖小说名、目录、分类等高相关性词。
- **Description**:吸引点击,强调章节目录和免费阅读。
---
### **优化后的 TKD 模板**
以下是专为小说章节目录页面设计的 TKD 模板:
#### **1. Title**(控制在 60 字符以内)
- **模板**`{strNovelName}章节目录 - {strSiteName} - 第{intPage}页`
- **优化点**
- `{strNovelName}` 放在首位,匹配用户搜索(如“斗罗大陆 章节目录”)。
- “章节目录”明确页面类型。
- `{strSiteName}` 强化品牌。
- `{intPage}` 仅在大于 1 时显示,避免首页面冗余。
- **示例**`/xiaoshuo/douluodalu-123/mulu/order/2`
- `斗罗大陆章节目录 - 这个是网站名 - 第2页`
#### **2. Keywords**5-10 个核心词)
- **模板**`{strNovelName}, {strNovelName}章节目录, {strNovelAuthor}, {strNovelCategoryName}小说, {strNovelSex}小说, {strSiteKeywords}, {strSiteName}`
- **优化点**
- `{strNovelName}``{strNovelName}章节目录` 是核心词。
- `{strNovelAuthor}` 提升作者相关搜索。
- `{strNovelCategoryName}小说``{strNovelSex}小说` 增加分类相关性。
- `{strSiteKeywords}` 复用网站公用关键词(如“这个是网站关键字”)。
- `{strSiteName}` 作为品牌词。
- **示例**(假设 `{strSiteKeywords}` = '小说, 免费小说, 在线阅读'
- `斗罗大陆, 斗罗大陆章节目录, 唐家三少, 玄幻小说, 男生小说, 小说, 免费小说, 在线阅读, 这个是网站名`
#### **3. Description**150-160 字符)
- **模板**`{strSiteName}提供{strNovelName}章节目录免费查看,第{intPage}页包含最新{strNovelStatus}章节,{strNovelAuthor}创作,畅享{strSiteDomain}`
- **优化点**
- 突出“章节目录免费查看”,吸引用户。
- `{strNovelStatus}` 体现小说状态。
- `{strNovelAuthor}` 增加权威性。
- “畅享”提升吸引力。
- **示例**
- `这个是网站名提供斗罗大陆章节目录免费查看第2页包含最新连载章节唐家三少创作畅享这个是站点域名`
---
### **参数映射**
- `{strNovelName}`:从数据库根据 `[小说id]` 获取小说标题。
- `{intPage}`:直接使用路由中的 `[page]`
- `{strNovelAuthor}`:从数据库获取作者名。
- `{strNovelCategoryName}`:从数据库获取分类(如“玄幻”)。
- `{strNovelSex}`:从数据库获取性别(如“男生”)。
- `{strNovelStatus}`:从数据库获取状态(如“连载”)。
- `{strSiteName}` → '这个是网站名'
- `{strSiteDomain}` → '这个是站点域名'
- `{strSiteKeywords}` → '这个是网站关键字'(假设为“小说, 免费小说, 在线阅读”)
- `{strNovelChapterName}``{strNovelChapterSort}``{strSearchKeywords}` → 空
---
### **完整拼接示例**
#### **路由:`/xiaoshuo/douluodalu-123/mulu/order/1`**
- 假设:
- `{strNovelName}` = '斗罗大陆'
- `{intPage}` = '1'
- `{strNovelAuthor}` = '唐家三少'
- `{strNovelCategoryName}` = '玄幻'
- `{strNovelSex}` = '男生'
- `{strNovelStatus}` = '连载'
- `{strSiteKeywords}` = '小说, 免费小说, 在线阅读'
- **Title**
- `斗罗大陆章节目录 - 这个是网站名`
- **Keywords**
- `斗罗大陆, 斗罗大陆章节目录, 唐家三少, 玄幻小说, 男生小说, 小说, 免费小说, 在线阅读, 这个是网站名`
- **Description**
- `这个是网站名提供斗罗大陆章节目录免费查看第1页包含最新连载章节唐家三少创作畅享这个是站点域名`
#### **路由:`/xiaoshuo/douluodalu-123/mulu/order/2`**
- `{intPage}` = '2'
- **Title**
- `斗罗大陆章节目录 - 这个是网站名 - 第2页`
- **Keywords**
- `斗罗大陆, 斗罗大陆章节目录, 唐家三少, 玄幻小说, 男生小说, 小说, 免费小说, 在线阅读, 这个是网站名`
- **Description**
- `这个是网站名提供斗罗大陆章节目录免费查看第2页包含最新连载章节唐家三少创作畅享这个是站点域名`
---
### **实现代码(伪代码)**
```php
public function getChapterList($strPinYin, $intNId, $intPage) {
// 假设从数据库获取小说信息
$novel = Novel::find($intNId);
$replacements = [
'{strSiteName}' => '这个是网站名',
'{strSiteDomain}' => '这个是站点域名',
'{strSiteKeywords}' => '小说, 免费小说, 在线阅读', // 使用你配置的公用关键词
'{strSiteDescription}' => '这个是网站描述',
'{strNovelName}' => $novel->title ?? '',
'{intPage}' => $intPage,
'{strNovelAuthor}' => $novel->author ?? '',
'{strNovelCategoryName}' => $novel->category ?? '',
'{strNovelSex}' => $novel->sex === 'boys' ? '男生' : '女生',
'{strNovelStatus}' => $novel->status === 'ongoing' ? '连载' : '完结',
'{strNovelChapterName}' => '',
'{strNovelChapterSort}' => '',
'{strNovelDescription}' => $novel->description ?? '',
'{strSearchKeywords}' => ''
];
$pageStr = $intPage > 1 ? " - 第{intPage}页" : '';
$title = "{strNovelName}章节目录 - {strSiteName}{$pageStr}";
$keywords = "{strNovelName}, {strNovelName}章节目录, {strNovelAuthor}, {strNovelCategoryName}小说, {strNovelSex}小说, {strSiteKeywords}, {strSiteName}";
$description = "{strSiteName}提供{strNovelName}章节目录免费查看,第{intPage}页包含最新{strNovelStatus}章节,{strNovelAuthor}创作,畅享{strSiteDomain}";
foreach ($replacements as $key => $value) {
$title = str_replace($key, $value, $title);
$keywords = str_replace($key, $value, $keywords);
$description = str_replace($key, $value, $description);
}
return view('chapter_list', [
'title' => $title,
'keywords' => $keywords,
'description' => $description,
'novel' => $novel,
'page' => $intPage
]);
}
```
---
### **SEO 优化亮点**
1. **目录特性**`{strNovelName}章节目录` 匹配用户搜索(如“斗罗大陆 目录”)。
2. **公用关键词**`{strSiteKeywords}` 融入 Keywords提升网站整体相关性。
3. **分页友好**`{intPage}` 动态调整,首页面简洁,后续页面自然扩展。
4. **品牌强化**`{strSiteName}``{strSiteDomain}` 提升辨识度。
5. **吸引点击**:突出“免费查看”和“最新章节”,契合用户需求。
---
### **与分类案例的区别**
- **分类页**:聚焦筛选条件(如“男生玄幻连载小说”),多类别。
- **目录页**:聚焦单本小说的章节列表(如“斗罗大陆章节目录”),无具体章节内容。
这个 TKD 模板是小说章节目录页的最优 SEO 方案。如果你的 `{strSiteKeywords}` 配置有具体值(而不是“这个是网站关键字”),请告诉我,我再调整!觉得如何?

View File

@@ -0,0 +1,209 @@
最牛的seo 优化大师
这个是 替换标识
'{strSiteName}' => '这个是网站名',
'{strSiteDomain}' => '这个是站点域名',
'{strSiteKeywords}' => '这个是网站关键字',
'{strSiteDescription}' => '这个是网站描述',
'{strIndexTitle}' => '这个是首页Title',
'{strIndexKeywords}' => '这个是首页Keywords',
'{strIndexDescription}' => '这个是首页Description',
'{strNovelName}' => '这个是当前页面小说描述',
'{strNovelChapterName}' => '当前页面小说章节名字',
'{strNovelChapterSort}' => '当前页面小说章节排序号',
'{strNovelCategoryName}' => '当前页面小说分类名字',
'{strNovelSex}' => '当前页面小说是男生还是女生 小说',
'{strNovelStatus}' => '当前页面小说状态 是连载还是完结',
'{intPage}' => '当前页面分页页码',
'{strNovelAuthor}' => '小说作者',
'{strNovelDescription}' => '小说简介',
'{strSearchKeywords}' => '搜索关键词',
这个是小说章节页面的路由
/xiaoshuo/小说拼音-小说id/zhang-章节排序/章节分页
请根据路由和上面的替换标识你帮忙设计一个最友好seo的 tkd 替换模板
案列-分类的:
title '{strNovelSex}{strNovelCategoryName}{strNovelStatus}小说 - {strSiteName} - 第{intPage}页'
keywords: '{strNovelCategoryName}, {strNovelSex}小说, {strNovelStatus}小说, {strSiteName}, 免费阅读'
description: '{strSiteName}提供{strNovelSex}{strNovelCategoryName}{strNovelStatus}小说免费阅读,第{intPage}页汇聚热门作品,欢迎体验{strSiteDomain}'
好的,我会根据你提供的小说章节页面路由 `/xiaoshuo/小说拼音-小说id/zhang-章节排序/章节分页` 和替换标识,设计一个最优的 SEO 友好的 TKD 模板。小说章节页面与分类页面和详情页面不同,它聚焦于具体章节内容,因此需要突出小说名、章节名和排序,同时优化分页和搜索可见性。以下是我的设计:
---
### **分析**
#### **路由特点**
- **路由**`/xiaoshuo/{strPinYin}-{intNId}/zhang-{intChapterSort}/{intPage}`
- `{strPinYin}`:小说拼音(如 `douluodalu`)。
- `{intNId}`:小说 ID`123`)。
- `{intChapterSort}`:章节排序号(如 `5`,表示第 5 章)。
- `{intPage}`:章节分页(如长章节可能分多页显示)。
- **页面类型**:小说章节页面,展示具体章节内容,可能包含分页。
- **SEO 目标**
- 突出小说名和章节信息,吸引搜索具体章节的用户。
- 支持分页优化。
- 融入品牌词并提升阅读吸引力。
#### **替换标识使用**
- **核心字段**
- `{strNovelName}`:小说标题。
- `{strNovelChapterName}`:章节名字。
- `{strNovelChapterSort}`:章节排序号。
- `{intPage}`:章节分页页码。
- `{strNovelAuthor}`:小说作者。
- `{strNovelCategoryName}`:小说分类。
- `{strNovelSex}`:男生/女生小说。
- `{strNovelStatus}`:连载/完结。
- `{strSiteName}``{strSiteDomain}`:品牌词。
- **不适用字段**
- `{strSearchKeywords}`:搜索页专用。
- `{strSiteTitle}``{strSiteKeywords}``{strSiteDescription}`:更适合全局使用。
#### **SEO 优化原则**
- **Title**简洁60 字符内),包含小说名和章节信息。
- **Keywords**:覆盖小说名、章节、分类等高相关性词。
- **Description**:吸引点击,融入章节相关信息。
---
### **优化后的 TKD 模板**
以下是专为小说章节页面设计的 TKD 模板:
#### **1. Title**(控制在 60 字符以内)
- **模板**`{strNovelName} 第{strNovelChapterSort}章 {strNovelChapterName} - {strSiteName}`
- **优化点**
- `{strNovelName}``{strNovelChapterSort}` 突出具体章节,匹配用户搜索(如“斗罗大陆 第5章”
- `{strNovelChapterName}` 增加可读性。
- `{strSiteName}` 强化品牌。
-`{intPage}` > 1可附加“- 第{intPage}页”,但需控制长度。
- **示例**`/xiaoshuo/douluodalu-123/zhang-5/1`
- `斗罗大陆 第5章 魂兽森林 - 这个是网站名`
#### **2. Keywords**5-10 个核心词)
- **模板**`{strNovelName}, 第{strNovelChapterSort}章, {strNovelChapterName}, {strNovelAuthor}, {strSiteKeywords}, {strSiteName}`
- **优化点**
- `{strNovelName}``{strNovelChapterSort}` 是核心词。
- `{strNovelChapterName}``{strNovelAuthor}` 提升具体性。
- `{strNovelCategoryName}小说``{strNovelSex}小说` 增加分类相关性。
- “免费阅读”吸引流量。
- **示例**
- `斗罗大陆, 第5章, 魂兽森林, 唐家三少, 玄幻小说, 男生小说, 这个是网站名, 免费阅读`
#### **3. Description**150-160 字符)
- **模板**`{strSiteName}提供{strNovelName}第{strNovelChapterSort}章{strNovelChapterName}免费阅读,{strNovelAuthor}创作,畅享{strSiteDomain}`
- **优化点**
- 突出章节内容,吸引用户点击。
- 融入 `{strNovelAuthor}``{strNovelCategoryName}`,提升相关性。
- “畅享”更具吸引力。
- 若有分页,可附加“第{intPage}页”,但需控制长度。
- **示例**
- `这个是网站名提供斗罗大陆第5章魂兽森林免费阅读唐家三少创作的玄幻小说畅享这个是站点域名`
---
### **参数映射**
- `{strNovelName}`:从数据库根据 `{intNId}` 获取小说标题。
- `{strNovelChapterName}`:从数据库根据 `{intChapterSort}` 获取章节名。
- `{strNovelChapterSort}`:直接使用路由中的 `{intChapterSort}`
- `{intPage}`:直接使用路由中的 `{intPage}`
- `{strNovelAuthor}`:从数据库获取作者名。
- `{strNovelCategoryName}`:从数据库获取分类(如“玄幻”)。
- `{strNovelSex}`:从数据库获取性别(如“男生”)。
- `{strNovelStatus}`:从数据库获取状态(如“连载”)。
- `{strSiteName}` → '这个是网站名'
- `{strSiteDomain}` → '这个是站点域名'
- `{strNovelDescription}``{strSearchKeywords}` → 空(章节页不适用)
---
### **完整拼接示例**
#### **路由:`/xiaoshuo/douluodalu-123/zhang-5/1`**
- 假设:
- `{strNovelName}` = '斗罗大陆'
- `{strNovelChapterSort}` = '5'
- `{strNovelChapterName}` = '魂兽森林'
- `{intPage}` = '1'
- `{strNovelAuthor}` = '唐家三少'
- `{strNovelCategoryName}` = '玄幻'
- `{strNovelSex}` = '男生'
- `{strNovelStatus}` = '连载'
- **Title**
- `斗罗大陆 第5章 魂兽森林 - 这个是网站名`
- **Keywords**
- `斗罗大陆, 第5章, 魂兽森林, 唐家三少, 玄幻小说, 男生小说, 这个是网站名, 免费阅读`
- **Description**
- `这个是网站名提供斗罗大陆第5章魂兽森林免费阅读唐家三少创作的玄幻小说畅享这个是站点域名`
#### **路由:`/xiaoshuo/douluodalu-123/zhang-5/2`**
- `{intPage}` = '2'
- **Title**
- `斗罗大陆 第5章 魂兽森林 - 这个是网站名` (若需分页,可加“- 第2页”但需截断
- **Keywords**
- `斗罗大陆, 第5章, 魂兽森林, 唐家三少, 玄幻小说, 男生小说, 这个是网站名, 免费阅读`
- **Description**
- `这个是网站名提供斗罗大陆第5章魂兽森林免费阅读唐家三少创作的玄幻小说畅享这个是站点域名`
---
### **实现代码(伪代码)**
```php
public function getChapter($strPinYin, $intNId, $intChapterSort, $intPage) {
// 假设从数据库获取小说和章节信息
$novel = Novel::find($intNId);
$chapter = Chapter::where('novel_id', $intNId)->where('sort', $intChapterSort)->first();
$replacements = [
'{strSiteName}' => '这个是网站名',
'{strSiteDomain}' => '这个是站点域名',
'{strSiteTitle}' => '这个是网站标题',
'{strSiteKeywords}' => '这个是网站关键字',
'{strNovelName}' => $novel->title ?? '',
'{strNovelChapterName}' => $chapter->title ?? '',
'{strNovelChapterSort}' => $intChapterSort,
'{intPage}' => $intPage,
'{strNovelAuthor}' => $novel->author ?? '',
'{strNovelCategoryName}' => $novel->category ?? '',
'{strNovelSex}' => $novel->sex === 'boys' ? '男生' : '女生',
'{strNovelStatus}' => $novel->status === 'ongoing' ? '连载' : '完结',
'{strNovelDescription}' => '',
'{strSearchKeywords}' => ''
];
$title = "{strNovelName} 第{strNovelChapterSort}章 {strNovelChapterName} - {strSiteName}";
$keywords = "{strNovelName}, 第{strNovelChapterSort}章, {strNovelChapterName}, {strNovelAuthor}, {strNovelCategoryName}小说, {strNovelSex}小说, {strSiteName}, 免费阅读";
$description = "{strSiteName}提供{strNovelName}第{strNovelChapterSort}章{strNovelChapterName}免费阅读,{strNovelAuthor}创作的{strNovelCategoryName}小说,畅享{strSiteDomain}";
foreach ($replacements as $key => $value) {
$title = str_replace($key, $value, $title);
$keywords = str_replace($key, $value, $keywords);
$description = str_replace($key, $value, $description);
}
return view('chapter', [
'title' => $title,
'keywords' => $keywords,
'description' => $description,
'novel' => $novel,
'chapter' => $chapter
]);
}
```
---
### **SEO 优化亮点**
1. **章节精准**`{strNovelName} 第{strNovelChapterSort}章 {strNovelChapterName}` 匹配用户搜索具体章节的习惯。
2. **关键词丰富**:包含小说名、章节、作者、分类等多维度词。
3. **分页支持**`{intPage}` 可灵活扩展,若章节内容分多页,可在 Title 或 Description 中体现。
4. **品牌融入**`{strSiteName}``{strSiteDomain}` 提升网站辨识度。
5. **吸引点击**:突出“免费阅读”和“畅享”,契合用户需求。
---
### **与分类案例的区别**
- **分类页**:聚焦筛选条件(如“男生玄幻连载小说”),多分页。
- **章节页**:聚焦具体章节(如“斗罗大陆 第5章”单章节内容。
这个 TKD 模板是小说章节页的最优 SEO 方案。如果需要调整(比如更短的 Title 或分页处理),可以告诉我!

View File

@@ -0,0 +1,195 @@
最牛的seo 优化大师
这个是 替换标识
'{strSiteName}' => '这个是网站名',
'{strSiteDomain}' => '这个是站点域名',
'{strSiteKeywords}' => '这个是网站关键字',
'{strSiteDescription}' => '这个是网站描述',
'{strIndexTitle}' => '这个是首页Title',
'{strIndexKeywords}' => '这个是首页Keywords',
'{strIndexDescription}' => '这个是首页Description',
'{strNovelName}' => '这个是当前页面小说描述',
'{strNovelChapterName}' => '当前页面小说章节名字',
'{strNovelChapterSort}' => '当前页面小说章节排序号',
'{strNovelCategoryName}' => '当前页面小说分类名字',
'{strNovelSex}' => '当前页面小说是男生还是女生 小说',
'{strNovelStatus}' => '当前页面小说状态 是连载还是完结',
'{intPage}' => '当前页面分页页码',
'{strNovelAuthor}' => '小说作者',
'{strNovelDescription}' => '小说简介',
'{strSearchKeywords}' => '搜索关键词',
这个是小说详情页面的路由
/xiaoshuo/{strPinYin}-{intNId}
请根据路由和上面的替换标识你帮忙设计一个最友好seo的 tkd 替换模板
案列-分类的:
title '{strNovelSex}{strNovelCategoryName}{strNovelStatus}小说 - {strSiteName} - 第{intPage}页'
keywords: '{strNovelCategoryName}, {strNovelSex}小说, {strNovelStatus}小说, {strSiteName}, 免费阅读'
description: '{strSiteName}提供{strNovelSex}{strNovelCategoryName}{strNovelStatus}小说免费阅读,第{intPage}页汇聚热门作品,欢迎体验{strSiteDomain}'
好的,我会根据你提供的小说详情页面路由 `/xiaoshuo/{strPinYin}-{intNId}` 和替换标识,设计一个最优的 SEO 友好的 TKD 模板。小说详情页面与分类页面不同,它聚焦于具体的小说,因此需要突出小说的标题、作者、分类等信息,同时融入网站品牌和吸引点击的元素。以下是我的设计:
---
### **分析**
#### **路由特点**
- **路由**`/xiaoshuo/{strPinYin}-{intNId}`
- `{strPinYin}`:小说的拼音(如小说名的拼音,用于 URL 可读性)。
- `{intNId}`:小说 ID唯一标识符
- **页面类型**:小说详情页,通常展示小说标题、作者、简介、分类、状态等信息。
- **SEO 目标**
- 突出具体小说(如 `{strNovelName}`)。
- 融入分类、性别、状态等信息,提升相关性。
- 吸引用户点击阅读。
#### **替换标识使用**
- **核心字段**
- `{strNovelName}`:小说标题。
- `{strNovelAuthor}`:小说作者。
- `{strNovelCategoryName}`:小说分类。
- `{strNovelSex}`:男生/女生小说。
- `{strNovelStatus}`:连载/完结。
- `{strSiteName}``{strSiteDomain}`:品牌词。
- **不适用字段**
- `{intPage}`:详情页通常无分页,设为默认值 1 或留空。
- `{strNovelChapterName}``{strNovelChapterSort}`:更适合章节页面。
- `{strSearchKeywords}`:搜索页专用。
#### **SEO 优化原则**
- **Title**简洁60 字符内),包含小说名和品牌词。
- **Keywords**:覆盖小说名、分类、作者等高相关性词。
- **Description**:吸引点击,融入简介和免费阅读亮点。
---
### **优化后的 TKD 模板**
以下是专为小说详情页面设计的 TKD 模板:
#### **1. Title**(控制在 60 字符以内)
- **模板**`{strNovelName} - {strNovelAuthor} - {strSiteName} - 免费阅读`
- **说明**
- `{strNovelName}`:核心关键词,放在首位吸引搜索。
- `{strNovelAuthor}`:增加作者相关搜索的匹配度。
- `{strSiteName}`:品牌词。
- “免费阅读”:提升点击率。
- **示例**(假设小说名为“斗罗大陆”,作者为“唐家三少”):
- `斗罗大陆 - 唐家三少 - 这个是网站名 - 免费阅读`
#### **2. Keywords**5-10 个核心词)
- **模板**`{strNovelName}, {strNovelAuthor}, {strNovelCategoryName}小说, {strNovelSex}小说, {strNovelStatus}小说, {strSiteName}, 免费阅读`
- **说明**
- `{strNovelName}``{strNovelAuthor}`:具体小说的核心词。
- `{strNovelCategoryName}小说``{strNovelSex}小说``{strNovelStatus}小说`:分类相关词。
- `{strSiteName}`:品牌词。
- “免费阅读”:高频行业词。
- **示例**
- `斗罗大陆, 唐家三少, 玄幻小说, 男生小说, 连载小说, 这个是网站名, 免费阅读`
#### **3. Description**150-160 字符)
- **模板**`{strSiteName}提供{strNovelName}免费在线阅读,{strNovelAuthor}创作的{strNovelCategoryName}{strNovelStatus}小说,{strNovelDescription},欢迎体验{strSiteDomain}`
- **说明**
- `{strSiteName}``{strSiteDomain}`:品牌露出。
- `{strNovelName}``{strNovelAuthor}`:突出小说和作者。
- `{strNovelCategoryName}{strNovelStatus}小说`:分类和状态信息。
- `{strNovelDescription}`:简介吸引用户(需控制长度)。
- **示例**(假设简介为“少年逆天崛起”):
- `这个是网站名提供斗罗大陆免费在线阅读,唐家三少创作的玄幻连载小说,少年逆天崛起,欢迎体验这个是站点域名!`
---
### **参数映射**
- `{strNovelName}`:从数据库根据 `{intNId}` 获取小说标题。
- `{strNovelAuthor}`:从数据库获取作者名。
- `{strNovelCategoryName}`:从数据库获取分类(如“玄幻”)。
- `{strNovelSex}`:从数据库获取性别(如“男生”)。
- `{strNovelStatus}`:从数据库获取状态(如“连载”)。
- `{strNovelDescription}`:从数据库获取简介(需截断至合适长度)。
- `{strSiteName}` → '这个是网站名'
- `{strSiteDomain}` → '这个是站点域名'
- `{strSiteTitle}` → '这个是网站标题'
- `{strSiteKeywords}` → '这个是网站关键字'
- `{intPage}` → 1详情页无分页
- `{strNovelChapterName}``{strNovelChapterSort}``{strSearchKeywords}` → 空
---
### **完整拼接示例**
#### **路由:`/xiaoshuo/douluodalu-123`**
- 假设:
- `{strNovelName}` = '斗罗大陆'
- `{strNovelAuthor}` = '唐家三少'
- `{strNovelCategoryName}` = '玄幻'
- `{strNovelSex}` = '男生'
- `{strNovelStatus}` = '连载'
- `{strNovelDescription}` = '少年逆天崛起,成就无上斗罗'
- **Title**
- `斗罗大陆 - 唐家三少 - 这个是网站名 - 免费阅读`
- **Keywords**
- `斗罗大陆, 唐家三少, 玄幻小说, 男生小说, 连载小说, 这个是网站名, 免费阅读`
- **Description**
- `这个是网站名提供斗罗大陆免费在线阅读,唐家三少创作的玄幻连载小说,少年逆天崛起,成就无上斗罗,欢迎体验这个是站点域名!`
---
### **实现代码(伪代码)**
```php
public function getNovelDetail($strPinYin, $intNId) {
// 假设从数据库获取小说信息
$novel = Novel::find($intNId); // 示例,需替换为实际逻辑
$replacements = [
'{strSiteName}' => '这个是网站名',
'{strSiteDomain}' => '这个是站点域名',
'{strSiteTitle}' => '这个是网站标题',
'{strSiteKeywords}' => '这个是网站关键字',
'{strNovelName}' => $novel->title ?? '',
'{strNovelAuthor}' => $novel->author ?? '',
'{strNovelCategoryName}' => $novel->category ?? '',
'{strNovelSex}' => $novel->sex === 'boys' ? '男生' : '女生',
'{strNovelStatus}' => $novel->status === 'ongoing' ? '连载' : '完结',
'{strNovelDescription}' => substr($novel->description ?? '', 0, 50), // 截断简介
'{intPage}' => 1, // 详情页无分页
'{strNovelChapterName}' => '',
'{strNovelChapterSort}' => '',
'{strSearchKeywords}' => ''
];
$title = "{strNovelName} - {strNovelAuthor} - {strSiteName} - 免费阅读";
$keywords = "{strNovelName}, {strNovelAuthor}, {strNovelCategoryName}小说, {strNovelSex}小说, {strNovelStatus}小说, {strSiteName}, 免费阅读";
$description = "{strSiteName}提供{strNovelName}免费在线阅读,{strNovelAuthor}创作的{strNovelCategoryName}{strNovelStatus}小说,{strNovelDescription},欢迎体验{strSiteDomain}";
foreach ($replacements as $key => $value) {
$title = str_replace($key, $value, $title);
$keywords = str_replace($key, $value, $keywords);
$description = str_replace($key, $value, $description);
}
return view('novel_detail', [
'title' => $title,
'keywords' => $keywords,
'description' => $description,
'novel' => $novel
]);
}
```
---
### **SEO 优化亮点**
1. **小说名优先**`{strNovelName}` 放在 Title 和 Keywords 首位,匹配用户搜索习惯(如“斗罗大陆 小说”)。
2. **作者强化**`{strNovelAuthor}` 提升作者粉丝的搜索命中率。
3. **分类信息**`{strNovelCategoryName}``{strNovelStatus}` 增加长尾词覆盖(如“玄幻连载小说”)。
4. **简介吸引**`{strNovelDescription}` 简短展示小说亮点,激发阅读兴趣。
5. **品牌融入**`{strSiteName}``{strSiteDomain}` 提升网站辨识度。
---
### **与分类案例的区别**
- **分类页**(你的案例):聚焦类别(如“男生玄幻连载小说”),分页较多。
- **详情页**(此设计):聚焦具体小说(如“斗罗大陆”),无分页,突出标题和作者。
这个 TKD 模板是小说详情页的最优 SEO 方案。如果需要调整(比如更短的 Description 或更多关键词),可以告诉我!

View File

@@ -0,0 +1,100 @@
最牛的seo 优化大师
这个是 替换标识
'{strSiteName}' => '这个是网站名',
'{strSiteDomain}' => '这个是站点域名',
'{strSiteKeywords}' => '这个是网站关键字',
'{strSiteDescription}' => '这个是网站描述',
'{strIndexTitle}' => '这个是首页Title',
'{strIndexKeywords}' => '这个是首页Keywords',
'{strIndexDescription}' => '这个是首页Description',
'{strNovelName}' => '这个是当前页面小说描述',
'{strNovelChapterName}' => '当前页面小说章节名字',
'{strNovelChapterSort}' => '当前页面小说章节排序号',
'{strNovelCategoryName}' => '当前页面小说分类名字',
'{strNovelSex}' => '当前页面小说是男生还是女生 小说',
'{strNovelStatus}' => '当前页面小说状态 是连载还是完结',
'{intPage}' => '当前页面分页页码',
'{strNovelAuthor}' => '小说作者',
'{strNovelDescription}' => '小说简介',
'{strSearchKeywords}' => '搜索关键词',
这个是搜索页面的路由,公用一套视图模板
/search?keyword=jj&page=1
请根据路由和上面的替换标识你帮忙设计一个最友好seo的 tkd 替换模板
案列-分类的:
title '{strNovelSex}{strNovelCategoryName}{strNovelStatus}小说 - {strSiteName} - 第{intPage}页'
keywords: '{strNovelCategoryName}, {strNovelSex}小说, {strNovelStatus}小说, {strSiteName}, 免费阅读'
description: '{strSiteName}提供{strNovelSex}{strNovelCategoryName}{strNovelStatus}小说免费阅读,第{intPage}页汇聚热门作品,欢迎体验{strSiteDomain}'
根据你提供的搜索页面路由 `/search?keyword=jj&page=1` 和替换标识,我将为你设计一个针对搜索页面的 **SEO 友好** 的 TKDTitle、Keywords、Description替换模板。搜索页面的 TKD 需要兼顾搜索引擎的抓取规则和用户体验,突出搜索关键词、分页信息以及站点品牌,同时保持自然流畅的语言。
以下是设计思路和最终模板:
### 设计思路
1. **Title标题**
- 突出 `{strSearchKeywords}`(搜索关键词),这是搜索页面的核心。
- 加入 `{strSiteName}``{intPage}`,强化品牌和分页信息。
- 保持标题长度在 60 个字符以内(中文算 2 个字符),避免被搜索引擎截断。
- 使用分隔符(如 `-``|`)增强可读性。
2. **Keywords关键词**
- 包含 `{strSearchKeywords}` 作为主关键词。
- 搭配站点品牌 `{strSiteName}` 和通用修饰词(如“免费阅读”)。
- 避免堆砌,保持 5-7 个核心词组,简洁且相关。
3. **Description描述**
-`{strSearchKeywords}` 开头,吸引用户点击。
- 融入 `{strSiteName}``{strSiteDomain}``{intPage}`,提升品牌曝光。
- 控制在 150-160 个字符以内,确保完整显示在搜索结果中。
- 添加号召性语言(如“立即体验”),提升点击率。
### 搜索页面 TKD 替换模板
基于以上思路,结合你的路由和替换标识,我设计如下模板:
#### Title
```
'{strSearchKeywords} - {strSiteName}搜索 - 第{intPage}页'
```
- **示例**:输入 `keyword=jj&page=1` 时,生成:
`jj - 这个是网站名搜索 - 第1页`
- **解析**:标题简洁,直观展示搜索关键词,品牌名靠后,分页信息明确,适合搜索引擎和用户快速理解。
#### Keywords
```
'{strSearchKeywords}, {strSiteName}, 免费阅读, 在线搜索, 第{intPage}页'
```
- **示例**:输入 `keyword=jj&page=1` 时,生成:
`jj, 这个是网站名, 免费阅读, 在线搜索, 第1页`
- **解析**:关键词覆盖搜索词、站点名和通用阅读相关词,分页信息作为辅助,简洁不冗余。
#### Description
```
'{strSearchKeywords}搜索结果尽在{strSiteName},第{intPage}页提供免费阅读,访问{strSiteDomain}立即体验!'
```
- **示例**:输入 `keyword=jj&page=1` 时,生成:
`jj搜索结果尽在这个是网站名第1页提供免费阅读访问这个是站点域名立即体验`
- **字符数**:约 50 个中文字符100 字节),在搜索引擎显示范围内。
- **解析**:描述以搜索关键词开头,融入品牌和域名,结尾有行动号召,兼顾 SEO 和用户吸引。
### 优化后的特点
1. **动态适配**:模板根据 `{strSearchKeywords}``{intPage}` 动态生成,确保每个搜索页面 TKD 唯一,避免重复内容。
2. **SEO 友好**:标题和描述中关键词靠前,分页信息明确,符合搜索引擎对搜索结果页的偏好。
3. **用户体验**:语言自然,突出免费阅读和品牌,吸引用户点击。
4. **可扩展性**:如果未来需要调整(如加入小说分类或状态),模板可以轻松扩展。
### 与分类页面案例的对比
你的分类页面案例更偏向小说分类的结构化内容(包含 `{strNovelSex}``{strNovelCategoryName}` 等),而搜索页面需要更灵活地围绕 `{strSearchKeywords}` 构建。搜索页面的 TKD 应尽量简洁,避免过多无关变量,确保聚焦用户输入的关键词。
### 如果需要调整
如果你希望在搜索页面加入更多变量(如 `{strNovelStatus}``{strNovelCategoryName}`),可以告诉我具体需求,我再帮你调整。例如:
- 如果搜索结果只限于某分类,可以加入 `{strNovelCategoryName}`
```
Title: '{strSearchKeywords} - {strNovelCategoryName} - {strSiteName} - 第{intPage}页'
```
请告诉我你的想法或具体需求,我可以进一步优化!

View File

@@ -0,0 +1,192 @@
最牛的seo 优化大师
这个是 替换标识
'{strSiteName}' => '这个是网站名',
'{strSiteDomain}' => '这个是站点域名',
'{strSiteKeywords}' => '这个是网站关键字',
'{strSiteDescription}' => '这个是网站描述',
'{strIndexTitle}' => '这个是首页Title',
'{strIndexKeywords}' => '这个是首页Keywords',
'{strIndexDescription}' => '这个是首页Description',
'{strNovelName}' => '这个是当前页面小说描述',
'{strNovelChapterName}' => '当前页面小说章节名字',
'{strNovelChapterSort}' => '当前页面小说章节排序号',
'{strNovelCategoryName}' => '当前页面小说分类名字',
'{strNovelSex}' => '当前页面小说是男生还是女生 小说',
'{strNovelStatus}' => '当前页面小说状态 是连载还是完结',
'{intPage}' => '当前页面分页页码',
'{strNovelAuthor}' => '小说作者',
'{strNovelDescription}' => '小说简介',
'{strSearchKeywords}' => '搜索关键词',
这个是男生和女生的路由,公用一套视图模板
Route::get('/nansheng-xiaoshuo', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => true, 'strChannel' => 'boys']);
Route::get('/nvsheng-xiaoshuo', [Novel::class, 'getNovelChannel'])->append(['boolIsMobile' => true, 'strChannel' => 'girls']);
请根据路由和上面的替换标识你帮忙设计一个最友好seo的 tkd 替换模板
案列-分类的:
title '{strNovelSex}{strNovelCategoryName}{strNovelStatus}小说 - {strSiteName} - 第{intPage}页'
keywords: '{strNovelCategoryName}, {strNovelSex}小说, {strNovelStatus}小说, {strSiteName}, 免费阅读'
description: '{strSiteName}提供{strNovelSex}{strNovelCategoryName}{strNovelStatus}小说免费阅读,第{intPage}页汇聚热门作品,欢迎体验{strSiteDomain}'
好的,我会根据你提供的路由和替换标识,设计一个最优的 SEO 友好的 TKD 模板,适用于男生和女生频道的公用视图模板(`/nansheng-xiaoshuo``/nvsheng-xiaoshuo`)。这个设计将结合你的案例,同时优化关键词密度、品牌曝光和用户吸引力。
---
### **分析**
#### **路由特点**
- **路由**
- `/nansheng-xiaoshuo`:男生小说频道,`strChannel = 'boys'`
- `/nvsheng-xiaoshuo`:女生小说频道,`strChannel = 'girls'`
- **参数**
- `boolIsMobile = true`:适配移动端。
- 无具体分类 (`strCategory`) 和状态 (`strStatus`) 参数,因此这是一个频道首页,展示男生或女生小说的概览。
- `{intPage}` 在路由中未显式定义,但可能通过视图逻辑支持分页。
#### **替换标识**
- `{strNovelSex}`:从 `strChannel` 映射为“男生”或“女生”。
- `{strNovelCategoryName}``{strNovelStatus}`:频道首页无具体分类和状态,需调整为通用描述。
- `{strSiteName}``{strSiteDomain}` 等:用于品牌强化。
- `{strNovelName}``{strNovelChapterName}` 等:频道首页不适用,留空。
#### **SEO 目标**
- 突出频道特性(男生/女生小说)。
- 融入品牌词(网站名、域名)。
- 适配分页(如果有)。
- 吸引移动端用户(`boolIsMobile = true`)。
---
### **优化后的 TKD 模板**
以下是专为频道首页设计的 TKD 模板,基于你的案例并进一步优化:
#### **1. Title**(控制在 60 字符以内)
- **模板**`{strNovelSex}小说 - {strSiteName} - 免费阅读 - 第{intPage}页`
- **说明**
- `{strNovelSex}` 突出频道主题(男生/女生)。
- `{strSiteName}` 强化品牌。
- “免费阅读”吸引用户点击。
- `{intPage}` 仅在大于 1 时显示,避免首页面冗余。
#### **2. Keywords**5-10 个核心词)
- **模板**`{strNovelSex}小说, {strSiteKeywords}, 免费小说, 在线阅读, {strSiteName}`
- **说明**
- `{strNovelSex}小说` 是核心关键词。
- `{strSiteKeywords}` 复用网站通用关键词。
- 添加“免费小说”“在线阅读”提升搜索覆盖。
#### **3. Description**150-160 字符)
- **模板**`{strSiteName}提供{strNovelSex}小说免费在线阅读,第{intPage}页精选热门作品,畅享{strSiteDomain}{strNovelSex}小说迷必备!`
- **说明**
- `{strSiteName}``{strSiteDomain}` 提升品牌认知。
- “免费在线阅读”契合移动端用户习惯。
- “{strNovelSex}小说迷必备”增加用户粘性。
---
### **参数映射**
- `{strNovelSex}`
- `strChannel = 'boys'` → '男生'
- `strChannel = 'girls'` → '女生'
- `{strSiteName}` → '这个是网站名'
- `{strSiteDomain}` → '这个是站点域名'
- `{strSiteTitle}` → '这个是网站标题'
- `{strSiteKeywords}` → '这个是网站关键字'
- `{strSiteDescription}` → '这个是网站描述'
- `{intPage}` → 默认 1若有分页逻辑则动态传入
- `{strNovelCategoryName}` → 空(频道首页无具体分类)
- `{strNovelStatus}` → 空(频道首页无状态筛选)
- `{strNovelName}``{strNovelChapterName}``{strNovelChapterSort}``{strNovelAuthor}``{strNovelDescription}``{strSearchKeywords}` → 空(频道首页不适用)
---
### **完整拼接示例**
#### **1. 男生频道首页:`/nansheng-xiaoshuo`(假设 intPage = 1**
- **Title**: `男生小说 - 这个是网站名 - 免费阅读`
- **Keywords**: `男生小说, 这个是网站关键字, 免费小说, 在线阅读, 这个是网站名`
- **Description**: `这个是网站名提供男生小说免费在线阅读第1页精选热门作品畅享这个是站点域名男生小说迷必备`
#### **2. 女生频道首页:`/nvsheng-xiaoshuo`(假设 intPage = 1**
- **Title**: `女生小说 - 这个是网站名 - 免费阅读`
- **Keywords**: `女生小说, 这个是网站关键字, 免费小说, 在线阅读, 这个是网站名`
- **Description**: `这个是网站名提供女生小说免费在线阅读第1页精选热门作品畅享这个是站点域名女生小说迷必备`
#### **3. 男生频道分页:`/nansheng-xiaoshuo`(假设 intPage = 2**
- **Title**: `男生小说 - 这个是网站名 - 免费阅读 - 第2页`
- **Keywords**: `男生小说, 这个是网站关键字, 免费小说, 在线阅读, 这个是网站名`
- **Description**: `这个是网站名提供男生小说免费在线阅读第2页精选热门作品畅享这个是站点域名男生小说迷必备`
---
### **实现代码(伪代码)**
```php
public function getNovelChannel($strChannel) {
// 映射表
$sexMap = [
'boys' => '男生',
'girls' => '女生'
];
// 替换标识赋值
$replacements = [
'{strSiteName}' => '这个是网站名',
'{strSiteDomain}' => '这个是站点域名',
'{strSiteTitle}' => '这个是网站标题',
'{strSiteKeywords}' => '这个是网站关键字',
'{strSiteDescription}' => '这个是网站描述',
'{strNovelSex}' => $sexMap[$strChannel] ?? '',
'{strNovelCategoryName}' => '', // 频道首页无具体分类
'{strNovelStatus}' => '', // 频道首页无状态
'{intPage}' => request()->input('page', 1), // 默认第1页假设分页通过查询参数传入
'{strNovelName}' => '',
'{strNovelChapterName}' => '',
'{strNovelChapterSort}' => '',
'{strNovelAuthor}' => '',
'{strNovelDescription}' => '',
'{strSearchKeywords}' => ''
];
// 动态生成 TKD
$pageStr = $replacements['{intPage}'] > 1 ? " - 第{intPage}页" : '';
$title = "{strNovelSex}小说 - {strSiteName} - 免费阅读{$pageStr}";
$keywords = "{strNovelSex}小说, {strSiteKeywords}, 免费小说, 在线阅读, {strSiteName}";
$description = "{strSiteName}提供{strNovelSex}小说免费在线阅读,第{intPage}页精选热门作品,畅享{strSiteDomain}{strNovelSex}小说迷必备!";
// 替换模板中的标识
foreach ($replacements as $key => $value) {
$title = str_replace($key, $value, $title);
$keywords = str_replace($key, $value, $keywords);
$description = str_replace($key, $value, $description);
}
// 返回视图
return view('novel_channel', [
'title' => $title,
'keywords' => $keywords,
'description' => $description,
'channel' => $strChannel
]);
}
```
---
### **SEO 优化亮点**
1. **核心关键词靠前**`{strNovelSex}小说` 放在 Title 和 Description 开头,提升相关性。
2. **品牌强化**`{strSiteName}``{strSiteDomain}` 融入 TKD增加网站辨识度。
3. **移动端适配**:突出“免费在线阅读”,契合 `boolIsMobile = true` 的用户习惯。
4. **分页友好**:首页面简洁,后续页面自然融入 `{intPage}`,并可配合 `rel="next/prev"` 优化。
5. **通用性**:模板适用于男生和女生频道,公用一套视图。
---
### **扩展建议**
- 如果频道首页支持分页,建议通过查询参数(如 `?page=2`)传入 `{intPage}`,并在代码中动态获取。
- 如果需要加入热门分类(如玄幻、言情),可以在 Description 中扩展描述,例如“涵盖玄幻、武侠等热门类型”。
-`{strSiteKeywords}` 已包含“小说”相关词,可精简 Keywords避免重复。
这个 TKD 模板是目前最优的 SEO 方案,兼顾了搜索排名和用户体验。如果有其他需求(比如具体分类或搜索页面),可以告诉我,我再调整!

View File

@@ -18,27 +18,39 @@ class ConverterMovel
'{strSiteDomain}' => '',
'{strSiteKeywords}' => '',
'{strSiteDescription}' => '',
'{strIndexTitle}' => '',
'{strIndexKeywords}' => '',
'{strIndexDescription}' => '',
'{strNovelName}' => '',
'{strNovelChapterName}' => '',
'{strNovelChapterSort}' => '',
'{strNovelCategoryName}' => '',
'{strNovelSex}' => '',
'{strNovelStatus}' => '',
'{intPage}' => '',
'{strNovelAuthor}' => '',
'{strNovelDescription}' => '',
'{strSearchKeywords}' => '',
];
static public $arrDescription = [
'{strSiteTitle}' => '这个是网站标题',
'{strSiteName}' => '这个是网站',
'{strSiteDomain}' => '这个是站点域名',
'{strSiteKeywords}' => '这个是网站关键字',
'{strSiteDescription}' => '这个是网站描述',
'{strNovelName}' => '这个是当前页面小说标题',
'{strIndexTitle}' => '这个是首页Title',
'{strIndexKeywords}' => '这个是首页Keywords',
'{strIndexDescription}' => '这个是首页Description',
'{strNovelName}' => '这个是当前页面小说描述',
'{strNovelChapterName}' => '当前页面小说章节名字',
'{strNovelChapterSort}' => '当前页面小说章节排序号',
'{strNovelCategoryName}' => '当前页面小说分类名字',
'{strNovelSex}' => '当前页面小说是男生还是女生 小说',
'{strNovelStatus}' => '当前页面小说状态 是连载还是完结',
'{intPage}' => '当前页面分页页码',
'{strNovelAuthor}' => '小说作者',
'{strNovelDescription}' => '小说简介',
'{strSearchKeywords}' => '搜索关键词',
];
static private function getKey($strKey): string
@@ -86,6 +98,8 @@ class ConverterMovel
*/
static public function convert(string $strSubject): string
{
$strSubject = str_replace(array_keys(self::$arrMap), array_values(self::$arrMap), $strSubject);
return str_replace(array_keys(self::$arrMap), array_values(self::$arrMap), $strSubject);
}
}

View File

@@ -60,7 +60,7 @@ class DomainModel extends BaseModel
public function getFomartSubject($strKey) //, $intNum = 1, $boolRand = false)
{
// echo $strKey;
// //exit;
// exit;
// echo '<pre>';
// var_dump($this->t_cfg);
// exit;