使用 grok 检测优化h5 的 html
This commit is contained in:
@@ -665,6 +665,7 @@ class Novel extends BaseController
|
||||
$arrFilter = ['n_id' => $intNId, 'c_sort_num' => $intChapterSort, 'c_page' => $intChapterPage];
|
||||
|
||||
$arrChapter = $ChapterModel->findOne($arrFilter);
|
||||
$strChapterDescription = '';
|
||||
|
||||
// 上一章节和下一章节
|
||||
$arrPreChapter = $arrNextChapter = [];
|
||||
@@ -672,10 +673,17 @@ class Novel extends BaseController
|
||||
if ($arrChapter) {
|
||||
$arrPreChapter = $ChapterModel->getPreChapter($arrChapter['n_id'], $arrChapter['c_sort_num'], $arrChapter['c_page']);
|
||||
$arrNextChapter = $ChapterModel->getNextChapter($arrChapter['n_id'], $arrChapter['c_sort_num'], $arrChapter['c_page']);
|
||||
|
||||
// 要点-先从章节随机截取,后面如果用上ai,看看使用ai 提炼 精简内容
|
||||
$strChapterDescription = strip_tags($arrChapter['content']);
|
||||
$intCount = mb_strlen($strChapterDescription);
|
||||
$strChapterDescription = ($intCount > 50) ? mb_substr($strChapterDescription, 0, 50) : $strChapterDescription;
|
||||
}
|
||||
|
||||
$arrCategoryAll = CategoryModel::$arrCategoryAll;
|
||||
|
||||
|
||||
|
||||
// 更新值
|
||||
ConverterMovel::setVal([
|
||||
'intPage' => 1,
|
||||
@@ -684,6 +692,7 @@ class Novel extends BaseController
|
||||
'strNovelCategoryName' => $arrNovel['og_novel_category'],
|
||||
'strNovelStatus' => $arrNovel['og_novel_status'],
|
||||
'strNovelDescription' => $arrNovel['og_description'],
|
||||
'strChapterDescription' => $strChapterDescription,
|
||||
'strNovelChapterName' => $arrChapter['name'],
|
||||
'strNovelChapterSort' => $arrChapter['c_sort_num'],
|
||||
]);
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<!-- <script src="/public/jquery/jquery-3.7.1.min.js"></script> -->
|
||||
|
||||
<!-- 社交媒体标签 -->
|
||||
<meta property="og:title" content="{$arrNovel['og_novel_book_name']??'未知小说'}" />
|
||||
<meta property="og:title" content="{$arrNovel['og_novel_book_name']??'未知小说'} {$arrChapter.name} - {$DomainModel->d_name}" />
|
||||
<meta property="og:description" content="{$strDescription??'暂无简介'}" />
|
||||
<meta property="og:url"
|
||||
content='https://{$DomainModel->d_domain}{site:nurl n_id="$arrNovel[n_id]" n_py="$arrNovel[og_novel_pin_yin]" /}' />
|
||||
@@ -38,42 +38,38 @@
|
||||
content="https://{$DomainModel->d_domain}/pc/xiaoshuo/{$arrNovel.og_novel_pin_yin}-{$arrChapter.n_id}/zhang-{$arrChapter.c_sort_num}">
|
||||
<!-- 可选:支持 Twitter Card -->
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:title" content="{$arrNovel['og_novel_book_name'] ?? '未知小说'}" />
|
||||
<meta name="twitter:title" content="{$arrNovel['og_novel_book_name']??'未知小说'} {$arrChapter.name} - {$DomainModel->d_name}" />
|
||||
<meta name="twitter:description" content="{$strDescription ?? '暂无简介'}" />
|
||||
<meta name="twitter:image" content="{$arrNovel.n_cover_path ?? ''}" />
|
||||
<!-- 结构化数据 -->
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://{$DomainModel->d_domain}",
|
||||
"@type": "book",
|
||||
"headline": "{$strTitle??''}",
|
||||
"description": "{$strDescription??''}",
|
||||
"datePublished": "{$arrNovel.og_novel_update_time ?? ''}",
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "{$arrNovel['og_novel_author'] ??'佚名'}"
|
||||
},
|
||||
"publisher": {
|
||||
"@type": "Organization",
|
||||
"name": "{$DomainModel->d_name}",
|
||||
"url": "https://{$DomainModel->d_domain}"
|
||||
},
|
||||
"image": "{$Novel.n_cover_path ?? ''}",
|
||||
"mainEntityOfPage": {
|
||||
"@type": "WebPage",
|
||||
"@id": "https://{$DomainModel->d_domain}/pc/xiaoshuo/{$arrNovel.og_novel_pin_yin}-{$arrNovel.n_id}/zhang-{$arrChapter.c_sort_num ?? 1}"
|
||||
}
|
||||
"isPartOf": {
|
||||
"@context": "https://schema.org",
|
||||
"@type": "Book",
|
||||
"name": "《{$arrNovel['og_novel_book_name'] ?? '未知小说'}》",
|
||||
"url": '{site:nurl n_id="$arrNovel[n_id]" n_py="$arrNovel[og_novel_pin_yin]" /}'
|
||||
}
|
||||
"name": "{$arrNovel['og_novel_book_name'] ?? '未知小说'}",
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "{$arrNovel['og_novel_author'] ??'佚名'}"
|
||||
},
|
||||
"publisher": {
|
||||
"@type": "Organization",
|
||||
"name": "{$DomainModel->d_name}",
|
||||
"url": "https://{$DomainModel->d_domain}"
|
||||
},
|
||||
"image": "{$arrNovel.n_cover_path ?? ''}",
|
||||
"url": "https://{$DomainModel->d_domain}/pc/xiaoshuo/{$arrNovel.og_novel_pin_yin}-{$arrNovel.n_id}/zhang-{$arrChapter.c_sort_num ?? 1}",
|
||||
"inLanguage": "zh-CN",
|
||||
"genre": "{$arrNovel.og_novel_category ??''}",
|
||||
"datePublished": "{$arrNovel['og_novel_update_time'] ?? time()}",
|
||||
"hasPart": {
|
||||
"@type": "CreativeWork",
|
||||
"name": "{$arrChapter.name ?? ''}",
|
||||
"url": "https://{$DomainModel->d_domain}/pc/xiaoshuo/{$arrNovel.og_novel_pin_yin}-{$arrNovel.n_id}/zhang-{$arrChapter.c_sort_num ?? 1}",
|
||||
"description": "{$strDescription}"
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body class="skin-default">
|
||||
@@ -116,7 +112,6 @@
|
||||
</div>
|
||||
<article id="chapterContent" class="read-article" style="font-size: 1.125rem">
|
||||
<section class="read-section jsChapterWrapper" data-chapter-id="4b2d5aab58d71">
|
||||
<!-- <h3>01 天龙问世</h3> -->
|
||||
{$arrChapter.content|raw}
|
||||
|
||||
</section>
|
||||
@@ -142,12 +137,14 @@
|
||||
|
||||
</content>
|
||||
<div class="page-read-top">
|
||||
<h2 id="chapterTitle" class="read-book-name">
|
||||
<a href='{site:nurl n_id="$arrNovel[n_id]" n_py="$arrNovel[og_novel_pin_yin]" /}'>
|
||||
{$arrNovel.og_novel_book_name}
|
||||
|
||||
<h1 id="chapterTitle" class="read-book-name">
|
||||
<a href='{site:nurl n_id="$arrNovel[n_id]" n_py="$arrNovel[og_novel_pin_yin]" /}'>
|
||||
{$arrNovel.og_novel_book_name}
|
||||
</a>
|
||||
</h2>
|
||||
<h1 id="chapterTitle" class="read-book-name">{$arrChapter.name}</h1>
|
||||
<a href="/xiaoshuo/{$arrNovel.og_novel_pin_yin}-{$arrNovel.n_id}/zhang-{$arrChapter.c_sort_num}">{$arrChapter.name}</a>
|
||||
|
||||
</h1>
|
||||
</div>
|
||||
<mark id="readPageMark" class="read-page-mark">你刚刚阅读到这里</mark>
|
||||
<p id="pageNum" class="read-page-num">1/1</p>
|
||||
|
||||
@@ -4,18 +4,18 @@
|
||||
{block name="description"}{$strDescription??''}{/block}
|
||||
{block name="head"}
|
||||
<!-- 社交媒体标签 -->
|
||||
<meta property="og:title" content="{$arrNovel['og_novel_book_name']??'未知小说'}" />
|
||||
<meta property="og:title" content="{$arrNovel['og_novel_book_name']??'未知小说'}章节目录 - {$DomainModel->d_name} 第{$intPage}页 " />
|
||||
<meta property="og:description" content="{$strDescription??'暂无简介'}" />
|
||||
<meta property="og:url"
|
||||
content='https://{$DomainModel->d_domain}{site:nurl n_id="$arrNovel[n_id]" n_py="$arrNovel[og_novel_pin_yin]" /}' />
|
||||
<meta property="og:type" content="book" />
|
||||
content='https://{$DomainModel->d_domain}/pc/xiaoshuo/{$arrNovel.og_novel_pin_yin}-{$arrNovel.n_id}/zhang-{$arrLatestChapter.c_sort_num ?? 1}' />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:image" content="{$arrNovel.n_cover_path ?? ''}" />
|
||||
<meta property="og:site_name" content="{$DomainModel->d_name}" />
|
||||
<meta property="og:novel:category" content="{$arrNovel.og_novel_category ?? ''}">
|
||||
<meta property="og:novel:author" content="{$arrNovel.og_novel_author ?? ''}">
|
||||
<meta property="og:novel:book_name" content="{$arrNovel.og_novel_book_name ?? ''}">
|
||||
<meta property="og:novel:read_url"
|
||||
content="https://{$DomainModel->d_domain}/pc/xiaoshuo/{$arrNovel.og_novel_pin_yin}-{$arrNovel.n_id}/zhang-1">
|
||||
content="https://{$DomainModel->d_domain}/pc/xiaoshuo/{$arrNovel.og_novel_pin_yin}-{$arrNovel.n_id}/zhang-{$intPage}">
|
||||
<meta property="og:novel:status" content="{$arrNovel.og_novel_status ?? ''}">
|
||||
<meta property="og:novel:update_time" content="{$arrNovel.og_novel_update_time ?? ''}">
|
||||
<meta property="og:novel:latest_chapter_name" content="{$arrLatestChapter.name ?? ''}">
|
||||
@@ -26,13 +26,14 @@
|
||||
<meta name="twitter:title" content="{$arrNovel['og_novel_book_name'] ?? '未知小说'}" />
|
||||
<meta name="twitter:description" content="{$strDescription ?? '暂无简介'}" />
|
||||
<meta name="twitter:image" content="{$arrNovel.n_cover_path ?? ''}" />
|
||||
|
||||
<!-- 结构化数据 -->
|
||||
<script type="application/ld+json">
|
||||
|
||||
{
|
||||
"@context": 'https://{$DomainModel->d_domain}/{site:nurl n_id="$arrNovel[n_id]" n_py="$arrNovel[og_novel_pin_yin]" /}',
|
||||
"@context": "https://schema.org",
|
||||
"@type": "Book",
|
||||
"name": "{$arrNovel['og_novel_book_name'] ?? '未知小说'}",
|
||||
"description": "{$arrNovel['og_description'] ??'暂无简介'}",
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "{$arrNovel['og_novel_author'] ??'佚名'}"
|
||||
@@ -42,17 +43,14 @@
|
||||
"name": "{$DomainModel->d_name}",
|
||||
"url": "https://{$DomainModel->d_domain}"
|
||||
},
|
||||
"datePublished": "{$arrNovel['og_novel_update_time'] ?? time()}",
|
||||
"image": "{$Novel.n_cover_path ?? ''}",
|
||||
"url": '{site:nurl n_id="$arrNovel[n_id]" n_py="$arrNovel[og_novel_pin_yin]" /}',
|
||||
"genre": "{$arrNovel.og_novel_category ??''}",
|
||||
"url": "https://{$DomainModel->d_domain}/xiaoshuo/$arrNovel[og_novel_pin_yin]/mulu/zheng/{$intPage}",
|
||||
"inLanguage": "zh-CN",
|
||||
"bookFormat": "https://{$DomainModel->d_domain}/EBook",
|
||||
"aggregateRating": {
|
||||
"@type": "AggregateRating",
|
||||
"ratingValue": "4.5",
|
||||
"reviewCount": "100",
|
||||
},
|
||||
"genre": "{$arrNovel['og_novel_category'] ?? '未知分类'}",
|
||||
"hasPart": {
|
||||
"@type": "WebPage",
|
||||
"name": "{$arrNovel['og_novel_book_name'] ?? '未知小说'}章节目录 第{$intPage}页",
|
||||
"url": "https://{$DomainModel->d_domain}/xiaoshuo/$arrNovel[og_novel_pin_yin]/mulu/zheng/{$intPage}"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{block name="head-js"}{/block}
|
||||
@@ -74,7 +72,7 @@
|
||||
<meta itemprop="position" content="1" />
|
||||
</li>
|
||||
<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
||||
<a href="/shuku/all/{arrNovel.category_pinyin}/all/page1" itemprop="item">
|
||||
<a href="/shuku/all/{$arrNovel.category_pinyin}/all/page1" itemprop="item">
|
||||
<span itemprop="name">{$arrNovel.og_novel_category}</span>
|
||||
</a>
|
||||
<meta itemprop="position" content="2" />
|
||||
@@ -92,7 +90,7 @@
|
||||
<div class="mod mod-attentions">
|
||||
{$arrGRM[0]|raw}
|
||||
<div class="mod-head">
|
||||
<h1>{$arrNovel['og_novel_book_name']}-章节目录第{$intPage}页</h1>
|
||||
<h1>{$arrNovel['og_novel_book_name']}章节目录 - {$arrNovel['og_novel_author']} - {$DomainModel->d_name} 第{$intPage}页</h1>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -105,7 +103,7 @@
|
||||
<li>
|
||||
{$arrGRM[$key]|raw}
|
||||
<a href="/xiaoshuo/{$arrNovel.og_novel_pin_yin}-{$arrNovel.n_id}/zhang-{$Chapter.c_sort_num}"
|
||||
title="{$Chapter.name}">{$Chapter.name}</a>
|
||||
title="{$arrNovel['og_novel_book_name']} {$Chapter.name}">{$Chapter.name}</a>
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
<!-- 结构化数据 -->
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": 'https://{$DomainModel->d_domain}/{site:nurl n_id="$arrNovel[n_id]" n_py="$arrNovel[og_novel_pin_yin]" /}',
|
||||
"@type": "book",
|
||||
"@context": "https://schema.org",
|
||||
"@type": "Book",
|
||||
"name": "{$arrNovel['og_novel_book_name'] ?? '未知小说'}",
|
||||
"description": "{$arrNovel['og_description'] ??'暂无简介'}",
|
||||
"author": {
|
||||
@@ -43,8 +43,8 @@
|
||||
"url": "https://{$DomainModel->d_domain}"
|
||||
},
|
||||
"datePublished": "{$arrNovel['og_novel_update_time'] ?? time()}",
|
||||
"image": "{$Novel.n_cover_path ?? ''}",
|
||||
"url": '{site:nurl n_id="$arrNovel[n_id]" n_py="$arrNovel[og_novel_pin_yin]" /}',
|
||||
"image": "{$arrNovel.n_cover_path ?? ''}",
|
||||
"url": 'https://{$DomainModel->d_domain}{site:nurl n_id="$arrNovel[n_id]" n_py="$arrNovel[og_novel_pin_yin]" /}',
|
||||
"genre": "{$arrNovel.og_novel_category ??''}",
|
||||
"inLanguage": "zh-CN",
|
||||
"bookFormat": "https://{$DomainModel->d_domain}/EBook",
|
||||
@@ -53,6 +53,7 @@
|
||||
"ratingValue": "4.5",
|
||||
"reviewCount": "100",
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
@@ -60,12 +61,14 @@
|
||||
|
||||
{block name="logo-html"}
|
||||
<h2 class="logo">
|
||||
<a href="/">{$DomainModel->d_name}-{$arrNovel['og_novel_book_name']}最新章节</a>
|
||||
<a href="/">{$DomainModel->d_name}-{$DomainModel->d_text_logo}</a>
|
||||
</h2>
|
||||
{/block}
|
||||
|
||||
{block name="main"}
|
||||
<div class="wrap">
|
||||
|
||||
|
||||
<nav class="breadcrumb" aria-label="breadcrumb">
|
||||
<ol itemscope itemtype="https://schema.org/BreadcrumbList">
|
||||
<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
||||
@@ -87,6 +90,7 @@
|
||||
<meta itemprop="position" content="3" />
|
||||
</li>
|
||||
</ol>
|
||||
<h1 class="site-description ">{$arrNovel['og_novel_book_name']}最新章节 - {$arrNovel['og_novel_author']} - {$DomainModel->d_name}</h1>
|
||||
</nav>
|
||||
|
||||
<!--info-->
|
||||
@@ -95,13 +99,13 @@
|
||||
<div class="book-info">
|
||||
<dl class="base clearfix">
|
||||
<dt>
|
||||
<img src="/static/img/default.jpg" data-src="{$Novel.n_cover_path ?? ''}"
|
||||
alt="{$Novel->og_novel_book_name ?? ''}封面" class="lazy lazyload-img" />
|
||||
<img src="/static/img/default.jpg" data-src="{$arrNovel.n_cover_path ?? ''}"
|
||||
alt="{$arrNovel['og_novel_book_name'] ?? ''}小说封面 - {$arrNovel.og_novel_author}最新章节" class="lazy lazyload-img" />
|
||||
|
||||
<i class='{eq name="arrNovel.og_novel_status" value="连载中"}serial{else}finish {/eq}'>已完结</i>
|
||||
</dt>
|
||||
<dd>
|
||||
<h1>{$arrNovel['og_novel_book_name']}</h1>
|
||||
<h2>{$arrNovel['og_novel_book_name']}</h2>
|
||||
<p class="info">
|
||||
<span>分类:{$arrNovel.og_novel_category}</span>
|
||||
<span>作者:<a href="/search.html?keyword=兔子很淡定">{$arrNovel.og_novel_author}</a></span>
|
||||
@@ -163,7 +167,7 @@
|
||||
<!-- hot-book -->
|
||||
<div class="mod mod-attentions">
|
||||
<div class="mod-head">
|
||||
<h3>目录</h3>
|
||||
<h3>{$arrNovel.og_novel_book_name}最新章节</h3>
|
||||
</div>
|
||||
<div class="attentions">
|
||||
<ul class="clearfix">
|
||||
@@ -178,7 +182,7 @@
|
||||
</ul>
|
||||
<div class="chapters-more">
|
||||
<a href="/xiaoshuo/{$arrNovel.og_novel_pin_yin}-{$arrNovel.n_id}/mulu/zheng"
|
||||
class="reading btn-bookshelf">更多章节</a>
|
||||
class="reading btn-bookshelf">{$arrNovel.og_novel_book_name}更多章节</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -50,7 +50,7 @@ pc-首页
|
||||
3.地图生成
|
||||
4.收录推送
|
||||
5.友情链接
|
||||
6.热搜词 收索下面展示,全站通用,每个站点随机展示10条
|
||||
6.热搜词 顶部收索框下面展示,全站通用,每个站点随机展示10条
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user