Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3efc135f00 | ||
|
|
888358a6b6 | ||
|
|
08ee2275fb | ||
|
|
add9ed489e | ||
|
|
bd8b58a6cf | ||
|
|
121acb0344 | ||
|
|
7d564df7e9 | ||
|
|
a7adfac041 | ||
|
|
cb8cd8467a | ||
|
|
8afe09fc04 | ||
|
|
de6b931823 | ||
|
|
2480865532 | ||
|
|
bc48be39e6 | ||
|
|
fa2bc2dafe | ||
|
|
7c11ca77bc | ||
|
|
a820755e7e | ||
|
|
6c94ecbd0b | ||
|
|
77f9b09c58 | ||
|
|
b0d61806dc | ||
|
|
252e0c38cb | ||
|
|
ace6d74a18 | ||
|
|
5748124383 |
No files matched your search
@@ -1,13 +1,48 @@
|
||||
# FNA_V3维护入口
|
||||
# FNA_V3 项目维护入口
|
||||
|
||||
项目工作先读 GemDocs AI版项目总览、维护协议及 `/Users/hellcat/Documents/GemDocs/AI版/10-项目/fna_v3.md`。线上事务优先经白色机 SSH;网页与订阅 HTTP 访问须符合 GemDocs 的反代规则。
|
||||
|
||||
订阅检测已独立为 SubCheck,入口见 [SubCheck](/Users/hellcat/Documents/GemCodes/subcheck/AGENTS.md);cfn来源适配与调查见 [CFN.md](/Users/hellcat/Documents/GemCodes/subcheck/docs/CFN.md)。fnb不再保存检测实现。代码、凭据、业务数据及并行修改按当前任务授权处理。
|
||||
|
||||
## FNA_V3 本地副本维护
|
||||
|
||||
CFN页头SVG猫和两行品牌文字的维护与回退见[品牌标志](docs/maintenance/BRANDING.md),已于2026-10-31发布,见[界面发布记录](docs/maintenance/UI_RELEASE_2026-10-31.md)。
|
||||
|
||||
本目录为独立 FNA_V3 副本,身份与环境以 GemDocs AI版 `10-项目/fna_v3.md` 为准;上述 FN_B 入口保留来源背景,不代表授权修改 FN_B。文章广告实现、配置与验收见 [广告维护说明](docs/maintenance/ADVERTISING.md)。统一机场推荐数据、正文替换和教程末尾展示见[机场推荐维护](docs/maintenance/AIRPORT_RECOMMENDATIONS.md),已于2026-10-31发布,见[界面发布记录](docs/maintenance/UI_RELEASE_2026-10-31.md)。免费节点详情页的只读结构化渲染、订阅保护与回退见[内容页重设计](docs/maintenance/FREENODE_ARTICLE_LAYOUT.md)。
|
||||
|
||||
SEO 的只读审计、优化顺序与逐项验收统一维护在 [SEO 优化建议与执行清单](docs/maintenance/SEO_PLAN.md),2026-10-22 建立。清单中的建议不代表已实施,后续按用户指定项目推进并更新本文件所链接的唯一正文。
|
||||
|
||||
## CFN系绘图接手
|
||||
|
||||
2026-10-23用户明确将此前由张天承担的绘图工作交给“画师【CFN系】”(personnel-position:cd029d9db8454ec68172b221ff35e6f6)。FNA_V3主程继续开发工作,后续绘图由该画师岗位承接,避免重复制作。本记录仅转交绘图范围,不改变开发或上线权限;未向原聊天发送消息。
|
||||
|
||||
风格已从原聊天最近作品及本地成图核实:现代主义剪纸拼贴、哑光色块、轻微丝网印刷颗粒、成熟动物比例、非对称构图和大块留白。参考文件在本项目output/imagegen/:freenode-dog-dalmatian-20261023.png、freenode-dog-dachshund-20261023.png、freenode-dogs-dance-20261023.png;同名txt保存完整提示词。延续视觉语言,每张更换主题或构图,不照搬布局。
|
||||
|
||||
接手首张试画及提示词:/Users/hellcat/Documents/Codex/2026-10-23/cfn/outputs/cfn-tuxedo-cat-20261023.png 和同名txt。用户已认可风格并继续扩充;2026-10-26按授权与后续猫狗作品一起归档到Resource V2,并接入本地FNA_V3,未发布到线上。归档和栏目配图的唯一维护入口见[本地插画资源与配图](docs/maintenance/ILLUSTRATIONS.md)。
|
||||
|
||||
教程栏目现为“入门教程”(/client)和“综合教程”(/advanced,原进阶教程)。栏目改名、首篇重写、DNS进阶文章及内容回退见[教程栏目维护](docs/maintenance/TUTORIALS.md)。原七篇旧教程均已处理:迁移文归进阶,其余按Android、iOS、Mac和Linux重写;另有Windows纯入门与DNS进阶文章。正文、图解和关联已本地验收,本地内容不代表线上发布。
|
||||
|
||||
## FNA 静态配图副本
|
||||
|
||||
2026-10-30起Resource保留原稿、图池和固定分配,FNA保存按内容去重的公开展示副本,由本站Nginx直接提供。同步、创建时校验、撤回、缓存与部署验收唯一正文见[静态配图副本](docs/maintenance/LOCAL_ILLUSTRATIONS.md)。用户访问图片不调用Resource、不执行PHP修复。
|
||||
2026-10-30起Resource保留原稿、图池和固定分配,FNA保存按内容去重的公开展示副本,由本站Nginx直接提供。同步、创建时校验、撤回、缓存与部署验收唯一正文见[静态配图副本](docs/maintenance/LOCAL_ILLUSTRATIONS.md)。用户访问图片不调用Resource、不执行PHP修复。2026-10-31明确源端删除/停用不影响FNA独立副本或已有文章关联,修复与恢复原图记录见[独立副本保留修复](docs/maintenance/INDEPENDENT_ILLUSTRATIONS_FIX_2026-10-31.md)。
|
||||
|
||||
## AI 文章写作(必读)
|
||||
|
||||
文章写作和发布先读docs/content/WRITING.md及docs/maintenance/EDITORIAL_API.md。项目身份和访问边界先读GemDocs AI版项目总览、维护协议及10-项目/fna_v3.md。
|
||||
后续为 FNA_V3 选题、写作、重写、调整分类或撤下文章时,必须先读[AI写作与文章关联索引](docs/content/WRITING.md)。它是文章用途、稳定地址和正文关系的唯一登记入口。公开文章禁止出现“核对范围”“未实测”等内部核验/验收说明,具体禁止项与发布前检查按该写作规范执行;相关事实只留项目维护记录。写作时复用相关的下载、入门、进阶和排错内容,自然设置内链,并检查相关旧文是否需要补入口;完成后同步正文源、运行数据库和该索引,验收真实目标与锚点。未创建的文章不能编造链接,本地生效不能写成已上线;不自动开展全站重写或发布。
|
||||
|
||||
## 独立文章发布 API
|
||||
|
||||
用户已明确文章直接发布到 FNA_V3,不经过 ATOM。实现、调用契约、凭据边界及验收见[独立文章 API](docs/maintenance/EDITORIAL_API.md)。后续写稿使用本站草稿→签名预览→按hash发布→回执核对流程;相关旧文内链修改可同批提交。不要再用临时SQL脚本发布普通编辑文章。旧文首次接管必须显式指定原文章ID并保留URL;发布结果未知先查原请求UUID。代码已于2026-10-29随正式切换部署,生产临时编辑密钥在教程迁移后删除、接口默认关闭;后续按明确写作/发布任务临时启用并在完成后关闭,不扩大线上访问或发布范围。正式部署、备份、Git SHA及验收统一见[发布记录](docs/maintenance/RELEASE_PREFLIGHT_2026-10-28.md#正式切换2026-10-29)。
|
||||
|
||||
插画完成后按[自动交付](docs/maintenance/ILLUSTRATION_DELIVERY.md)提交批准批次;不要再手工上传发布/编辑图池或把保存草稿当作上线完成。
|
||||
|
||||
周期文章按[固定发布封装](docs/maintenance/EDITORIAL_RELEASE.md)执行:本机SSH必须经白色机到正式业务服务器,使用服务器进程内API,不临时开放公网接口。每周三篇、每天15:00检查、错过窗口回补及文章随机展示时间见[周期写作](docs/maintenance/WEEKLY_TUTORIALS.md);这一流程替代周期写作中的手动开关API步骤,不扩大其他实例或全站改版权限。
|
||||
|
||||
教程SEO、编辑API的IndexNow结果与重试、栏目sitemap的唯一维护说明见[教程SEO通知](docs/maintenance/EDITORIAL_INDEXNOW.md)。`sitemap: done`不代表搜索引擎已收到通知或已收录。
|
||||
|
||||
## SEO统一合同(2026-10-31)
|
||||
|
||||
首页、归档、教程、分页、索引、sitemap、内容更新时间和IndexNow统一按[SEO实施维护](docs/maintenance/SEO_IMPLEMENTATION_2026-10-31.md)。禁止恢复全query robots屏蔽、分页canonical第一页、按180天批量删正文、用点赞updated_at作为lastmod,或让源图删除影响本站独立副本。当前状态和未取得的搜索平台证据见该文档;实施不等于收录/排名已验证。
|
||||
|
||||
|
||||
2026-10-31用户纠正:SEO只做内部优化,用户看到的布局、样式、可见标题/说明、图片呈现、导航和广告位置必须保持原界面;不因SEO增加说明块、分页条或改版。后续可见改动须用户另行明确要求。恢复基线与验证见[界面保留修复](docs/maintenance/SEO_UI_RESTORE_2026-10-31.md)。
|
||||
@@ -25,20 +25,9 @@ public function handle(): void
|
||||
|
||||
private function article()
|
||||
{
|
||||
$aCateId = Categories::whereIn("sSlug", ["freenode", "shadowrocketids"])->pluck("id")->toArray();
|
||||
|
||||
if (empty($aCateId)) {
|
||||
$this->info("没有匹配的分类,跳过清理");
|
||||
return;
|
||||
}
|
||||
|
||||
$sDate = date('Y-m-d', strtotime('-180 days'));
|
||||
|
||||
$i = Articles::whereIn("iCategoryId", $aCateId)->whereDate("created_at", "<", $sDate)->delete();
|
||||
|
||||
$this->info("清理 {$i} 条数据");
|
||||
$this->info('正文按内容保留策略维护,不再按180天自动删除。');
|
||||
}
|
||||
|
||||
|
||||
private function articleLikes()
|
||||
{
|
||||
// 1. 确定 30 天前的时间点
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Services\Editorial\PublicationEffects;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
final class RetryEditorialIndexNow extends Command
|
||||
{
|
||||
protected $signature = 'editorial:indexnow-retry';
|
||||
|
||||
protected $description = 'Retry due editorial IndexNow notifications without republishing content';
|
||||
|
||||
public function handle(): int
|
||||
{
|
||||
if (! app()->environment(['production', 'testing']) || ! config('editorial.indexnow_enabled', app()->environment('production'))) {
|
||||
$this->line('IndexNow retry disabled in this environment.');
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
$ids = DB::table('editorial_publications')->where('effects->indexnow->status', 'pending')
|
||||
->where(function ($q) {
|
||||
$q->whereNull('effects->indexnow->next_attempt_at')
|
||||
->orWhere('effects->indexnow->next_attempt_at', '<=', now()->timestamp);
|
||||
})->orderBy('updated_at')->limit(10)->pluck('id');
|
||||
$pending = 0;
|
||||
foreach ($ids as $id) {
|
||||
try {
|
||||
$receipt = app(PublicationEffects::class)->synchronize($id);
|
||||
$pending += ($receipt['effects']['indexnow']['status'] ?? '') === 'pending' ? 1 : 0;
|
||||
} catch (\Throwable) {
|
||||
$pending++;
|
||||
}
|
||||
}
|
||||
$this->line(json_encode(['processed' => count($ids), 'pending' => $pending]));
|
||||
|
||||
return $pending ? self::FAILURE : self::SUCCESS;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
namespace App\Console\Commands;
|
||||
use Illuminate\Console\Command;
|
||||
class RetrySeoNotifications extends Command
|
||||
{
|
||||
protected $signature = 'seo:indexnow-retry';
|
||||
protected $description = 'Retry durable resource, collection and deletion notifications';
|
||||
public function handle(): int
|
||||
{
|
||||
$this->line(json_encode(['processed'=>app(\App\Services\SeoNotifications::class)->retry()]));
|
||||
return self::SUCCESS;
|
||||
}
|
||||
}
|
||||
@@ -66,6 +66,9 @@ public function receive(Request $oRequest)
|
||||
|
||||
$oArticle = Articles::where("sSlug", $sSlug)->first();
|
||||
|
||||
if ($oArticle && \Illuminate\Support\Facades\DB::table('editorial_documents')->where('article_id',$oArticle->id)->exists()) {
|
||||
abort(409, 'This article is managed by the editorial API');
|
||||
}
|
||||
if (!$oArticle) {
|
||||
$oArticle = new Articles();
|
||||
$oArticle->sSlug = $sSlug;
|
||||
@@ -167,8 +170,7 @@ public function receiveShadowrocketids(Request $oRequest)
|
||||
|
||||
$sArticleUrl = config("app.url")."/a/".$sSlug;
|
||||
|
||||
$oIndexNow = new IndexNowService();
|
||||
$bIndexR = $oIndexNow->pushUrls([$sArticleUrl.".html"]);
|
||||
$bIndexR = '待服务器队列处理';
|
||||
|
||||
TeleSlave::notify()->send($sArticleUrl." 发布成功 | "."indexNow推送:".$bIndexR);
|
||||
|
||||
@@ -182,6 +184,7 @@ public function receiveFreenode(Request $oRequest)
|
||||
|
||||
$aData = $oRequest->all();
|
||||
$aArticle = $aData["article"];
|
||||
$resourceState = \App\Services\ResourcePublication::validate($aArticle);
|
||||
$sArticleTitle = $aArticle["title"];
|
||||
$sArticleTitleSub = $aArticle["title_sub"];
|
||||
$sArticleContent = $aArticle["content"];
|
||||
@@ -189,7 +192,7 @@ public function receiveFreenode(Request $oRequest)
|
||||
$sSlug = 'fn'.date("Ymd");
|
||||
// $sImgAuthor = "tg_xiuren_a";
|
||||
$sSubKey = $_ENV['site_code_short'].'::fn';
|
||||
$i7like = $aArticle["7like"];
|
||||
$i7like = $aArticle["7like"] ?? 0;
|
||||
|
||||
$oThumbNum = ArticleFreenodeThumbNum::firstOrCreate(["author_code" => $sSubKey]);
|
||||
$iThumbNum = $oThumbNum->num;
|
||||
@@ -237,7 +240,7 @@ public function receiveFreenode(Request $oRequest)
|
||||
|
||||
$oArticle = Articles::updateOrCreate(
|
||||
['sSlug' => $sSlug],
|
||||
$aAttributes
|
||||
$aAttributes + $resourceState
|
||||
);
|
||||
|
||||
(new TagService())->syncArticleTagsByName($oArticle, $aArticleTags);
|
||||
@@ -246,8 +249,7 @@ public function receiveFreenode(Request $oRequest)
|
||||
|
||||
$sArticleUrl = config("app.url")."/a/".$sSlug;
|
||||
|
||||
$oIndexNow = new IndexNowService();
|
||||
$bIndexR = $oIndexNow->pushUrls([$sArticleUrl.".html"]);
|
||||
$bIndexR = '待服务器队列处理';
|
||||
|
||||
TeleSlave::notify()->send($sArticleUrl.".html"." 发布成功 | "."indexNow推送:".$bIndexR); // indexR是true或false,发送到tg什么都没有?
|
||||
|
||||
@@ -267,7 +269,7 @@ public function receiveFreenode_laji(Request $oRequest)
|
||||
$aArticleTags = $aArticle["tags"];
|
||||
$sSlug = 'fn'.date("Ymd");
|
||||
$sImgAuthor = "tg_xiuren_a";
|
||||
$i7like = $aArticle["7like"];
|
||||
$i7like = $aArticle["7like"] ?? 0;
|
||||
|
||||
$oThumbNum = ArticleFreenodeThumbNum::firstOrCreate(["author_code" => $sImgAuthor]);
|
||||
$iThumbNum = $oThumbNum->num;
|
||||
|
||||
@@ -12,10 +12,10 @@ public function index(): Response
|
||||
$sContent .= "Allow: /\n";
|
||||
$sContent .= "Disallow: /admin/\n";
|
||||
$sContent .= "Disallow: /api/\n";
|
||||
$sContent .= "Disallow: /storage/\n";
|
||||
$sContent .= "\n";
|
||||
$sContent .= "Disallow: /vendor/\n";
|
||||
$sContent .= "Disallow: /test/\n";
|
||||
$sContent .= "Disallow: /*?*\n\n";
|
||||
$sContent .= "Disallow: /like/\n\n";
|
||||
$sContent .= "Sitemap: " . config('app.url') . "/sitemap.xml\n";
|
||||
|
||||
// 核心修复:强制指定 text/plain 响应头
|
||||
|
||||
@@ -1,33 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Articles;
|
||||
use App\Models\Categories;
|
||||
use App\Services\Seo;
|
||||
use App\Services\ArticlesService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class SitemapController extends Controller
|
||||
{
|
||||
public function index(): Response
|
||||
{
|
||||
// 连表查询分类:按 aOpt['noindexday'] 动态过滤过期文章
|
||||
$cArticles = Articles::where('iStatus', 1)
|
||||
->whereHas('oCategory', function ($q) {
|
||||
$q->where(function ($query) {
|
||||
// 1. 没有配置 noindexday,或者 noindexday = 0 的文章,一直保留
|
||||
$query->whereNull('aOpt')
|
||||
->orWhereRaw("JSON_UNQUOTE(JSON_EXTRACT(aOpt, '$.noindexday')) IS NULL")
|
||||
->orWhereRaw("JSON_UNQUOTE(JSON_EXTRACT(aOpt, '$.noindexday')) = '0'")
|
||||
// 2. 配置了天数的,只取 N 天内创建的新文章
|
||||
->orWhereRaw("articles.created_at >= NOW() - INTERVAL CAST(JSON_UNQUOTE(JSON_EXTRACT(aOpt, '$.noindexday')) AS UNSIGNED) DAY");
|
||||
});
|
||||
})
|
||||
->orderBy('created_at', 'desc')
|
||||
->get();
|
||||
|
||||
$sXmlContent = view('sitemap', [
|
||||
'cArticles' => $cArticles
|
||||
])->render();
|
||||
|
||||
return response($sXmlContent, 200)->header('Content-Type', 'text/xml');
|
||||
$articles = Articles::publicVisible()->with('oCategory.oParent')->orderByDesc('created_at')->orderByDesc('id')->get();
|
||||
$latest = app(ArticlesService::class)->getLatestFreeNodeSlug();
|
||||
$home = $latest ? $articles->firstWhere('sSlug',$latest) : null;
|
||||
$entries = $home ? [['url'=>Seo::url(),'modified'=>Seo::modified($home)]] : [];
|
||||
foreach (Categories::where('iStatus',1)->with('oParent')->orderBy('id')->get() as $category) {
|
||||
if ($category->iParentId && (!$category->oParent || !$category->oParent->iStatus)) continue;
|
||||
$members = $articles->filter(fn($a)=>$a->iCategoryId === $category->id || ($category->iShowChildren && $a->oCategory->iParentId === $category->id));
|
||||
if ($members->isNotEmpty()) $entries[] = ['url'=>Seo::url(Seo::categoryPath($category)),'modified'=>null];
|
||||
}
|
||||
foreach ($articles->filter(fn($a)=>Seo::indexable($a)) as $a) $entries[] = ['url'=>Seo::articleUrl($a),'modified'=>Seo::modified($a)];
|
||||
return response()->view('sitemap',['entries'=>$entries])->header('Content-Type','application/xml; charset=UTF-8');
|
||||
}
|
||||
}
|
||||
@@ -19,10 +19,12 @@ public function __construct(ArticlesService $oService)
|
||||
|
||||
public function search(Request $oRequest, string $sKeyword)
|
||||
{
|
||||
$xData = $this->oArticlesService->search($sKeyword, 'view');
|
||||
return view('pages.articles.default.index', $xData);
|
||||
$page = \App\Services\Seo::page($oRequest);
|
||||
$data = $this->oArticlesService->search($sKeyword, 'view');
|
||||
$data['seo'] = \App\Services\Seo::listMeta('搜索:'.$data['sKeywords'], '本站文章搜索结果', '/search/'.rawurlencode($data['sKeywords']), $page, false);
|
||||
return $this->listing($oRequest, $data);
|
||||
}
|
||||
|
||||
|
||||
public function like(int $iArticleId, Request $oRequest)
|
||||
{
|
||||
// 1. 获取/生成指纹
|
||||
@@ -43,44 +45,55 @@ public function like(int $iArticleId, Request $oRequest)
|
||||
|
||||
public function listByTag(Request $oRequest, string $sSlug)
|
||||
{
|
||||
$xData = $this->oArticlesService->getTagArticles($sSlug, 'view');
|
||||
return view('pages.articles.default.index', $xData);
|
||||
$page = \App\Services\Seo::page($oRequest);
|
||||
$data = $this->oArticlesService->getTagArticles($sSlug, 'view');
|
||||
$data['seo'] = \App\Services\Seo::listMeta($data['oTag']->sName.'相关文章', '按标签浏览本站内容', '/tag/'.$sSlug, $page, false);
|
||||
return $this->listing($oRequest, $data);
|
||||
}
|
||||
|
||||
public function home(Request $oRequest)
|
||||
{
|
||||
$sSlug = $this->oArticlesService->getLatestFreeNodeSlug();
|
||||
|
||||
if ($sSlug === null) {
|
||||
return view('pages.articles.default.index', ['oArticles' => collect()]);
|
||||
if ($oRequest->filled('s')) {
|
||||
abort_unless(is_string($oRequest->query('s')),404);
|
||||
return redirect(\App\Services\Seo::url('/search/'.rawurlencode(trim($oRequest->query('s')))),301);
|
||||
}
|
||||
|
||||
return $this->show($sSlug, $oRequest);
|
||||
$page = \App\Services\Seo::page($oRequest);
|
||||
if ($oRequest->has('page')) return redirect(\App\Services\Seo::url($page>1?'/freenode':'/', $page),301);
|
||||
$slug = $this->oArticlesService->getLatestFreeNodeSlug();
|
||||
if (!$slug) return response()->view('pages.articles.default.unavailable', [], 503)->header('Retry-After','3600');
|
||||
$data = $this->articleData($slug, $oRequest);
|
||||
$data['bIsHome'] = true;
|
||||
$data['seo'] = \App\Services\Seo::articleMeta($data['oArticle'], true);
|
||||
return view('pages.articles.default.show', $data);
|
||||
}
|
||||
|
||||
public function list(Request $oRequest, string $sSlug1, string $sSlug2 = null)
|
||||
public function list(Request $oRequest, string $sSlug1, ?string $sSlug2 = null)
|
||||
{
|
||||
$sSlug = $sSlug2 ?? $sSlug1;
|
||||
$xData = $this->oArticlesService->getCategoryArticles($sSlug, 'view');
|
||||
return view('pages.articles.default.index', $xData);
|
||||
$page = \App\Services\Seo::page($oRequest);
|
||||
$data = $this->oArticlesService->getCategoryArticles($sSlug2 ?? $sSlug1, 'view');
|
||||
$category = $data['oCategory'];
|
||||
$path = \App\Services\Seo::categoryPath($category);
|
||||
if ($sSlug2) abort_unless($path === '/'.$sSlug1.'/'.$sSlug2, 404);
|
||||
$heading = $category->sSlug === 'freenode' ? '免费节点更新记录' : \App\Services\Seo::categoryName($category);
|
||||
$desc = $category->sSlug === 'freenode' ? '按发布时间查看免费节点历史记录;获取当前订阅请访问首页。' : ($category->sDescription ?: $heading.'相关文章与使用说明');
|
||||
$data['seo'] = \App\Services\Seo::listMeta($heading, $desc, $path, $page, $data['oArticles']->total()>0);
|
||||
if ('/'.$sSlug1 !== $path && !$sSlug2) return redirect(\App\Services\Seo::url($path,$page),301);
|
||||
return $this->listing($oRequest, $data);
|
||||
}
|
||||
private function listing(Request $request, array $data)
|
||||
{
|
||||
$page = \App\Services\Seo::page($request);
|
||||
abort_if($page > $data['oArticles']->lastPage(),404);
|
||||
if ($request->has('page') && $page === 1) return redirect($data['seo']['canonical'],301);
|
||||
$data['oArticles']->withPath(strtok($data['seo']['canonical'],'?'));
|
||||
return view('pages.articles.default.index', $data);
|
||||
}
|
||||
private function articleData(string $slug, Request $request): array
|
||||
{
|
||||
return $this->oArticlesService->getArticle($slug, $request->ip(), $request->cookie('visitor_token') ?? md5($request->ip().$request->userAgent()));
|
||||
}
|
||||
|
||||
public function show(string $sArticleSlug, Request $oRequest)
|
||||
{
|
||||
$sFingerprint = $oRequest->cookie('visitor_token')
|
||||
?? md5($oRequest->ip() . $oRequest->userAgent());
|
||||
|
||||
$xData = $this->oArticlesService->getArticle($sArticleSlug, $oRequest->ip(), $sFingerprint);
|
||||
|
||||
// $xData["siteUrl"] = config("app.url");
|
||||
|
||||
$sViewPath = 'pages.articles.default.show';
|
||||
//
|
||||
// if ($xData["oArticle"]->oCategory->sSlug == "freenode") {
|
||||
// $sViewPath = 'pages.articles.freenode.show';
|
||||
// }
|
||||
|
||||
return view($sViewPath, $xData);
|
||||
$data = $this->articleData($sArticleSlug,$oRequest);
|
||||
$data['seo'] = \App\Services\Seo::articleMeta($data['oArticle']);
|
||||
return view('pages.articles.default.show',$data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
namespace App\Http\Middleware;
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
final class SeoHeaders
|
||||
{
|
||||
public function handle(Request $request, Closure $next)
|
||||
{
|
||||
$response = $next($request);
|
||||
if ($response->getStatusCode() >= 400 || $request->is('api/*','like/*','up','test/*')) $response->headers->set('X-Robots-Tag','noindex, nofollow');
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
@@ -67,7 +67,7 @@ protected function sCreatedAtDiff(): Attribute
|
||||
|
||||
public function shouldBeSearchable(): bool
|
||||
{
|
||||
return (int)$this->iStatus === 1;
|
||||
return \App\Services\Seo::public($this);
|
||||
}
|
||||
|
||||
public function searchableAs(): string
|
||||
@@ -97,34 +97,34 @@ public function toSearchableArray(): array
|
||||
* 判断当前文章是否超过分类设置的 SEO 暴露天数
|
||||
* @return bool
|
||||
*/
|
||||
public function bIsSeoExpired(): bool
|
||||
public function bIsSeoExpired(): bool { return !\App\Services\Seo::indexable($this); }
|
||||
|
||||
public function scopePublicVisible($query)
|
||||
{
|
||||
$oCategory = $this->oCategory;
|
||||
|
||||
// 未关联分类,或分类下的 aOpt 没设置,默认不处理(不过期)
|
||||
if (!$oCategory || empty($oCategory->aOpt) || !isset($oCategory->aOpt['noindexday'])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$iNoindexDay = (int) $oCategory->aOpt['noindexday'];
|
||||
|
||||
// 0 或负数代表不限制,一直暴露给搜索引擎
|
||||
if ($iNoindexDay <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 判断文章创建时间是否早于 N 天前
|
||||
$oCreateDate = \Carbon\Carbon::parse($this->created_at);
|
||||
return $oCreateDate->lt(\Carbon\Carbon::now()->subDays($iNoindexDay));
|
||||
return $query->where('articles.iStatus', 1)->where('articles.created_at', '<=', now())
|
||||
->whereHas('oCategory', fn($c) => $c->where('iStatus', 1)->where(fn($p) => $p
|
||||
->where('iParentId', 0)->orWhereHas('oParent', fn($parent) => $parent->where('iStatus', 1))));
|
||||
}
|
||||
|
||||
|
||||
protected static function booted()
|
||||
{
|
||||
static::saved(function () {
|
||||
static::saving(function ($article) {
|
||||
// Historical test fixtures and migration tooling may use the pre-SEO schema.
|
||||
if (!\Illuminate\Support\Facades\Schema::hasColumn('articles', 'sContentUpdatedAt')) return;
|
||||
if (!$article->exists || $article->isDirty(['sTitle','sTitleSub','sContent','sThumb','iCategoryId','iStatus','bPageThumb'])) {
|
||||
$article->sContentUpdatedAt = now();
|
||||
}
|
||||
if (!$article->exists && $article->oCategory?->sSlug === 'freenode') $article->sSeoPolicy = 'archive';
|
||||
});
|
||||
static::saved(function ($article) {
|
||||
if ($article->wasRecentlyCreated || $article->wasChanged(['sTitle','sTitleSub','sContent','sThumb','iCategoryId','iStatus'])) {
|
||||
app(\App\Services\SeoNotifications::class)->changed($article);
|
||||
}
|
||||
ResponseCache::forget('/'); // 要改成具体文章
|
||||
});
|
||||
|
||||
static::deleted(function () {
|
||||
static::deleted(function ($article) {
|
||||
app(\App\Services\SeoNotifications::class)->changed($article,true);
|
||||
ResponseCache::forget('/'); // 要改成具体文章
|
||||
});
|
||||
}
|
||||
|
||||
@@ -21,7 +21,9 @@ public function boot(): void
|
||||
$aHotArticles = CacheService::updateOrderLikes();
|
||||
}
|
||||
|
||||
$oView->with('oOrderLikes', $aHotArticles);
|
||||
$ids = collect($aHotArticles)->pluck('oArticle.id');
|
||||
$visible = \App\Models\Articles::publicVisible()->whereIn('id',$ids)->pluck('id')->all();
|
||||
$oView->with('oOrderLikes', array_values(array_filter($aHotArticles, fn($item)=>in_array($item['oArticle']['id'],$visible))));
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Models\Articles;
|
||||
|
||||
final class ArticleRecommendations
|
||||
{
|
||||
public const SLOT = '<!-- fna-airport-recommendations -->';
|
||||
|
||||
public static function providers(): array
|
||||
{
|
||||
if (! config('airport_recommendations.enabled')) return [];
|
||||
$providers = array_filter(config('airport_recommendations.providers', []), fn ($p) =>
|
||||
($p['enabled'] ?? false) && filter_var($p['url'] ?? '', FILTER_VALIDATE_URL)
|
||||
&& in_array(parse_url($p['url'], PHP_URL_SCHEME), ['https', 'http'], true));
|
||||
uasort($providers, fn ($a, $b) => ($a['order'] ?? 0) <=> ($b['order'] ?? 0));
|
||||
return $providers;
|
||||
}
|
||||
|
||||
/** Presentation only: article storage, API receipts and subscription bytes stay intact. */
|
||||
public static function prepare(Articles $article): array
|
||||
{
|
||||
$html = $article->sContent ?? '';
|
||||
$category = $article->oCategory;
|
||||
$slug = $category?->sSlug;
|
||||
$scope = in_array($slug, ['freenode', 'shadowrocketids', 'advanced', 'client'], true)
|
||||
|| $category?->oParent?->sSlug === 'client';
|
||||
$enabled = $scope && self::providers() !== [];
|
||||
if (! $enabled) return ['body' => $html, 'enabled' => false, 'inline' => false];
|
||||
|
||||
$inline = false;
|
||||
if (in_array($slug, ['freenode', 'shadowrocketids'], true)) {
|
||||
// Match the known legacy heading and its own Fuyun link, bounded by the next heading.
|
||||
if (preg_match('~(?:<p\b[^>]*>\s*)?<h[2-6]\b[^>]*>\s*机场推荐\s*[-—-::]*\s*福云\s*[::]?\s*</h[2-6]>~u', $html, $head, PREG_OFFSET_CAPTURE)) {
|
||||
$start = $head[0][1];$from = $start + strlen($head[0][0]);
|
||||
$tail = substr($html, $from);
|
||||
if (preg_match('~<h[1-6]\b~i', $tail, $next, PREG_OFFSET_CAPTURE)) $tail = substr($tail, 0, $next[0][1]);
|
||||
preg_match_all('~<a\b[^>]*>.*?</a>~si', $tail, $links, PREG_OFFSET_CAPTURE);
|
||||
foreach ($links[0] as [$link, $offset]) {
|
||||
$text = html_entity_decode(strip_tags($link), ENT_QUOTES | ENT_HTML5, 'UTF-8');
|
||||
if (! str_contains($text, '机场官网') || ! str_contains($text, '福云')) continue;
|
||||
$end = $from + $offset + strlen($link);
|
||||
if (preg_match('~\A(?:\s|</(?:b|strong|p)>)*~i', substr($html, $end), $closing)) $end += strlen($closing[0]);
|
||||
$html = substr($html, 0, $start).self::SLOT.substr($html, $end);
|
||||
$inline = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($slug === 'advanced') {
|
||||
$anchor = '#'.config('airport_recommendations.anchor');
|
||||
if (! str_contains($html, $anchor)) {
|
||||
$jump = '<p class="airport-recommendation-jump">如果需要更稳定的线路,可以从文末的<a href="'.e($anchor).'">机场推荐</a>中选择。</p>';
|
||||
$inserted = false;
|
||||
$html = preg_replace_callback('~<p\b[^>]*>.*?</p>~si', function ($m) use (&$inserted, $jump) {
|
||||
if ($inserted || ! preg_match('/免费节点|订阅|稳定|机场|线路/u', strip_tags($m[0]))) return $m[0];
|
||||
$inserted = true;
|
||||
return $m[0].$jump;
|
||||
}, $html);
|
||||
if (! $inserted) $html .= $jump;
|
||||
}
|
||||
}
|
||||
return ['body' => $html, 'enabled' => true, 'inline' => $inline];
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,6 @@ class ArticleResponseCacheProfile extends CacheAllSuccessfulGetRequests
|
||||
public function enabled(Request $request): bool
|
||||
{
|
||||
// 首页跟随最新免费节点文章,不能沿用整页的七天缓存。
|
||||
return ! $request->is('/', 'api/editorial/*') && parent::enabled($request);
|
||||
return false; // Public HTML contains session/like state and time-dependent visibility; static assets remain cacheable.
|
||||
}
|
||||
}
|
||||
@@ -143,151 +143,46 @@ public function like(int $iArticleId, string $sIp, string $sFingerprint): array
|
||||
}
|
||||
}
|
||||
|
||||
public function search(string $sKeywords, string $sResultType)
|
||||
public function search(string $keywords, string $resultType = 'view')
|
||||
{
|
||||
if (empty($sKeywords)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$sKeywords = strip_tags(trim($sKeywords));
|
||||
|
||||
$oArticles = Articles::search($sKeywords)
|
||||
->options([
|
||||
'attributesToHighlight' => ['sTitle', 'sContent', 'sCategoryName'],
|
||||
// 1. 把 attributesToSnippet 改成 attributesToCrop
|
||||
'attributesToCrop' => ['sContent'],
|
||||
// 2. 设置裁剪后的长度(单位是字符,按需调整)
|
||||
'cropLength' => 100,
|
||||
'highlightPreTag' => '<mark class="highlight">',
|
||||
'highlightPostTag' => '</mark>',
|
||||
])
|
||||
->orderByDesc('iIsTop')
|
||||
->paginate(config('app.page_limit'));
|
||||
|
||||
$oArticles->getCollection()->transform(function ($oArticle) {
|
||||
|
||||
$aMeta = $oArticle->scoutMetadata();
|
||||
$aFormatted = $aMeta['_formatted'] ?? [];
|
||||
|
||||
if (!empty($aFormatted)) {
|
||||
$oArticle->sTitle = $aFormatted['sTitle'] ?? $oArticle->sTitle;
|
||||
$oArticle->sContent = $aFormatted['sContent'] ?? $oArticle->sContent;
|
||||
|
||||
if (isset($aFormatted['sCategoryName'])) {
|
||||
$oArticle->sCategoryName = $aFormatted['sCategoryName'];
|
||||
$oArticle->setRelation('oCategory', (object)[
|
||||
'sName' => $aFormatted['sCategoryName'],
|
||||
'sSlug' => $oArticle->sCategorySlug ?? ''
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
return $oArticle;
|
||||
});
|
||||
|
||||
if ($sResultType === "ajax") {
|
||||
$sHtml = '';
|
||||
foreach ($oArticles as $oArticle) {
|
||||
$sHtml .= view('components.article-item', ['oArticle' => $oArticle])->render();
|
||||
}
|
||||
$xResult = $sHtml;
|
||||
} else {
|
||||
$xResult = [
|
||||
'oArticles' => $oArticles,
|
||||
];
|
||||
}
|
||||
|
||||
return $xResult;
|
||||
$term = trim(strip_tags($keywords));
|
||||
abort_if($term === '' || mb_strlen($term) > 100, 404);
|
||||
// Live DB authorization avoids stale external-index documents and cross-site results.
|
||||
$literal = '%'.str_replace(['!','%','_'], ['!!','!%','!_'], $term).'%';
|
||||
$articles = Articles::publicVisible()->with('oCategory.oParent')
|
||||
->where(fn($q) => $q->whereRaw("sTitle LIKE ? ESCAPE '!'", [$literal])->orWhereRaw("sContent LIKE ? ESCAPE '!'", [$literal]))
|
||||
->orderByDesc('iIsTop')->orderByDesc('created_at')->orderByDesc('id')->paginate(config('seo.page_size'));
|
||||
return ['oArticles'=>$articles, 'sKeywords'=>$term];
|
||||
}
|
||||
|
||||
public function getTagArticles(string $sSlug, string $sResultType)
|
||||
public function getTagArticles(string $slug, string $resultType = 'view')
|
||||
{
|
||||
$oTags = Tags::where('sSlug', $sSlug)->firstOrFail();
|
||||
|
||||
$oArticles = $oTags->oArticles()
|
||||
->where('iStatus', 1) // 只拿已发布的
|
||||
->with(['oCategory']) // 预加载关联,拒绝 N+1
|
||||
->orderByDesc('iIsTop') // 置顶优先
|
||||
->orderByDesc('created_at') // 最新优先
|
||||
->paginate(config('app.page_limit')); // 必须分页,否则数据多了会爆内存
|
||||
|
||||
if ($sResultType === "ajax") {
|
||||
$sHtml = '';
|
||||
foreach ($oArticles as $oArticle) {
|
||||
$sHtml .= view('components.article-item', ['oArticle' => $oArticle])->render();
|
||||
}
|
||||
$xResult = $sHtml;
|
||||
} else {
|
||||
$xResult = [
|
||||
'oArticles' => $oArticles,
|
||||
];
|
||||
}
|
||||
|
||||
return $xResult;
|
||||
$tag = Tags::where('sSlug', $slug)->firstOrFail();
|
||||
return ['oTag'=>$tag, 'oArticles'=>$tag->oArticles()->publicVisible()->with('oCategory.oParent')
|
||||
->orderByDesc('iIsTop')->orderByDesc('created_at')->orderByDesc('id')->paginate(config('seo.page_size'))];
|
||||
}
|
||||
|
||||
public function getLatestFreeNodeSlug(): ?string
|
||||
{
|
||||
return Articles::where('iStatus', 1)
|
||||
->whereHas('oCategory', fn ($query) => $query->where('sSlug', 'freenode'))
|
||||
->where('created_at', '<=', now())
|
||||
->orderByDesc('created_at')
|
||||
->orderByDesc('id')
|
||||
->value('sSlug');
|
||||
}
|
||||
|
||||
public function getCategoryArticles(string $sSlug, string $sResultType)
|
||||
{
|
||||
$oCategory = Categories::where('sSlug', $sSlug)->firstOrFail();
|
||||
|
||||
if ($oCategory->iShowChildren) {
|
||||
$aCategoryIds = Categories::where('iParentId', $oCategory->id)
|
||||
->pluck('id')
|
||||
->push($oCategory->id)
|
||||
->toArray();
|
||||
} else {
|
||||
$aCategoryIds = [$oCategory->id];
|
||||
foreach (Articles::publicVisible()->whereHas('oCategory', fn($q)=>$q->where('sSlug','freenode'))
|
||||
->orderByDesc('created_at')->orderByDesc('id')->cursor() as $article) {
|
||||
if (ResourcePublication::usable($article)) return $article->sSlug;
|
||||
}
|
||||
|
||||
$oArticles = Articles::whereIn('iCategoryId', $aCategoryIds)
|
||||
->with(['oUser', 'oCategory'])
|
||||
->orderBy('iIsTop', 'desc')
|
||||
->orderBy('created_at', 'desc')
|
||||
->simplePaginate(config('app.page_limit'));
|
||||
|
||||
if ($sResultType === "ajax") {
|
||||
$sHtml = '';
|
||||
foreach ($oArticles as $oArticle) {
|
||||
$sHtml .= view('components.article-item', ['oArticle' => $oArticle])->render();
|
||||
}
|
||||
$aResult = $sHtml;
|
||||
} else {
|
||||
$aResult = [
|
||||
'oCategory' => $oCategory,
|
||||
'iArticleCount' => isset($oCategory->aBanner) ? Articles::whereIn('iCategoryId', $aCategoryIds)->count() : null,
|
||||
'oArticles' => $oArticles,
|
||||
];
|
||||
}
|
||||
|
||||
return $aResult;
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getArticle(string $sArticleSlug, string $sIp, string $sFingerprint)
|
||||
public function getCategoryArticles(string $slug, string $resultType = 'view')
|
||||
{
|
||||
$oArticle = Articles::where('sSlug', $sArticleSlug)
|
||||
->where('iStatus', 1)
|
||||
->with(['oCategory.oParent', 'oTags'])
|
||||
->firstOrFail();
|
||||
|
||||
$oArticle->bIsLiked = ArticleLikes::where('iArticleId', $oArticle->id)
|
||||
->where(function($q) use ($sIp, $sFingerprint) {
|
||||
$q->where('sIp', $sIp)
|
||||
->orWhere('sFingerprint', $sFingerprint);
|
||||
})->exists();
|
||||
|
||||
// return $oArticle;
|
||||
return [
|
||||
'oArticle' => $oArticle
|
||||
];
|
||||
$category = Categories::where('sSlug', $slug)->where('iStatus',1)->with('oParent')->firstOrFail();
|
||||
abort_if($category->iParentId && (!$category->oParent || !$category->oParent->iStatus),404);
|
||||
$ids = [$category->id];
|
||||
if ($category->iShowChildren) $ids = array_merge($ids, Categories::where('iParentId',$category->id)->where('iStatus',1)->pluck('id')->all());
|
||||
$articles = Articles::publicVisible()->whereIn('iCategoryId',$ids)->with('oCategory.oParent')
|
||||
->orderByDesc('iIsTop')->orderByDesc('created_at')->orderByDesc('id')->paginate(config('seo.page_size'));
|
||||
return ['oCategory'=>$category,'oArticles'=>$articles,'iArticleCount'=>$articles->total()];
|
||||
}
|
||||
public function getArticle(string $slug, string $ip, string $fingerprint)
|
||||
{
|
||||
$article = Articles::publicVisible()->where('sSlug',$slug)->with(['oCategory.oParent','oTags'])->firstOrFail();
|
||||
$article->bIsLiked = ArticleLikes::where('iArticleId',$article->id)
|
||||
->where(fn($q)=>$q->where('sIp',$ip)->orWhere('sFingerprint',$fingerprint))->exists();
|
||||
return ['oArticle'=>$article];
|
||||
}
|
||||
}
|
||||
@@ -68,7 +68,7 @@ class CacheService
|
||||
public static function updateOrderLikes(): array
|
||||
{
|
||||
// 1. 基于 Articles 表按最后点赞时间倒序,涵盖真实赞与算法注入赞
|
||||
$cArticles = Articles::where('iStatus', 1)
|
||||
$cArticles = Articles::publicVisible()
|
||||
->whereNotNull('sLastLikedAt')
|
||||
->orderBy('sLastLikedAt', 'desc')
|
||||
->limit(5)
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Editorial;
|
||||
|
||||
use App\Models\Articles;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
|
||||
/** Durable notification state lives in the publication receipt, alongside cache/search effects. */
|
||||
final class IndexNowNotification
|
||||
{
|
||||
public function initial(array $articles): array
|
||||
{
|
||||
if (! $this->enabled()) {
|
||||
return ['status' => 'skipped', 'reason' => 'disabled-environment'];
|
||||
}
|
||||
if (! collect($articles)->contains(fn ($a) => $a['content_changed'] ?? false)) {
|
||||
return ['status' => 'skipped', 'reason' => 'no-content-change'];
|
||||
}
|
||||
|
||||
return ['status' => 'pending', 'attempts' => 0];
|
||||
}
|
||||
|
||||
public function synchronize(array $state, array $published): array
|
||||
{
|
||||
if (($state['status'] ?? '') !== 'pending' || ! $this->enabled()
|
||||
|| ($state['next_attempt_at'] ?? 0) > now()->timestamp) {
|
||||
return $state;
|
||||
}
|
||||
|
||||
$base = rtrim((string) config('editorial.base_url'), '/');
|
||||
$urls = [];
|
||||
foreach ($published as $item) {
|
||||
if (! ($item['content_changed'] ?? false)) {
|
||||
continue;
|
||||
}
|
||||
$article = Articles::with('oCategory')->find($item['article_id']);
|
||||
if (! $article || !\App\Services\Seo::indexable($article)) {
|
||||
continue;
|
||||
}
|
||||
$url = $base.'/a/'.$article->sSlug.'.html';
|
||||
if ($url === $item['url'] && preg_match('/\A[a-z0-9_-]+\z/', $article->sSlug)) {
|
||||
$urls[] = $url;
|
||||
$urls[] = \App\Services\Seo::url(\App\Services\Seo::categoryPath($article->oCategory));
|
||||
if ($article->oCategory->oParent) $urls[] = \App\Services\Seo::url(\App\Services\Seo::categoryPath($article->oCategory->oParent));
|
||||
}
|
||||
}
|
||||
$urls = array_values(array_unique($urls));
|
||||
if (! $urls) {
|
||||
return array_replace($state, ['status' => 'skipped', 'reason' => 'no-current-indexable-url']);
|
||||
}
|
||||
|
||||
return $this->submit($state, $urls);
|
||||
}
|
||||
|
||||
public function submit(array $state, array $urls): array
|
||||
{
|
||||
if (!$this->enabled() || ($state['next_attempt_at'] ?? 0) > now()->timestamp) return $state;
|
||||
$base = rtrim((string) config('editorial.base_url'), '/');
|
||||
$host = parse_url($base, PHP_URL_HOST);
|
||||
// No per-article target, redirect, or credentials in URLs. Never probe public pages from local.
|
||||
if (! $host || ! preg_match('~\Ahttps://[a-z0-9.-]+\z~i', $base)
|
||||
|| $base !== rtrim((string) config('app.url'), '/')
|
||||
|| $host !== config('app.site_code')) {
|
||||
return $this->pending($state, 'site-binding-mismatch');
|
||||
}
|
||||
$key = config('key.indexnow');
|
||||
if (! is_string($key) || ! preg_match('/\A[a-zA-Z0-9-]{8,128}\z/', $key)) {
|
||||
return $this->pending($state, 'key-missing-or-invalid');
|
||||
}
|
||||
|
||||
foreach ($urls as $url) {
|
||||
if (!str_starts_with($url, $base.'/') || parse_url($url, PHP_URL_HOST) !== $host || parse_url($url, PHP_URL_QUERY) || parse_url($url, PHP_URL_FRAGMENT)) return $this->pending($state,'invalid-target');
|
||||
}
|
||||
if (!$urls) return ['status'=>'skipped','reason'=>'no-current-indexable-url'];
|
||||
try {
|
||||
$response = Http::connectTimeout(5)->timeout(15)->withoutRedirecting()->acceptJson()
|
||||
->post('https://api.indexnow.org/indexnow', [
|
||||
'host' => $host, 'key' => $key, 'keyLocation' => $base.'/'.$key.'.txt', 'urlList' => $urls,
|
||||
]);
|
||||
$code = $response->status();
|
||||
if (in_array($code, [200, 202], true)) {
|
||||
return ['status' => 'done', 'attempts' => ($state['attempts'] ?? 0) + 1,
|
||||
'http_status' => $code, 'urls' => $urls, 'submitted_at' => now()->toIso8601String(),
|
||||
'result' => $code === 202 ? 'received-key-validation-pending' : 'received'];
|
||||
}
|
||||
|
||||
return $this->pending($state, 'http-error', $code);
|
||||
} catch (\Throwable) {
|
||||
// Response bodies and exception messages may contain the key. Persist only safe diagnostics.
|
||||
return $this->pending($state, 'transport-error');
|
||||
}
|
||||
}
|
||||
|
||||
private function enabled(): bool
|
||||
{
|
||||
return app()->environment(['production', 'testing'])
|
||||
&& (bool) config('editorial.indexnow_enabled', app()->environment('production'));
|
||||
}
|
||||
|
||||
private function pending(array $state, string $reason, ?int $code = null): array
|
||||
{
|
||||
$attempts = ($state['attempts'] ?? 0) + 1;
|
||||
|
||||
return ['status' => 'pending', 'attempts' => $attempts, 'reason' => $reason, 'http_status' => $code,
|
||||
'last_attempt_at' => now()->toIso8601String(),
|
||||
'next_attempt_at' => now()->timestamp + min(86400, 300 * 2 ** min(9, $attempts - 1))];
|
||||
}
|
||||
}
|
||||
@@ -36,6 +36,12 @@ public function synchronize(string $id): array
|
||||
}
|
||||
// Sitemap is generated from current DB rows, no external submission is performed.
|
||||
$effects['sitemap'] = ['status' => ($effects['cache']['status'] ?? '') === 'done' ? 'done' : 'pending', 'method' => 'database-driven'];
|
||||
// Legacy receipts were not queued for notification; never backfill them implicitly.
|
||||
$notification = $effects['indexnow'] ?? ['status' => 'skipped', 'reason' => 'legacy-publication'];
|
||||
if (($effects['cache']['status'] ?? '') === 'done') {
|
||||
$notification = app(IndexNowNotification::class)->synchronize($notification, $receipt['articles']);
|
||||
}
|
||||
$effects['indexnow'] = $notification;
|
||||
DB::table('editorial_publications')->where('id', $id)->update(['effects' => json_encode($effects), 'updated_at' => now()]);
|
||||
});
|
||||
|
||||
|
||||
@@ -203,13 +203,20 @@ public function publish(string $id, array $input): array
|
||||
foreach (array_unique(array_merge($oldTags, $item['tag_ids'])) as $tag) {
|
||||
DB::table('tags')->where('id', $tag)->update(['iArticleCount' => DB::table('article_tag')->where('iTagId', $tag)->count()]);
|
||||
}
|
||||
$contentChanged = $item['base_article_hash'] !== $this->articleHash(DB::table('articles')->where('id', $articleId)->first());
|
||||
if ($contentChanged && \Illuminate\Support\Facades\Schema::hasColumn('articles','sContentUpdatedAt')) {
|
||||
DB::table('articles')->where('id',$articleId)->update(['sContentUpdatedAt'=>now()]);
|
||||
}
|
||||
DB::table('editorial_documents')->where('content_key', $item['content_key'])->update(['article_id' => $articleId, 'published_revision' => $item['revision'], 'updated_at' => now()]);
|
||||
DB::table('editorial_versions')->insert(['content_key' => $item['content_key'], 'revision' => $item['revision'], 'snapshot' => json_encode($item, JSON_UNESCAPED_UNICODE), 'created_at' => now()]);
|
||||
$published[] = ['content_key' => $item['content_key'], 'article_id' => $articleId, 'revision' => $item['revision'],
|
||||
'content_changed' => $item['base_article_hash'] !== $this->articleHash(DB::table('articles')->where('id', $articleId)->first()),
|
||||
'url' => rtrim(config('editorial.base_url'), '/').'/a/'.$item['slug'].'.html'];
|
||||
}
|
||||
DB::table('editorial_publications')->insert(['id' => $data['request_id'], 'draft_id' => $id, 'payload_hash' => $opHash,
|
||||
'receipt' => json_encode(['publication_id' => $data['request_id'], 'status' => 'published', 'articles' => $published], JSON_UNESCAPED_UNICODE), 'created_at' => now(), 'updated_at' => now()]);
|
||||
'receipt' => json_encode(['publication_id' => $data['request_id'], 'status' => 'published', 'articles' => $published], JSON_UNESCAPED_UNICODE),
|
||||
'effects' => json_encode(['indexnow' => app(IndexNowNotification::class)->initial($published)]),
|
||||
'created_at' => now(), 'updated_at' => now()]);
|
||||
DB::table('editorial_drafts')->where('id', $id)->update(['status' => 'published', 'publication_id' => $data['request_id'], 'updated_at' => now()]);
|
||||
|
||||
return $data['request_id'];
|
||||
|
||||
@@ -141,7 +141,8 @@ private function verify(string $file, array $state): array
|
||||
'body_sha256' => hash('sha256', $source['body_html']), 'like_growth' => $source['like_growth']];
|
||||
}
|
||||
$state['readback'] = $readback;
|
||||
$done = collect($state['receipt']['effects'])->every(fn ($e) => ($e['status'] ?? '') === 'done');
|
||||
$done = collect($state['receipt']['effects'])->every(fn ($e, $name) => ($e['status'] ?? '') === 'done'
|
||||
|| ($name === 'indexnow' && ($e['status'] ?? '') === 'skipped'));
|
||||
$state['phase'] = $done && collect($readback)->every(fn ($r) => $r['revision_matches'] && $r['content_matches']) ? 'complete' : 'published_pending';
|
||||
$this->save($file, $state);
|
||||
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use DOMDocument;
|
||||
use DOMElement;
|
||||
|
||||
/** Read-only adaptation of the legacy daily-node article into a task-oriented layout. */
|
||||
final class FreeNodeArticleLayout
|
||||
{
|
||||
public static function prepare(string $html): ?array
|
||||
{
|
||||
if (!preg_match('~(?:<p\b[^>]*>\s*)?<h[2-6]\b[^>]*>\s*免费节点订阅链接\s*[::]?\s*</h[2-6]>(?:\s*</p>)?~u', $html, $heading, PREG_OFFSET_CAPTURE)) return null;
|
||||
if (!preg_match('~<p\b[^>]*>\s*温馨提示\s*[::]?\s*</p>~u', $html, $help, PREG_OFFSET_CAPTURE, $heading[0][1])) return null;
|
||||
$start = $heading[0][1];$from = $start + strlen($heading[0][0]);$end = $help[0][1];
|
||||
$intro = self::fragment(str_replace(ArticleRecommendations::SLOT, '', substr($html, 0, $start)));
|
||||
$subscriptions = self::fragment(substr($html, $from, $end - $from));
|
||||
if (!$intro || !$subscriptions) return null;
|
||||
$result = ['count' => null, 'speed' => null, 'regions' => [], 'community' => [], 'intro' => '', 'notes' => '', 'subscriptions' => [], 'usage' => substr($html, $end + strlen($help[0][0]))];
|
||||
foreach (iterator_to_array($intro->childNodes) as $node) {
|
||||
$text = self::text($node->textContent);
|
||||
if ($text === '') continue;
|
||||
if (preg_match('/^本次更新共\s*(\d+)\s*个可用节点[,,]\s*最高速度\s*([^。]+)[。]?$/u', $text, $m)) {
|
||||
$result['count'] = (int)$m[1];$result['speed'] = trim($m[2]);continue;
|
||||
}
|
||||
if (preg_match('/^覆盖(.+?)等多个区域[。]?$/u', $text, $m)) {
|
||||
$result['regions'] = array_values(array_unique(array_filter(array_map('trim', preg_split('/[、,,]/u', $m[1])))));continue;
|
||||
}
|
||||
if (str_starts_with($text, '复制下方订阅链接')) continue;
|
||||
if ($node instanceof DOMElement && preg_match('/点击加入我们的tg频道|点击关注我们的github仓库/u', $text)) {
|
||||
$recognized = false;
|
||||
foreach ($node->getElementsByTagName('a') as $a) {
|
||||
$url = $a->getAttribute('href');$host = strtolower(parse_url($url, PHP_URL_HOST) ?? '');
|
||||
if (parse_url($url, PHP_URL_SCHEME) !== 'https' || !in_array($host, ['t.me', 'github.com'], true)) continue;
|
||||
$result['community'][] = ['url' => $url, 'label' => $host === 't.me' ? 'Telegram 更新频道' : 'GitHub 项目仓库'];$recognized = true;
|
||||
}
|
||||
if ($recognized) continue;
|
||||
}
|
||||
$result['intro'] .= $intro->ownerDocument->saveHTML($node);
|
||||
}
|
||||
$urls = [];
|
||||
foreach (iterator_to_array($subscriptions->getElementsByTagName('a')) as $a) {
|
||||
if (!$a->hasAttribute('data-clipboard-text')) continue;
|
||||
$url = $a->getAttribute('data-clipboard-text');
|
||||
if (!filter_var($url, FILTER_VALIDATE_URL) || !in_array(parse_url($url, PHP_URL_SCHEME), ['http', 'https'], true)) return null;
|
||||
$path = parse_url($url, PHP_URL_PATH) ?? '';
|
||||
$type = match (true) {
|
||||
(bool)preg_match('/-clash\.(yaml|yml)$/i', $path) => ['key'=>'clash', 'title'=>'Clash / Mihomo', 'format'=>'YAML', 'clients'=>'Clash Verge Rev、Mihomo 等客户端', 'symbol'=>'C'],
|
||||
(bool)preg_match('/-singbox\.(txt|json)$/i', $path) => ['key'=>'singbox', 'title'=>'Sing-box / Hiddify', 'format'=>'SING-BOX', 'clients'=>'Sing-box、Hiddify 等客户端', 'symbol'=>'S'],
|
||||
(bool)preg_match('/-v2ray\.txt$/i', $path) => ['key'=>'v2ray', 'title'=>'V2ray / Shadowrocket', 'format'=>'通用订阅', 'clients'=>'v2rayNG、Shadowrocket 等客户端', 'symbol'=>'V'],
|
||||
default => null,
|
||||
};
|
||||
// Unknown formats keep the original article rather than dropping a subscription.
|
||||
if (!$type || isset($result['subscriptions'][$type['key']])) return null;
|
||||
$result['subscriptions'][$type['key']] = $type + ['url'=>$url];$urls[] = $url;
|
||||
}
|
||||
if ($result['subscriptions'] === []) return null;
|
||||
// Keep every supplementary note while removing only labels/URLs now shown in cards.
|
||||
foreach (iterator_to_array($subscriptions->childNodes) as $node) {
|
||||
$text = self::text($node->textContent);
|
||||
if ($text === '' || in_array($text, $urls, true) || preg_match('/订阅链接\s*[::]$/u', $text)) continue;
|
||||
if ($node instanceof DOMElement && ($node->hasAttribute('data-clipboard-text') || $node->getElementsByTagName('a')->length)) {
|
||||
foreach (iterator_to_array($node->getElementsByTagName('a')) as $link) {
|
||||
if ($link->hasAttribute('data-clipboard-text')) $link->parentNode->removeChild($link);
|
||||
}
|
||||
if (self::text($node->textContent) === '' || in_array(self::text($node->textContent), $urls, true)) continue;
|
||||
}
|
||||
$result['notes'] .= $subscriptions->ownerDocument->saveHTML($node);
|
||||
}
|
||||
$order = ['clash'=>0, 'v2ray'=>1, 'singbox'=>2];
|
||||
uasort($result['subscriptions'], fn ($a, $b) => $order[$a['key']] <=> $order[$b['key']]);
|
||||
$result['subscriptions'] = array_values($result['subscriptions']);
|
||||
return $result;
|
||||
}
|
||||
|
||||
private static function text(string $text): string
|
||||
{
|
||||
return trim(preg_replace('/\s+/u', ' ', $text));
|
||||
}
|
||||
|
||||
private static function fragment(string $html): ?DOMElement
|
||||
{
|
||||
$dom = new DOMDocument('1.0', 'UTF-8');$before = libxml_use_internal_errors(true);
|
||||
try {
|
||||
$dom->loadHTML('<?xml encoding="UTF-8"><html><body><div id="fn-root">'.$html.'</div></body></html>', LIBXML_NONET);
|
||||
return $dom->getElementById('fn-root');
|
||||
} catch (\Throwable) {
|
||||
return null;
|
||||
} finally {
|
||||
libxml_clear_errors();libxml_use_internal_errors($before);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
final class ResourceArticlePresentation
|
||||
{
|
||||
/** Remove legacy follow prompts only from the two daily resource columns. */
|
||||
public static function body(string $html, ?string $category): string
|
||||
{
|
||||
if (! in_array($category, ['freenode', 'shadowrocketids'], true)) return $html;
|
||||
|
||||
return preg_replace_callback('~<p\b[^>]*>.*?</p>(?:\s*<p\b[^>]*>\s*</p>)*~si', static function (array $match): string {
|
||||
$text = html_entity_decode(strip_tags($match[0]), ENT_QUOTES | ENT_HTML5, 'UTF-8');
|
||||
$text = preg_replace('/\s+/u', '', $text);
|
||||
if (preg_match('/点击加入我们的(?:tg|telegram)频道|点击关注我们的github仓库/iu', $text)) return '';
|
||||
return $match[0];
|
||||
}, $html);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
namespace App\Services;
|
||||
use App\Models\Articles;
|
||||
final class ResourcePublication
|
||||
{
|
||||
public static function usable(Articles $article): bool
|
||||
{
|
||||
if (in_array($article->sResourceStatus, ['failed','empty'], true)) return false;
|
||||
// Legacy explicit zero is evidence of no result, not a successful refresh.
|
||||
return !preg_match('/(?:共|更新)\s*0\s*个可用节点/u', Seo::text($article->sTitleSub));
|
||||
}
|
||||
public static function validate(array $article): array
|
||||
{
|
||||
validator($article, ['title'=>'required|string|max:250','title_sub'=>'present|string|max:4000',
|
||||
'content'=>'required|string|max:2000000','tags'=>'present|array','7like'=>'nullable|integer|min:0',
|
||||
'check_status'=>'nullable|in:success,failed,unknown','valid_count'=>'nullable|integer|min:0'])->validate();
|
||||
$count = isset($article['valid_count']) ? (int)$article['valid_count'] : null;
|
||||
$state = $article['check_status'] ?? 'unknown';
|
||||
// Compatibility for the current upstream; a reported count is not a new live check.
|
||||
if ($count === null && preg_match('/(?:共|更新)\s*(\d+)\s*个可用节点/u', Seo::text($article['title_sub']), $m)) $count = (int)$m[1];
|
||||
abort_if($state === 'failed' || $count === 0 || trim(Seo::text($article['content'])) === '', 422, 'Resource update has no usable result; previous publication retained');
|
||||
return ['sResourceStatus'=>$state === 'success' && $count > 0 ? 'success' : 'unknown','iResourceCount'=>$count];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
namespace App\Services;
|
||||
|
||||
use App\Models\Articles;
|
||||
use App\Models\Categories;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
/** One URL, visibility and indexing contract for HTML, sitemap and notifications. */
|
||||
final class Seo
|
||||
{
|
||||
public static function url(string $path = '/', int $page = 1): string
|
||||
{
|
||||
return rtrim(config('app.url'), '/').'/'.ltrim($path, '/').($page > 1 ? '?page='.$page : '');
|
||||
}
|
||||
public static function articleUrl(Articles $article): string { return self::url('/a/'.$article->sSlug.'.html'); }
|
||||
public static function categoryPath(Categories $category): string
|
||||
{
|
||||
return ($category->oParent ? '/'.$category->oParent->sSlug : '').'/'.$category->sSlug;
|
||||
}
|
||||
public static function categoryName(Categories $category): string
|
||||
{
|
||||
return match ($category->sSlug) { 'andorid' => 'Android', 'ios' => 'iOS', default => $category->sName };
|
||||
}
|
||||
public static function text(?string $html, int $limit = 200): string
|
||||
{
|
||||
$text = html_entity_decode(strip_tags($html ?? ''), ENT_QUOTES | ENT_HTML5, 'UTF-8');
|
||||
return mb_substr(trim(preg_replace('/\s+/u', ' ', $text)), 0, $limit);
|
||||
}
|
||||
public static function imageSize(?string $url): array
|
||||
{
|
||||
$path = parse_url($url ?? '', PHP_URL_PATH);
|
||||
if (!$path || str_contains($path,'..') || !str_starts_with($path,'/')) return [];
|
||||
if (parse_url($url,PHP_URL_HOST) && parse_url($url,PHP_URL_HOST) !== parse_url(config('app.url'),PHP_URL_HOST)) return [];
|
||||
$file = public_path(ltrim($path,'/'));
|
||||
if (!is_file($file)) return [];
|
||||
$size = @getimagesize($file);
|
||||
return $size ? ['width'=>$size[0],'height'=>$size[1]] : [];
|
||||
}
|
||||
public static function body(string $html): string
|
||||
{
|
||||
// Preserve editorial HTML byte-for-byte except confirmed commercial links.
|
||||
return preg_replace_callback('~<a\b[^>]*>~i', function($match) {
|
||||
$tag = $match[0];
|
||||
if (!preg_match('~\bhref\s*=\s*([\x22\x27])(.*?)\1~i',$tag,$href)) return $tag;
|
||||
$host = parse_url(html_entity_decode($href[2],ENT_QUOTES),PHP_URL_HOST);
|
||||
if (!in_array($host,['fuuu.cloud','xn--123-9i9dj97q.com','hardnerd.net'],true)) return $tag;
|
||||
$tokens = ['sponsored','noopener'];
|
||||
if (preg_match('~\brel\s*=\s*([\x22\x27])(.*?)\1~i',$tag,$rel)) {
|
||||
$tokens = array_unique(array_merge(preg_split('/\s+/',trim($rel[2])),$tokens));
|
||||
return str_replace($rel[0],'rel="'.implode(' ',$tokens).'"',$tag);
|
||||
}
|
||||
return substr($tag,0,-1).' rel="'.implode(' ',$tokens).'">';
|
||||
}, $html);
|
||||
}
|
||||
public static function public(Articles $a): bool
|
||||
{
|
||||
return (int)$a->iStatus === 1 && $a->created_at && !$a->created_at->isFuture()
|
||||
&& $a->oCategory && (int)$a->oCategory->iStatus === 1
|
||||
&& (!$a->oCategory->iParentId || ($a->oCategory->oParent && (int)$a->oCategory->oParent->iStatus === 1));
|
||||
}
|
||||
public static function indexable(Articles $a): bool
|
||||
{
|
||||
if (!self::public($a) || in_array($a->sSeoPolicy, ['archive','noindex'], true)) return false;
|
||||
if ($a->sSeoPolicy === 'index') return true;
|
||||
// Legacy records retain their existing age policy; tutorials never inherit it.
|
||||
if (!in_array($a->oCategory->sSlug, ['freenode','shadowrocketids'])) return true;
|
||||
$days = (int)($a->oCategory->aOpt['noindexday'] ?? 0);
|
||||
return $days <= 0 || !$a->created_at->copy()->addDays($days)->isPast();
|
||||
}
|
||||
public static function modified(Articles $a): ?string
|
||||
{
|
||||
return $a->sContentUpdatedAt ? Carbon::parse($a->sContentUpdatedAt)->toAtomString() : null;
|
||||
}
|
||||
public static function page(Request $r): int
|
||||
{
|
||||
$raw = $r->query('page', '1');
|
||||
$keys = array_filter(explode('&', $r->server('QUERY_STRING', '')), fn($p) => urldecode(explode('=', $p, 2)[0]) === 'page');
|
||||
abort_if(count($keys) > 1 || !is_scalar($raw) || !preg_match('/\A[1-9][0-9]{0,5}\z/', (string)$raw), 404);
|
||||
return (int)$raw;
|
||||
}
|
||||
public static function articleMeta(Articles $a, bool $home = false): array
|
||||
{
|
||||
$canonical = $home ? self::url() : self::articleUrl($a);
|
||||
$title = $home ? config('seo.home_title') : self::text($a->sTitle, 250);
|
||||
$description = $home ? config('seo.home_description') : self::text($a->sTitleSub ?: $a->sContent);
|
||||
$schema = [['@context'=>'https://schema.org', '@type'=>$home ? 'WebSite' : 'Article',
|
||||
'name'=>$home ? config('seo.brand') : $title, 'url'=>$canonical]];
|
||||
if (!$home) {
|
||||
$schema[0] += ['headline'=>$title,'mainEntityOfPage'=>$canonical,'datePublished'=>$a->created_at->toAtomString(),
|
||||
'author'=>['@type'=>'Organization','name'=>config('seo.brand'),'url'=>self::url()]];
|
||||
if ($modified = self::modified($a)) $schema[0]['dateModified'] = $modified;
|
||||
if ($a->sThumb) $schema[0]['image'] = str_starts_with($a->sThumb, '/') ? self::url($a->sThumb) : $a->sThumb;
|
||||
$crumbs = [['name'=>'首页','item'=>self::url()]];
|
||||
if ($a->oCategory->oParent) $crumbs[] = ['name'=>self::categoryName($a->oCategory->oParent),'item'=>self::url(self::categoryPath($a->oCategory->oParent))];
|
||||
$crumbs[] = ['name'=>self::categoryName($a->oCategory),'item'=>self::url(self::categoryPath($a->oCategory))];
|
||||
$crumbs[] = ['name'=>$title,'item'=>$canonical];
|
||||
$schema[] = ['@context'=>'https://schema.org','@type'=>'BreadcrumbList','itemListElement'=>array_map(fn($c,$i)=>['@type'=>'ListItem','position'=>$i+1]+$c,$crumbs,array_keys($crumbs))];
|
||||
}
|
||||
return ['title'=>$title.' - '.config('seo.brand'),'heading'=>$title,'description'=>$description,'canonical'=>$canonical,
|
||||
'robots'=>$home || self::indexable($a) ? 'index, follow' : 'noindex, follow','type'=>$home ? 'website' : 'article','schema'=>$schema];
|
||||
}
|
||||
public static function listMeta(string $heading, string $description, string $path, int $page, bool $index = true): array
|
||||
{
|
||||
$url = self::url($path, $page);
|
||||
return ['heading'=>$heading, 'title'=>$heading.($page>1?' · 第'.$page.'页':'').' - '.config('seo.brand'),
|
||||
'description'=>self::text($description), 'canonical'=>$url, 'robots'=>$index?'index, follow':'noindex, follow',
|
||||
'schema'=>[['@context'=>'https://schema.org','@type'=>'CollectionPage','name'=>$heading,'url'=>$url]]];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
namespace App\Services;
|
||||
use App\Models\Articles;
|
||||
use App\Services\Editorial\IndexNowNotification;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
final class SeoNotifications
|
||||
{
|
||||
public function changed(Articles $a, bool $deleted = false): void
|
||||
{
|
||||
if (!Schema::hasTable('seo_notifications')) return;
|
||||
$urls = [];
|
||||
if ($deleted || !Seo::public($a)) $urls[] = Seo::articleUrl($a);
|
||||
elseif (Seo::indexable($a)) $urls[] = Seo::articleUrl($a);
|
||||
if ($a->oCategory?->sSlug === 'freenode') $urls[] = Seo::url();
|
||||
if ($a->oCategory) $urls[] = Seo::url(Seo::categoryPath($a->oCategory));
|
||||
$event = $deleted || !Seo::public($a) ? 'delete' : 'update';
|
||||
$key = hash('sha256',json_encode([$a->id,$event,$a->sContentUpdatedAt,$a->sTitle,$a->sContent,$a->sThumb,$a->iStatus]));
|
||||
$this->enqueue($key,$urls,$event);
|
||||
}
|
||||
public function enqueue(string $key, array $urls, string $event = 'update'): void
|
||||
{
|
||||
if (!app()->environment(['production','testing']) || !config('editorial.indexnow_enabled',app()->environment('production'))) return;
|
||||
DB::table('seo_notifications')->insertOrIgnore(['event_key'=>$key,'urls'=>json_encode(array_values(array_unique($urls))),
|
||||
'event'=>$event,'state'=>json_encode(['status'=>'pending','attempts'=>0]),'created_at'=>now(),'updated_at'=>now()]);
|
||||
}
|
||||
public function retry(int $limit = 10): int
|
||||
{
|
||||
$processed = 0;
|
||||
foreach (DB::table('seo_notifications')->orderBy('id')->cursor() as $candidate) {
|
||||
$s = json_decode($candidate->state,true);
|
||||
if (($s['status'] ?? '') !== 'pending' || ($s['next_attempt_at'] ?? 0) > now()->timestamp) continue;
|
||||
DB::transaction(function () use ($candidate,&$processed) {
|
||||
$row = DB::table('seo_notifications')->where('id',$candidate->id)->lockForUpdate()->first();
|
||||
$state = json_decode($row->state,true);
|
||||
if (($state['status'] ?? '') !== 'pending' || ($state['next_attempt_at'] ?? 0) > now()->timestamp) return;
|
||||
$urls = json_decode($row->urls,true);
|
||||
if ($row->event !== 'delete') $urls = array_values(array_filter($urls,function($url) {
|
||||
$path = parse_url($url,PHP_URL_PATH);
|
||||
if (preg_match('~^/a/([a-zA-Z0-9_-]+)\.html$~',$path,$m)) {
|
||||
$a = Articles::where('sSlug',$m[1])->first(); return $a && Seo::indexable($a);
|
||||
}
|
||||
if ($path === '/') return app(ArticlesService::class)->getLatestFreeNodeSlug() !== null;
|
||||
return true;
|
||||
}));
|
||||
$state = app(IndexNowNotification::class)->submit($state,$urls);
|
||||
DB::table('seo_notifications')->where('id',$row->id)->update(['state'=>json_encode($state),'updated_at'=>now()]);
|
||||
$processed++;
|
||||
});
|
||||
if ($processed >= $limit) break;
|
||||
}
|
||||
return $processed;
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@
|
||||
health: '/up',
|
||||
)
|
||||
->withMiddleware(function (Middleware $middleware) {
|
||||
$middleware->append(\App\Http\Middleware\SeoHeaders::class);
|
||||
$middleware->prepend(\Spatie\ResponseCache\Middlewares\CacheResponse::class);
|
||||
$middleware->alias([
|
||||
'doCache' => \Spatie\ResponseCache\Middlewares\CacheResponse::class,
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'dpl' => [
|
||||
'enabled' => env('DPL_AD_ENABLED', true),
|
||||
'url' => 'https://dp-link.net/',
|
||||
],
|
||||
'hn' => [
|
||||
'enabled' => env('HN_AD_ENABLED', true),
|
||||
'url' => env('HN_AD_URL', 'https://hardnerd.net/'),
|
||||
'url' => env('HN_AD_URL', env('APP_ENV', 'production') === 'local' ? 'http://hn.loc/' : 'https://hardnerd.net/'),
|
||||
],
|
||||
'fuc' => [
|
||||
'enabled' => env('FUC_AD_ENABLED', true),
|
||||
'url' => env('FUC_AD_URL', 'https://xn--123-9i9dj97q.com/'),
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'enabled' => env('AIRPORT_RECOMMENDATIONS_ENABLED', true),
|
||||
'anchor' => 'airport-recommendations',
|
||||
// User-supplied commercial copy. Edit here once, then clear config/response caches.
|
||||
'providers' => [
|
||||
'fuc' => [
|
||||
'enabled' => true, 'order' => 10, 'name' => '福云', 'tagline' => '日常之选',
|
||||
'url' => env('AIRPORT_FUC_URL', 'https://xn--123-9i9dj97q.com/'),
|
||||
'price' => '18', 'period' => '元 / 月',
|
||||
'features' => ['流媒体解锁', 'AI 解锁'],
|
||||
'description' => '老牌机场,套餐性价比高,适合日常娱乐办公',
|
||||
'coupon' => 'clashfreenode.com', 'discount' => '9 折',
|
||||
],
|
||||
'dpl' => [
|
||||
'enabled' => true, 'order' => 20, 'name' => 'DP-LINK.NET', 'tagline' => '专线服务',
|
||||
'url' => env('AIRPORT_DPL_URL', 'https://dp-link.net/'),
|
||||
'price' => '26', 'period' => '元 / 月',
|
||||
'features' => ['流媒体解锁', 'AI 解锁'],
|
||||
'description' => '专线机场,适合对网络质量有要求的用户',
|
||||
'coupon' => 'clashfreenode.com', 'discount' => '9 折',
|
||||
],
|
||||
'hn' => [
|
||||
'enabled' => true, 'order' => 30, 'name' => 'hardnerd', 'tagline' => '灵活套餐',
|
||||
'url' => env('AIRPORT_HN_URL', 'https://hardnerd.net/'),
|
||||
'price' => '28', 'period' => '元 / 月',
|
||||
'features' => ['流媒体解锁', 'AI 解锁'],
|
||||
'description' => '专线机场,适合对网络质量有要求的用户,有一次性套餐',
|
||||
'coupon' => 'clashfreenode.com', 'discount' => '9 折',
|
||||
],
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'telegram_url' => env('COMMUNITY_TELEGRAM_URL', 'https://t.me/clashfreenode'),
|
||||
];
|
||||
@@ -7,4 +7,5 @@
|
||||
'preview_minutes' => 30,
|
||||
'max_batch' => 10,
|
||||
'search_index' => env('EDITORIAL_SEARCH_INDEX', env('APP_ENV') === 'local' ? 'fna_v3_articles' : null),
|
||||
'indexnow_enabled' => env('EDITORIAL_INDEXNOW_ENABLED', env('APP_ENV') === 'production'),
|
||||
];
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
return [
|
||||
'brand' => env('SEO_BRAND', env('site_code_short') === 'cfn' ? 'ClashFreeNode' : env('APP_NAME', '网站')),
|
||||
'home_title' => env('SEO_HOME_TITLE', '免费节点与订阅使用指南'),
|
||||
'home_description' => '获取最近更新的免费节点与订阅,查看 Clash、V2ray 客户端入门教程和连接排错指南。资源状态随时间和网络环境变化。',
|
||||
'page_size' => env('page_limit', 10),
|
||||
];
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
return new class extends Migration {
|
||||
public function up(): void {
|
||||
Schema::table('articles', function (Blueprint $t) {
|
||||
$t->timestamp('sContentUpdatedAt')->nullable();
|
||||
$t->string('sSeoPolicy', 24)->nullable();
|
||||
$t->string('sResourceStatus', 24)->nullable();
|
||||
$t->unsignedInteger('iResourceCount')->nullable();
|
||||
});
|
||||
Schema::create('seo_notifications', function (Blueprint $t) {
|
||||
$t->id(); $t->string('event_key', 64)->unique(); $t->text('urls');
|
||||
$t->string('event', 16); $t->text('state'); $t->timestamps();
|
||||
});
|
||||
}
|
||||
public function down(): void {
|
||||
Schema::dropIfExists('seo_notifications');
|
||||
Schema::table('articles', fn (Blueprint $t) => $t->dropColumn(['sContentUpdatedAt','sSeoPolicy','sResourceStatus','iResourceCount']));
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,5 @@
|
||||
# 2026-10-31矮版广告素材
|
||||
|
||||
李响制作、用户确认的三张最终素材及完整提示词。正式展示只使用assets.json登记的最终PNG;本地中间迭代图不作为生产候选。
|
||||
|
||||
固定广告位3.675:1、cover取景,福云center 40%。每次打开随机选一张,候选在template中,活动DOM只加载选中的一张;没有新增接口或轮播。原旧图保留用于恢复,不在同页叠加。
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"dpl": {
|
||||
"path": "public/images/ads/dpl-ad-compact-wordmark-20261031.png",
|
||||
"width": 2169,
|
||||
"height": 725,
|
||||
"sha256": "c0742c8f7102ea2ebb70feea5caa9113ef032df54e2ab9d9097d797a5a12e92b"
|
||||
},
|
||||
"hn": {
|
||||
"path": "public/images/ads/hn-ad-compact-lowercase-20261031.png",
|
||||
"width": 2021,
|
||||
"height": 778,
|
||||
"sha256": "6b1d981d4fe461d5f7a00f3f0ad79cad3ea92b767ddb13b5fd4acb1c9cb022ff"
|
||||
},
|
||||
"fuc": {
|
||||
"path": "public/images/ads/fuc-ad-compact-five-years-20261031.png",
|
||||
"width": 2141,
|
||||
"height": 734,
|
||||
"sha256": "48e26721e3d05f9e7ebedf8e08d182aad2b0f5f8e656f2d8a09122053692f045"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
Use case: ads-marketing, identity-preserving redesign. Reference image: existing approved DPL advertisement, brand identity/style reference only. Create a NEW COMPOSITION for an EXTRA WIDE SHORT horizontal banner, exact target 1962x534 pixels, aspect ratio 3.674:1. This is NOT a smaller copy of the tall original and NOT original art centered with empty side gutters. Design natively to fill every edge of this short wide canvas. Preserve exact blue rounded DPL mark with white layered signal lines and DPL letters, dark navy blue grid background, blue/purple cyan gradient headline, subtle orbital network globe. Redesign layout: small DPL brand upper left, readable medium large headline below and a restrained short supporting line, compact blue CTA integrated lower left. Right half: simplified three slim floating network region cards with tiny flags and bars, arranged laterally in a shallow diagonal, not vertically stacked tall. Text EXACT: "DPL", "畅连全球网络", "日常访问 · 远程办公 · 在线娱乐", "查看套餐", and on cards "美国 · US", "日本 · JP", "香港 · HK". Tiny gray "广告" upper right. No numeric promises or extra text. Refined visual hierarchy: main headline about66px at1962wide; secondary32px; CTA32px. Strong whitespace without huge logo or giant headline. All elements comfortably within534pxheight, no cropping, no stretching, no mockup frame. Full-bleed native wide banner with well-balanced optical composition.
|
||||
@@ -0,0 +1 @@
|
||||
Use case: text-localization. Edit the provided existing DPL compact horizontal advertisement. Change ONLY the small white brand wordmark beside the blue logo in the upper left from "DPL" to EXACT uppercase "DP-LINK.NET". Keep its height and clean sans serif font weight similar to the existing DPL text; extend the wordmark naturally to the right with refined tight optical kerning and balanced icon-to-text gap. Preserve the blue logo icon EXACTLY. Preserve every other pixel/compositional element as closely as possible: wide aspect ratio, dark navy grid, globe, region cards, gradients, headline "畅连全球网络", subtitle "日常访问 · 远程办公 · 在线娱乐", button "查看套餐", tiny 广告. No other wording changes. Do not redesign, enlarge, move or crop anything else. The replacement wordmark must read D P hyphen L I N K dot N E T: "DP-LINK.NET".
|
||||
@@ -0,0 +1 @@
|
||||
Use case: text-localization. Edit the supplied existing FUC purple rocket advertisement. Replace ONLY the large white headline "全球网络中继服务" with EXACT "全球网络加速". Replace ONLY the smaller lavender subtitle "随时随处,尽情使用" with EXACT "五年稳定运营". Keep headline and subtitle left aligned with the same existing left edge, approximately same font size and weight as their respective old lines, retaining natural refined character spacing instead of stretching the shorter phrases to fill the previous width. Preserve existing logo and 福云 wordmark EXACTLY, deep purple starry background, rocket, planets, orbital curves, white 开始使用 button with arrow, tiny 广告 top-right, all positions and original wide canvas. No other wording or visual changes. Exact Chinese text is mandatory: 全球网络加速 / 五年稳定运营.
|
||||
@@ -0,0 +1 @@
|
||||
Use case: ads-marketing. Input1: CURRENT FUC homepage screenshot, visual-style reference ONLY, not a composition to crop or reuse. Input2: current official FUC continuous-cloud purple logo, brand mark reference, reproduce its distinctive exact loop/cloud shape; no giant 福 character. Design a NEW polished short extra-wide FUC display advertisement, target1962x534px, aspect3.674:1. Full-bleed deep royal purple #3e269d background, restrained violet/magenta orbital curves and sparse tiny stars, inspired by CURRENT homepage. Left quarter: tasteful official purple cloud mark paired with WHITE Chinese wordmark "福云" at restrained size, enough contrast. Middle-left/main area: readable bold WHITE exact headline "全球网络中继服务"; below smaller muted lavender exact subtitle "随时随处,尽情使用". Lower-left small refined white rounded pill CTA with purple exact text "开始使用" and a small right arrow. Right third: sophisticated minimal purple rocket/orbital illustration with soft magenta planet glow and flowing curved paths, not childish clipart, modest supporting scale. Allow strong clean negative space. Tiny light lavender "广告" upper right. Do NOT use old huge 福 glyph, white/lilac background, Netflix/video stills, platform trademarks, UI navbar or page chrome. No pricing, speed claims, numbers or extra text. Careful typography and compact horizontal hierarchy that belongs to a534px tall canvas. Not a scaled down tall ad, no side padding gutters or outer borders. Native full-width short banner.
|
||||
@@ -0,0 +1 @@
|
||||
Use case: text-localization and typography refinement. Edit this existing compact HN advertisement. Preserve exact H/lime-glasses icon, dark charcoal background, teal and violet glows, wide canvas and all Chinese wording. Change brand wordmark to EXACT all lowercase "hardnerd" (lowercase h, not capital H). Enlarge this gradient brand WORDMARK by about18 percent compared with current, keeping icon roughly current size and optically aligned beside wordmark; brand group centered. Shrink lower white Chinese tagline by about20 percent: exact "硬核架构,品质专线,全球网络畅通无阻". Increase clear vertical gap between brand row and tagline from current roughly50px to about95px at original2021px width. Put brand row around y300, tagline around y475; center the overall two-row composition. Refined restrained natural letter spacing, tagline on one line, no exaggerated tracking. Preserve plenty of safe space within central2021x550 visible banner crop; all main content stays within y180..570. Keep tiny gray 广告 upper right, no other text or graphics. Do not change the icon design. No CTA. Main requested changes only: brand larger and lowercase, tagline smaller, more space between rows.
|
||||
@@ -0,0 +1 @@
|
||||
Use case: ads-marketing, identity-preserving redesign. Reference image: current Hardnerd advertisement, brand style/logo/text reference only. Create a NEW native extra-wide short banner 1962x534px, aspect ratio3.674:1. Do not scale down the tall old advertisement or letterbox it. Fill full canvas edge-to-edge with charcoal black, restrained teal glow left and violet glow right. Preserve EXACT H lime-glasses icon and gradient wordmark "Hardnerd" with capital H, original brand forms. Recompose using generous horizontal room: cohesive brand group centered around x981 y210, width about650px, icon balanced approximately95pxheight, wordmark about88px high. Below at y350 put the exact white tagline on one line "硬核架构,品质专线,全球网络畅通无阻", around42px font with subtle restrained natural tracking, not exaggerated wide character spacing. Tiny understated gray "广告" upper right. Keep whole group visually centered with balanced top/bottom margins, enough gap between brand and tagline. Only these texts. No green footer, no button or CTA, no shine or overly dramatic effects, no frame. Mature premium quiet typography designed for this exact short wide canvas, crisp legible Chinese and consistent brand proportions.
|
||||
@@ -8,6 +8,8 @@ # AI 写作与文章关联索引
|
||||
|
||||
本文是写作流程、文章用途及文章关系的唯一维护入口。文章正文保存在各自源文件,数据库是页面实际读取的内容;栏目实现、渲染与备份方法见[教程维护](../maintenance/TUTORIALS.md),SEO项目状态见[SEO清单](../maintenance/SEO_PLAN.md)。不要在这些文档中再复制一份持续更新的文章关系表。
|
||||
|
||||
2026-10-31新增[统一机场推荐模块](../maintenance/AIRPORT_RECOMMENDATIONS.md):入门/综合教程自动在末尾展示,综合教程由展示层补入文内跳转;不要在正文源重复维护机场价格、地址和优惠码,也不要创建同名airport-recommendations锚点。已随[界面发布](../maintenance/UI_RELEASE_2026-10-31.md)上线。
|
||||
|
||||
## 1 写作前先确定读者要完成的任务
|
||||
|
||||
- 入门教程:以第一次使用为前提,讲准备、下载、安装、配置、使用和基本排错。不要把客户端迁移作为普通入门教程的主线。
|
||||
@@ -65,11 +67,16 @@ ## 2 当前文章登记
|
||||
| cfw-mac-legacy | 210 / Mac | Clash Verge Rev 使用教程:Mac 安装、订阅与系统代理 | `/a/m173.html` | [verge-mac.md](tutorials/verge-mac.md);本地API版本2 | Mac操作入口;#install DMG安装,#import 订阅,系统代理与退出排错;无设备联网实测 |
|
||||
| cfw-linux-legacy | 211 / Linux | Clash Verge Rev 使用教程:Linux 安装、订阅与代理设置 | `/a/m174.html` | [verge-linux.md](tutorials/verge-linux.md);本地API版本5 | Linux桌面入门;#install 包格式与架构,#import 订阅,#terminal 单条curl代理验证;不适用于无桌面的服务器 |
|
||||
| system-proxy-vs-tun | 365 / 综合教程 | 系统代理和 TUN 有什么区别?接管范围、使用选择与排错 | `/a/system-proxy-vs-tun.html` | [system-proxy-tun.md](tutorials/system-proxy-tun.md);本地API版本1 | 桌面代理接管与出口选择;`#choose` 场景选择、`#switch` 切换检查、`#troubleshoot` 排错;三张流程图 |
|
||||
| clash-routing-modes | 366 / 综合教程 | Clash 规则、全局和直连怎么选?代理组与分流排错教程 | `/a/clash-rule-global-direct.html` | [clash-routing-modes.md](tutorials/clash-routing-modes.md);2026-10-31本地ID366/版本1,正式ID382/版本1已发布 | 模式选择与代理组分流;`#groups` 组内选择、`#custom` 添加规则、`#verify` 验证新连接 |
|
||||
|
||||
这里只登记长期编辑内容及值得复用的稳定资源说明,不逐条收录日更节点或账号文章。稳定入口为 `/freenode`(公开免费节点)、`/client`(入门)、`/advanced`(综合教程);平台入口和名称修改另按项目路由核对,不从名称自行拼接。
|
||||
2026-10-31新教程正式ID382/版本1、本地ID366/版本1已发表;系统代理/TUN正文补入口后两环境均为API版本2(正式ID376、本地ID365)。正式发布时间14:58:28北京时间,IndexNow由VPS-003提交返回200,服务器HTTP与图哈希/锚点验收通过。唯一状态与恢复记录见[规则模式教程发布记录](../maintenance/ROUTING_MODES_2026-10-31.md)。
|
||||
|
||||
这里只登记长期编辑内容及值得复用的稳定资源说明,不逐条收录日更节点或账号文章。稳定入口为 `/`(当前免费节点)、`/freenode`(历史分享归档)、`/client`(入门)、`/advanced`(综合教程);平台入口和名称修改另按项目路由核对,不从名称自行拼接。
|
||||
|
||||
2026-10-29部署边界更新:上表10篇已通过本站API迁移到独立test并经用户确认后切到正式cfn,旧URL保留;生产发布以预览实际正文冻结再发布,未用test整库覆盖。test和生产的临时编辑密钥均在迁移后删除,接口默认关闭;后续本地写作继续使用本地API,正式编辑按明确任务与生产绑定启用。实际部署及验收统一见[发布记录](../maintenance/RELEASE_PREFLIGHT_2026-10-28.md#正式切换2026-10-29),上表ID仍为本地ID。
|
||||
|
||||
2026-10-31 SEO发布后,新稿获取当前免费资源优先链接 `/`;需要历史记录时链接 `/freenode`。下表保留旧文实际内链事实,旧栏目仍正常可用,不因入口规则变化虚报旧文正文已改;后续相关编辑时按内容用途维护。
|
||||
|
||||
## 3 已有文章关系
|
||||
|
||||
以下为2026-10-28从本地数据库正文提取并核对源文件的**实际内链**,不是建议列表。箭头表示正文中有从来源到目标的链接;入向关系从本表反查,不另存一份容易失步的反向清单。
|
||||
@@ -105,6 +112,10 @@ ## 3 已有文章关系
|
||||
| system-proxy-vs-tun | cfw-mac-legacy `#enable` | 切换前完成 Mac 基本连接 | 已在本地正文实现 |
|
||||
| system-proxy-vs-tun | cfw-linux-legacy `#connect` / `#terminal` | Linux 基础连接及单条命令显式代理 | 已在本地正文实现 |
|
||||
| system-proxy-vs-tun | mihomo-dns `#dns-2` | 继续检查 DNS 接管、加密和出口 | 已在本地正文实现 |
|
||||
| system-proxy-vs-tun | clash-routing-modes `#groups` | 已接管但走错出口时检查规则和代理组;放在场景选择之前 | 2026-10-31本地与正式已发布 |
|
||||
| clash-routing-modes | verge-windows-start `#enable` / cfw-mac-legacy `#enable` | 尚未完成基本连接时返回对应平台操作 | 2026-10-31本地与正式已发布 |
|
||||
| clash-routing-modes | system-proxy-vs-tun `#routing` / `#troubleshoot` | 解释接管和分流的区别,以及看不到连接时排错 | 2026-10-31本地与正式已发布 |
|
||||
| clash-routing-modes | mihomo-dns `#dns-2` | 出口正确但域名解析仍异常时继续查DNS | 2026-10-31本地与正式已发布 |
|
||||
|
||||
两篇Android教程通过订阅格式段落互链;Mac下载指南与操作教程互链,Linux从下载指南和真实Linux栏目获得入口,iOS沿用真实iOS栏目入口。系统代理与TUN专题由Windows和DNS正文提供入口,并指向三平台的基础操作及DNS专题。目录、标签、导航和热门榜不算正文关联;正文内链及锚点已经本地HTTP验证。
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# 规则、全局与直连配图
|
||||
|
||||
原生 SVG 为可编辑源,PNG 为文章 API 上传用图;未使用外部截图。封面沿用 system-proxy-tun-cover.svg 的现有样式;正文两图分别表达路由模式与代理组选择路径。
|
||||
|
||||
- `cover.svg` / `cover.png`:960×540。
|
||||
- `modes.svg` / `modes.png`:1000×670。
|
||||
- `groups.svg` / `groups.png`:1000×610。
|
||||
|
||||
正文源:../../clash-routing-modes.md。技术图使用本机 Chrome 在禁网页面渲染,正式展示副本通过文章资产 API 发布。制作/发布记录见 ../../../../maintenance/ROUTING_MODES_2026-10-31.md。
|
||||
|
After Width: | Height: | Size: 26 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="960" height="540" viewBox="0 0 960 540"><rect width="960" height="540" fill="#eaf2f7"/><rect x="55" y="62" width="6" height="412" fill="#347c99"/><g font-family="Arial, PingFang SC, Microsoft YaHei, sans-serif"><text x="97" y="130" font-size="24" fill="#47748a" letter-spacing="3">代理设置 · 综合教程</text><text x="97" y="265" font-size="51" fill="#18394d" font-weight="700">规则、全局与直连</text><text x="100" y="327" font-size="30" fill="#547084">分流模式 · 代理组 · 连接验证</text><path d="M100 403H725" stroke="#92b6c9" stroke-width="3"/><circle cx="100" cy="403" r="9" fill="#347c99"/><circle cx="410" cy="403" r="9" fill="#347c99"/><circle cx="725" cy="403" r="9" fill="#347c99"/></g></svg>
|
||||
|
After Width: | Height: | Size: 775 B |
|
After Width: | Height: | Size: 84 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1000" height="610" viewBox="0 0 1000 610"><rect width="1000" height="610" rx="20" fill="#f0f5f7"/><g font-family="PingFang SC, Microsoft YaHei, sans-serif"><text x="45" y="64" font-size="34" fill="#264658" font-weight="600">同一条影音规则,两种不同的组内选择</text><text x="45" y="115" font-size="29" fill="#264658" font-weight="600">情况一:影音组直接选择节点甲</text><rect x="45" y="145" width="275" height="95" rx="14" fill="#fff" stroke="#bed0d9"/><text x="69" y="204" font-size="30" fill="#264658" font-weight="600">影音规则</text><text x="326" y="204" font-size="29" fill="#264658" font-weight="400">→</text><rect x="363" y="145" width="275" height="95" rx="14" fill="#fff" stroke="#bed0d9"/><text x="387" y="204" font-size="30" fill="#264658" font-weight="600">影音组</text><text x="644" y="204" font-size="29" fill="#264658" font-weight="400">→</text><rect x="681" y="145" width="275" height="95" rx="14" fill="#e3edf3" stroke="#bed0d9"/><text x="705" y="204" font-size="30" fill="#264658" font-weight="600">节点甲</text><text x="45" y="285" font-size="26" fill="#5d7380" font-weight="400">调整“节点选择”不会改变上面这条选择路径。</text><text x="45" y="345" font-size="29" fill="#264658" font-weight="600">情况二:影音组选择另一个代理组</text><rect x="45" y="375" width="195" height="95" rx="14" fill="#fff" stroke="#bed0d9"/><text x="69" y="434" font-size="30" fill="#264658" font-weight="600">影音规则</text><text x="246" y="434" font-size="29" fill="#264658" font-weight="400">→</text><rect x="283" y="375" width="195" height="95" rx="14" fill="#fff" stroke="#bed0d9"/><text x="307" y="434" font-size="30" fill="#264658" font-weight="600">影音组</text><text x="484" y="434" font-size="29" fill="#264658" font-weight="400">→</text><rect x="521" y="375" width="195" height="95" rx="14" fill="#fff" stroke="#bed0d9"/><text x="545" y="434" font-size="30" fill="#264658" font-weight="600">节点选择</text><text x="722" y="434" font-size="29" fill="#264658" font-weight="400">→</text><rect x="759" y="375" width="195" height="95" rx="14" fill="#e3edf3" stroke="#bed0d9"/><text x="783" y="434" font-size="30" fill="#264658" font-weight="600">节点乙</text><text x="45" y="515" font-size="26" fill="#5d7380" font-weight="400">此时调整“节点选择”,才会影响影音连接的后续出口。</text><text x="45" y="571" font-size="26" fill="#5d7380" font-weight="400">示意组名:请以自己的配置与新连接详情为准。</text></g></svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 75 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1000" height="670" viewBox="0 0 1000 670"><rect width="1000" height="670" rx="20" fill="#f0f5f7"/><g font-family="PingFang SC, Microsoft YaHei, sans-serif"><text x="45" y="64" font-size="34" fill="#264658" font-weight="600">模式决定:已进入客户端的连接怎样出去</text><rect x="45" y="105" width="910" height="86" rx="14" fill="#fff" stroke="#bed0d9"/><text x="75" y="159" font-size="32" fill="#264658" font-weight="600">请求已进入 Mihomo</text><rect x="45" y="245" width="154" height="100" rx="14" fill="#e1ece8" stroke="#bed0d9"/><text x="87" y="306" font-size="32" fill="#264658" font-weight="600">规则</text><text x="214" y="306" font-size="32" fill="#264658" font-weight="400">→</text><rect x="265" y="245" width="330" height="100" rx="14" fill="#fff" stroke="#bed0d9"/><text x="290" y="305" font-size="29" fill="#264658" font-weight="400">匹配当前规则</text><text x="612" y="306" font-size="32" fill="#264658" font-weight="400">→</text><rect x="665" y="245" width="290" height="100" rx="14" fill="#fff" stroke="#bed0d9"/><text x="685" y="305" font-size="26" fill="#264658" font-weight="400">代理组 / 直连 / 拒绝</text><rect x="45" y="375" width="154" height="100" rx="14" fill="#e1eaf3" stroke="#bed0d9"/><text x="87" y="436" font-size="32" fill="#264658" font-weight="600">全局</text><text x="214" y="436" font-size="32" fill="#264658" font-weight="400">→</text><rect x="265" y="375" width="330" height="100" rx="14" fill="#fff" stroke="#bed0d9"/><text x="290" y="435" font-size="29" fill="#264658" font-weight="400">使用 GLOBAL 当前选择</text><text x="612" y="436" font-size="32" fill="#264658" font-weight="400">→</text><rect x="665" y="375" width="290" height="100" rx="14" fill="#fff" stroke="#bed0d9"/><text x="685" y="435" font-size="26" fill="#264658" font-weight="400">选中的节点或策略</text><rect x="45" y="505" width="154" height="100" rx="14" fill="#efe9df" stroke="#bed0d9"/><text x="87" y="566" font-size="32" fill="#264658" font-weight="600">直连</text><text x="214" y="566" font-size="32" fill="#264658" font-weight="400">→</text><rect x="265" y="505" width="330" height="100" rx="14" fill="#fff" stroke="#bed0d9"/><text x="290" y="565" font-size="29" fill="#264658" font-weight="400">使用本地网络</text><text x="612" y="566" font-size="32" fill="#264658" font-weight="400">→</text><rect x="665" y="505" width="290" height="100" rx="14" fill="#fff" stroke="#bed0d9"/><text x="685" y="565" font-size="26" fill="#264658" font-weight="400">直接连接目标</text><text x="45" y="645" font-size="26" fill="#5d7380" font-weight="400">未进入客户端的连接,不会仅因切换模式而被接管。</text></g></svg>
|
||||
|
After Width: | Height: | Size: 2.7 KiB |
@@ -0,0 +1 @@
|
||||
<link rel="stylesheet" href="/css/tutorials.css"><div class="tutorial-body"><p>同一个网站,规则模式打不开,切成全局却正常;明明选了新节点,连接记录里还是另一个名字。遇到这类问题,先看这条连接实际走了哪条规则、哪个代理组,再决定要改什么。</p><p>本文以 Clash Verge Rev 和 Mihomo 为例,讲清规则、全局、直连三个模式,并完成一次“只让指定网站走指定出口”的配置。还没有完成导入和首次连接,可以先看 <a href="/a/clash-verge-rev-windows.html#enable">Windows 入门教程</a>;Mac 用户可以从<a href="/a/m173.html#enable">对应操作步骤</a>开始。</p><nav class="guide-toc" aria-label="文章目录"><strong>阅读路线</strong><a href="#modes">三个模式怎么选</a><a href="#groups">为什么换节点没效果</a><a href="#order">规则先后顺序</a><a href="#custom">添加一条网站规则</a><a href="#verify">从连接记录验证</a><a href="#troubleshoot">按现象排查</a></nav><h2 id="modes">01 三个模式,改变的是出口选择</h2><p>先确定前提:请求已经进入了客户端。系统代理、应用自身代理设置和 TUN 负责把流量送进来,下面三个模式负责决定进去以后怎样处理。未被接管的应用,不会因为切到全局就自动经过客户端;接管方式见<a href="/a/system-proxy-vs-tun.html#routing">系统代理与 TUN 的区别</a>。</p><div class="table-wrap"><table><thead><tr><th>模式</th><th>进入客户端后的普通业务连接</th><th>适合什么时候用</th></tr></thead><tbody><tr><td>规则(Rule)</td><td>按当前配置匹配规则,选择直连、代理组或其他策略</td><td>日常分流:不同网站使用不同出口</td></tr><tr><td>全局(Global)</td><td>使用 GLOBAL 组当前选择的节点或策略</td><td>临时对比:判断问题是否与分流结果有关</td></tr><tr><td>直连(Direct)</td><td>由本地网络直接连接目标</td><td>临时检查本地网络,或不需要代理出口时</td></tr></tbody></table></div><p>这三个模式是路由选择,不是速度档位。全局也要检查 GLOBAL 组究竟选了什么:如果选的是 DIRECT,结果仍然是直连;如果选的是另一个代理组,还要继续看那个组的选择。<a href="https://wiki.metacubex.one/config/general/">Mihomo 运行模式说明</a></p><p>直连模式也不等于退出客户端:系统代理、TUN 等入口可能仍开启。要停用接管,需要处理对应开关,不能只把模式改成“直连”。<a href="https://www.clashverge.dev/guide/term.html">Clash Verge Rev 名词解释</a></p><figure class="guide-figure"><img src="/images/editorial/98a43bdd771dd4c6c5ec6b87bb5f0ebf679fa2b228dddbb764adecf50b0374e9.png" alt="请求进入客户端后,规则模式按规则分流,全局模式使用 GLOBAL 选择,直连模式使用本地网络" width="1000" height="670"><figcaption>图 1:模式作用于已进入客户端的连接;切模式不会补上接管范围的缺口。</figcaption></figure><h2 id="groups">02 换了节点没效果,可能换错了组</h2><p>代理页里有“节点选择”“流媒体”“自动选择”等分组时,不要把它们当成一排作用相同的开关。规则通常先指向一个组,组再选节点,也可能继续选另一个组。</p><p>例如,一份配置把视频网站分给“影音”,普通网页交给“节点选择”。你在“节点选择”里换成节点乙,但“影音”仍直接选着节点甲,视频连接就可能继续走甲。只有“影音”选择了“节点选择”这个组,它才会沿着这条选择关系继续向下找出口。</p><figure class="guide-figure"><img src="/images/editorial/417b203a4af30200b6ed3b37d0b0e823a9b47db49e2d743b1110b35329cc5de8.png" alt="规则命中影音组后,该组直接选择节点甲时不经过节点选择组;选择节点选择组时才跟随其中的节点乙" width="1000" height="610"><figcaption>图 2:两种配置的差别在于“影音”组的选择。组名只是配置中的名称,实际关系要查看当前选择。</figcaption></figure><p>手动选择组(<code>select</code>)由你决定使用哪个选项;如果它选择的是自动选择组(<code>url-test</code>),后者仍会按自己的测速配置选择节点。想固定到具体节点,就检查整条选择路径,而不是只看最外层的组名。<a href="https://wiki.metacubex.one/config/proxy-groups/select/">手动选择组</a>与<a href="https://wiki.metacubex.one/config/proxy-groups/url-test/">自动选择组</a></p><p>实际排查时,可以在连接详情里找策略、代理链或类似字段。不同界面展示顺序可能不同,重点是认出“命中了哪个组”和“最终使用哪个节点”。</p><h2 id="order">03 先看顺序,再看规则写得对不对</h2><p>Mihomo 的路由规则从上往下匹配。通常前面命中的规则就决定Line truncated
|
||||
@@ -0,0 +1,98 @@
|
||||
同一个网站,规则模式打不开,切成全局却正常;明明选了新节点,连接记录里还是另一个名字。遇到这类问题,先看这条连接实际走了哪条规则、哪个代理组,再决定要改什么。
|
||||
|
||||
本文以 Clash Verge Rev 和 Mihomo 为例,讲清规则、全局、直连三个模式,并完成一次“只让指定网站走指定出口”的配置。还没有完成导入和首次连接,可以先看 [Windows 入门教程](/a/clash-verge-rev-windows.html#enable);Mac 用户可以从[对应操作步骤](/a/m173.html#enable)开始。
|
||||
|
||||
<nav class="guide-toc" aria-label="文章目录"><strong>阅读路线</strong><a href="#modes">三个模式怎么选</a><a href="#groups">为什么换节点没效果</a><a href="#order">规则先后顺序</a><a href="#custom">添加一条网站规则</a><a href="#verify">从连接记录验证</a><a href="#troubleshoot">按现象排查</a></nav>
|
||||
|
||||
<h2 id="modes">01 三个模式,改变的是出口选择</h2>
|
||||
|
||||
先确定前提:请求已经进入了客户端。系统代理、应用自身代理设置和 TUN 负责把流量送进来,下面三个模式负责决定进去以后怎样处理。未被接管的应用,不会因为切到全局就自动经过客户端;接管方式见[系统代理与 TUN 的区别](/a/system-proxy-vs-tun.html#routing)。
|
||||
|
||||
<div class="table-wrap">
|
||||
|
||||
| 模式 | 进入客户端后的普通业务连接 | 适合什么时候用 |
|
||||
| --- | --- | --- |
|
||||
| 规则(Rule) | 按当前配置匹配规则,选择直连、代理组或其他策略 | 日常分流:不同网站使用不同出口 |
|
||||
| 全局(Global) | 使用 GLOBAL 组当前选择的节点或策略 | 临时对比:判断问题是否与分流结果有关 |
|
||||
| 直连(Direct) | 由本地网络直接连接目标 | 临时检查本地网络,或不需要代理出口时 |
|
||||
|
||||
</div>
|
||||
|
||||
这三个模式是路由选择,不是速度档位。全局也要检查 GLOBAL 组究竟选了什么:如果选的是 DIRECT,结果仍然是直连;如果选的是另一个代理组,还要继续看那个组的选择。[Mihomo 运行模式说明](https://wiki.metacubex.one/config/general/)
|
||||
|
||||
直连模式也不等于退出客户端:系统代理、TUN 等入口可能仍开启。要停用接管,需要处理对应开关,不能只把模式改成“直连”。[Clash Verge Rev 名词解释](https://www.clashverge.dev/guide/term.html)
|
||||
|
||||
<figure class="guide-figure"><img src="/images/editorial/98a43bdd771dd4c6c5ec6b87bb5f0ebf679fa2b228dddbb764adecf50b0374e9.png" alt="请求进入客户端后,规则模式按规则分流,全局模式使用 GLOBAL 选择,直连模式使用本地网络" width="1000" height="670"><figcaption>图 1:模式作用于已进入客户端的连接;切模式不会补上接管范围的缺口。</figcaption></figure>
|
||||
|
||||
<h2 id="groups">02 换了节点没效果,可能换错了组</h2>
|
||||
|
||||
代理页里有“节点选择”“流媒体”“自动选择”等分组时,不要把它们当成一排作用相同的开关。规则通常先指向一个组,组再选节点,也可能继续选另一个组。
|
||||
|
||||
例如,一份配置把视频网站分给“影音”,普通网页交给“节点选择”。你在“节点选择”里换成节点乙,但“影音”仍直接选着节点甲,视频连接就可能继续走甲。只有“影音”选择了“节点选择”这个组,它才会沿着这条选择关系继续向下找出口。
|
||||
|
||||
<figure class="guide-figure"><img src="/images/editorial/417b203a4af30200b6ed3b37d0b0e823a9b47db49e2d743b1110b35329cc5de8.png" alt="规则命中影音组后,该组直接选择节点甲时不经过节点选择组;选择节点选择组时才跟随其中的节点乙" width="1000" height="610"><figcaption>图 2:两种配置的差别在于“影音”组的选择。组名只是配置中的名称,实际关系要查看当前选择。</figcaption></figure>
|
||||
|
||||
手动选择组(`select`)由你决定使用哪个选项;如果它选择的是自动选择组(`url-test`),后者仍会按自己的测速配置选择节点。想固定到具体节点,就检查整条选择路径,而不是只看最外层的组名。[手动选择组](https://wiki.metacubex.one/config/proxy-groups/select/)与[自动选择组](https://wiki.metacubex.one/config/proxy-groups/url-test/)
|
||||
|
||||
实际排查时,可以在连接详情里找策略、代理链或类似字段。不同界面展示顺序可能不同,重点是认出“命中了哪个组”和“最终使用哪个节点”。
|
||||
|
||||
<h2 id="order">03 先看顺序,再看规则写得对不对</h2>
|
||||
|
||||
Mihomo 的路由规则从上往下匹配。通常前面命中的规则就决定了后续策略,因此“更精确”不会自动获得更高优先级;精确规则如果排在已经覆盖它的规则之后,仍可能用不上。涉及 UDP 等条件时,还要注意目标策略是否具备相应支持。[路由规则与优先级](https://wiki.metacubex.one/config/rules/)
|
||||
|
||||
下面是用来理解顺序的片段,不是可以替换整个订阅的完整配置。`example.com` 是示例域名,“节点选择”必须换成你配置中真实存在的组名:
|
||||
|
||||
```yaml
|
||||
rules:
|
||||
- DOMAIN,video.example.com,节点选择
|
||||
- DOMAIN-SUFFIX,example.com,DIRECT
|
||||
- MATCH,节点选择
|
||||
```
|
||||
|
||||
在这个例子里,访问 `video.example.com` 先命中第一条,交给“节点选择”;访问 `docs.example.com` 则命中第二条,使用直连。如果把前两条交换,`video.example.com` 也会先被域名后缀规则接住。
|
||||
|
||||
`DOMAIN` 对应完整域名;`DOMAIN-SUFFIX` 对应该域名及其子域名。末尾的 `MATCH` 用于接住前面没有匹配到的连接。不要为了让某个网站使用节点,就在前面塞一条覆盖所有连接的 MATCH:那会让后面的分流规则失去机会。
|
||||
|
||||
<h2 id="custom">04 在 Verge Rev 里给一个网站添加规则</h2>
|
||||
|
||||
先选一个你确实需要调整的网站。例如,某个域名在当前网络下直连不通,而你已有能访问它的节点。只改这一项,验证后再扩展范围。
|
||||
|
||||
1. 在“订阅”页面找到**正在使用的配置**,右键选择“编辑规则”。这里维护的是该订阅的自定义规则,可以保留在后续订阅更新中。
|
||||
2. 新增规则,类型先选 `DOMAIN`,内容填写连接记录里的完整主机名,例如 `video.example.com`。不要填 `https://`、路径或整个网页地址。
|
||||
3. 代理策略选择当前配置中实际存在的代理组;需要直连时选 DIRECT,需要使用节点时选相应的组,并确认组内选择。
|
||||
4. 需要覆盖订阅中已有的分流结果时,放入**前置规则**,同时检查前面是否还有会先命中的自定义项。不要把它追加在已兜底的 MATCH 后面。
|
||||
5. 保存并确认没有配置错误,保持规则模式,然后让目标应用重新发起连接。
|
||||
|
||||
界面入口与前置/后置规则的含义可参考 [Verge Rev 自定义规则](https://www.clashverge.dev/guide/rules.html)。这与直接改下载下来的订阅正文不同;后者可能被下一次更新覆盖。
|
||||
|
||||
一个网页可能同时访问登录、图片、视频和接口等多个域名。添加主站域名后页面只恢复了一部分,先查看失败连接,再补真正需要的域名。不要因为一个资源加载失败,就直接扩大成整类域名、全部应用或全部流量。
|
||||
|
||||
<h2 id="verify">05 改完以后,检查一条新连接</h2>
|
||||
|
||||
验证时保持订阅、模式和接管方式稳定,只调整刚才那条规则或对应组的选择。打开“连接”页面,清除筛选,重新访问目标内容,找到刚建立的连接,逐项检查:
|
||||
|
||||
- **目标是否相同:** 看实际域名或 IP,而不是只认浏览器标签页上的网站名。
|
||||
- **规则是否符合预期:** 有没有命中新加的规则,还是先被另一条规则或规则集处理。
|
||||
- **策略是否正确:** 命中的组是否是你刚才修改的组,组内有没有继续指向其他组或 DIRECT。
|
||||
- **应用是否恢复:** 出口符合预期以后,再验证原先失败的操作,例如播放、登录或下载。
|
||||
|
||||
已有长连接不适合作为换规则、换节点后的唯一观察对象。可优先重连目标应用,或只关闭相关连接后重新测试;直接清空所有连接会影响其他正在使用的程序。
|
||||
|
||||
如果仍无法区分,可以做一次有控制的对比:记录当前设置,在全局模式中选择**同一个明确的节点**,重新建立目标连接。全局可用、规则模式不可用,提示你继续查分流和代理组;它并不能单独证明某一条规则错误,因为模式变化也可能影响其他配置行为。对比后切回规则模式,修正具体目标。
|
||||
|
||||
<h2 id="troubleshoot">06 几种常见现象,对应查哪里</h2>
|
||||
|
||||
<div class="table-wrap">
|
||||
|
||||
| 现象 | 下一步检查 |
|
||||
| --- | --- |
|
||||
| 换了节点,目标连接仍走旧节点 | 是否改错代理组、组里还有嵌套选择,以及观察的是否为旧连接 |
|
||||
| 明明加了代理规则,却显示 DIRECT | 当前模式、规则顺序、实际域名,以及命中组是否选了 DIRECT |
|
||||
| 全局能用,规则不能用 | 对比同一目标的新连接,确认规则模式的最终出口是否与全局相同 |
|
||||
| 网页文字出现了,图片或视频失败 | 找失败资源的域名与连接,逐项判断,不只给主站加规则 |
|
||||
| 完全找不到应用的连接记录 | 清除筛选、查看日志,再检查应用代理或 TUN 接管;规则还没到发挥作用的阶段 |
|
||||
| 订阅更新后又不对了 | 是否改了会被覆盖的订阅正文、当前配置是否切换、原代理组是否还存在 |
|
||||
|
||||
</div>
|
||||
|
||||
如果连接已经走了预期节点,但仍出现域名解析异常,继续检查 [DNS 接管、加密和出口](/a/mihomo-dns-leak.html#dns-2)。如果客户端根本看不到目标流量,则回到[系统代理与 TUN 的排查步骤](/a/system-proxy-vs-tun.html#troubleshoot)。先根据连接记录确定问题发生在哪一步,再动对应设置,通常比不断切换三个模式更有效。
|
||||
@@ -1 +1 @@
|
||||
<link rel="stylesheet" href="/css/tutorials.css"><div class="tutorial-body"><p>浏览器能打开网页,终端却一直超时;已经切到“全局”,游戏还是连不上;打开 TUN 后能用了,又担心所有网站都被送到国外。遇到这些情况,先分清两件事:<strong>流量有没有进入代理客户端,以及进入以后走哪个出口。</strong></p><p>系统代理和 TUN 主要解决第一件事,规则、全局和直连模式主要解决第二件事。本文以 Clash Verge Rev 和 Mihomo 桌面客户端为例,说明它们的区别、适用场景和检查方法。</p><nav class="guide-toc" aria-label="文章目录"><strong>阅读路线</strong><a href="#system-proxy">系统代理接管什么</a><a href="#tun">TUN 改变了什么</a><a href="#routing">为什么全局不等于全部</a><a href="#choose">应该用哪一种</a><a href="#switch">怎样切换和检查</a><a href="#troubleshoot">按现象排错</a><a href="#dns">DNS 还要单独看</a></nav><h2 id="system-proxy">01 系统代理:让应用按设置转交请求</h2><p>打开 Clash Verge Rev 的“系统代理”,客户端会修改操作系统的代理设置,把代理地址指向本机正在监听的端口。愿意读取并遵循这项设置的应用,就会把相应请求交给客户端处理。浏览器通常可以通过这种方式使用代理。<a href="https://www.clashverge.dev/guide/quickstart.html">官方快速入门</a></p><p>这里的关键是“应用遵循设置”。有的软件读取系统设置,有的软件使用自己的代理配置,还有的软件直接建立连接。同一台电脑上,浏览器正常、另一个应用不走代理,并不矛盾。</p><figure class="guide-diagram"><div class="diagram-label">图 1 · 系统代理依赖应用配合</div><div class="guide-flow"><div><b>应用读取设置</b><small>使用系统指定的代理</small></div><span aria-hidden="true">→</span><div><b>本机代理端口</b><small>请求进入 Mihomo</small></div><span aria-hidden="true">→</span><div><b>匹配出口</b><small>直连或代理节点</small></div></div><div class="guide-branch">不遵循系统代理的应用:仍按自己的网络设置连接,不会仅因这个开关而进入 Mihomo。</div><figcaption>这也解释了为什么“浏览器能用”不能代表电脑上每个应用都已经走代理。</figcaption></figure><p>如果应用提供 HTTP 或 SOCKS 代理选项,可以单独指向客户端的本机端口。地址通常是 <code>127.0.0.1</code>,端口应查看客户端当前设置,不要照抄别人的数字;HTTP、SOCKS 和混合端口也要对应正确。</p><p>终端工具同样需要看各自支持什么。以 Linux 上的 curl 为例,可以先用<a href="/a/m174.html#terminal">单条命令指定代理的方法</a>检查,不必为了一个工具马上接管整台电脑。</p><h2 id="tun">02 TUN:通过虚拟网卡接收流量</h2><p>TUN 会创建虚拟网络接口,并通过路由把符合接管条件的 IP 流量交给内核。应用不必先学会使用 HTTP 或 SOCKS 代理,因此它常用于系统代理无法覆盖的程序。Mihomo 可以处理通过 TUN 进入的 TCP、UDP 流量,但最终能否完成连接,还取决于配置、节点和目标服务。<a href="https://www.clashverge.dev/guide/term.html">官方名词解释</a></p><figure class="guide-diagram"><div class="diagram-label">图 2 · TUN 在网络路由这一层接管</div><div class="guide-flow"><div><b>应用发起连接</b><small>无需读取系统代理</small></div><span aria-hidden="true">→</span><div><b>系统路由 → TUN</b><small>进入虚拟网卡</small></div><span aria-hidden="true">→</span><div><b>Mihomo 处理</b><small>再决定实际出口</small></div></div><div class="guide-branch">被排除的地址、接口或其他未进入 TUN 的连接,仍可能走原来的网络路径。</div><figcaption>TUN 扩大了接管范围,但开关亮着不等于每一条连接都已被接管。</figcaption></figure><p>TUN 也有接管范围。自动路由、排除网段、IPv6 设置及其他 VPN 的路由,都可能影响实际路径。例如,把某个局域网网段排除在 TUN 之外,就是让它绕过这层接管;这与连接进入 Mihomo 后命中 <code>DIRECT</code> 规则不同。<a href="https://wiki.metacubex.one/config/inbound/tun/">Mihomo TUN 配置</a>、<a href="https://www.clashverge.dev/guide/bypass.html">代理绕过说明</a></p><p>日常使用图形客户端时,优先使用它提供的 TUN 设置。建立网卡和修改路由需要相应权限;Clash Verge Rev 的服务模式可让具有权限的后台服务启动内核,不代表必须一直以管理员身份运行整个界面。<a href="https://www.clashverge.dev/guide/term.html">服务模式说明</a></p><h2 id="routing">03 “全局”和 TUN 不是同一个维度</h2><p>把“规则”改成“全局”,改变的是进入内核后的出口选择。一个完全没有进入客Line truncated
|
||||
<link rel="stylesheet" href="/css/tutorials.css"><div class="tutorial-body"><p>浏览器能打开网页,终端却一直超时;已经切到“全局”,游戏还是连不上;打开 TUN 后能用了,又担心所有网站都被送到国外。遇到这些情况,先分清两件事:<strong>流量有没有进入代理客户端,以及进入以后走哪个出口。</strong></p><p>系统代理和 TUN 主要解决第一件事,规则、全局和直连模式主要解决第二件事。本文以 Clash Verge Rev 和 Mihomo 桌面客户端为例,说明它们的区别、适用场景和检查方法。</p><nav class="guide-toc" aria-label="文章目录"><strong>阅读路线</strong><a href="#system-proxy">系统代理接管什么</a><a href="#tun">TUN 改变了什么</a><a href="#routing">为什么全局不等于全部</a><a href="#choose">应该用哪一种</a><a href="#switch">怎样切换和检查</a><a href="#troubleshoot">按现象排错</a><a href="#dns">DNS 还要单独看</a></nav><h2 id="system-proxy">01 系统代理:让应用按设置转交请求</h2><p>打开 Clash Verge Rev 的“系统代理”,客户端会修改操作系统的代理设置,把代理地址指向本机正在监听的端口。愿意读取并遵循这项设置的应用,就会把相应请求交给客户端处理。浏览器通常可以通过这种方式使用代理。<a href="https://www.clashverge.dev/guide/quickstart.html">官方快速入门</a></p><p>这里的关键是“应用遵循设置”。有的软件读取系统设置,有的软件使用自己的代理配置,还有的软件直接建立连接。同一台电脑上,浏览器正常、另一个应用不走代理,并不矛盾。</p><figure class="guide-diagram"><div class="diagram-label">图 1 · 系统代理依赖应用配合</div><div class="guide-flow"><div><b>应用读取设置</b><small>使用系统指定的代理</small></div><span aria-hidden="true">→</span><div><b>本机代理端口</b><small>请求进入 Mihomo</small></div><span aria-hidden="true">→</span><div><b>匹配出口</b><small>直连或代理节点</small></div></div><div class="guide-branch">不遵循系统代理的应用:仍按自己的网络设置连接,不会仅因这个开关而进入 Mihomo。</div><figcaption>这也解释了为什么“浏览器能用”不能代表电脑上每个应用都已经走代理。</figcaption></figure><p>如果应用提供 HTTP 或 SOCKS 代理选项,可以单独指向客户端的本机端口。地址通常是 <code>127.0.0.1</code>,端口应查看客户端当前设置,不要照抄别人的数字;HTTP、SOCKS 和混合端口也要对应正确。</p><p>终端工具同样需要看各自支持什么。以 Linux 上的 curl 为例,可以先用<a href="/a/m174.html#terminal">单条命令指定代理的方法</a>检查,不必为了一个工具马上接管整台电脑。</p><h2 id="tun">02 TUN:通过虚拟网卡接收流量</h2><p>TUN 会创建虚拟网络接口,并通过路由把符合接管条件的 IP 流量交给内核。应用不必先学会使用 HTTP 或 SOCKS 代理,因此它常用于系统代理无法覆盖的程序。Mihomo 可以处理通过 TUN 进入的 TCP、UDP 流量,但最终能否完成连接,还取决于配置、节点和目标服务。<a href="https://www.clashverge.dev/guide/term.html">官方名词解释</a></p><figure class="guide-diagram"><div class="diagram-label">图 2 · TUN 在网络路由这一层接管</div><div class="guide-flow"><div><b>应用发起连接</b><small>无需读取系统代理</small></div><span aria-hidden="true">→</span><div><b>系统路由 → TUN</b><small>进入虚拟网卡</small></div><span aria-hidden="true">→</span><div><b>Mihomo 处理</b><small>再决定实际出口</small></div></div><div class="guide-branch">被排除的地址、接口或其他未进入 TUN 的连接,仍可能走原来的网络路径。</div><figcaption>TUN 扩大了接管范围,但开关亮着不等于每一条连接都已被接管。</figcaption></figure><p>TUN 也有接管范围。自动路由、排除网段、IPv6 设置及其他 VPN 的路由,都可能影响实际路径。例如,把某个局域网网段排除在 TUN 之外,就是让它绕过这层接管;这与连接进入 Mihomo 后命中 <code>DIRECT</code> 规则不同。<a href="https://wiki.metacubex.one/config/inbound/tun/">Mihomo TUN 配置</a>、<a href="https://www.clashverge.dev/guide/bypass.html">代理绕过说明</a></p><p>日常使用图形客户端时,优先使用它提供的 TUN 设置。建立网卡和修改路由需要相应权限;Clash Verge Rev 的服务模式可让具有权限的后台服务启动内核,不代表必须一直以管理员身份运行整个界面。<a href="https://www.clashverge.dev/guide/term.html">服务模式说明</a></p><h2 id="routing">03 “全局”和 TUN 不是同一个维度</h2><p>把“规则”改成“全局”,改变的是进入内核后的出口选择。一个完全没有进入客Line truncated
|
||||
@@ -43,6 +43,8 @@
|
||||
|
||||
一个具体例子:浏览器和下载工具访问同一域名,浏览器连接记录里显示了节点,下载工具却没有记录。此时应优先检查下载工具的代理设置或接管方式;反复切换全局,通常没有解决前面的缺口。
|
||||
|
||||
如果流量已经进入客户端,却仍走错节点,可以继续看[规则模式、代理组与实际出口的检查方法](/a/clash-rule-global-direct.html#groups),分清应该改哪一个组。
|
||||
|
||||
<h2 id="choose">04 按应用需求选择,不必一开始全部打开</h2>
|
||||
|
||||
| 你要完成的事 | 可以先这样做 |
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
# FNA_V3 文章推荐广告
|
||||
|
||||
**当前正式三张素材已更新**:用户要求补齐李响及全部相关改动后,最终compact三图、cover取景及广告标记已随[相关补齐发布](RELATED_RELEASE_2026-10-31.md)上线;HN九折配置保留。以下“仅本地/未发布”是原日期实施历史,上一批contain旧图方案已被本次正式版本替代。
|
||||
|
||||
## 当前实现
|
||||
|
||||
2026-10-31按用户新要求新增统一机场推荐表/手机卡片,本地覆盖资源正文旧福云推荐区及所有教程末尾。价格、网址、优惠码的唯一配置与验收见[统一机场推荐](AIRPORT_RECOMMENDATIONS.md)。未部署线上;下列整图广告保持原行为。
|
||||
|
||||
2026-10-31当前正式广告区已改为单张随机展示:DPL、HN、福云三张每次打开/刷新独立等概率选一张,允许连续重复。保留HN新版白字、旧福云侧栏撤除和TG图标。页面缓存保持原逻辑,随机在浏览器执行,不新增接口请求;三张候选存放原生template中,仅选中图片进入活动DOM并加载。详情及回退见本文“单张随机广告”。此前“DPL/FUC未发布”和多图堆叠仅描述历史状态。
|
||||
|
||||
2026-10-28新增FUC(福云)整图广告,顺序DPL→HN→FUC,三张上下各占一整行。FUC参考当前新版 `fuc-new.loc` 的静态源码:HomeController→index.tpl访客转auth/login;登录和用户区使用 `public/fucai192.png` 渐变紫色福字、Cool/Vuexy浅色界面及 `#7367f0` 紫色按钮。旧营销模板仅作“全球网络中继服务,随时随处尽情使用”文案来源。自动审批依据FUC AGENTS禁止运行真实配置Web入口而拒绝直接打开首页,本次未运行该入口或访问FUC线上;实际设计依据为只读模板/CSS/原始Logo。
|
||||
|
||||
图片 `public/images/ads/fuc-ad-site-style-20261028.png`(1962×801),内置image_gen生成;提示词 `codex/output/fuc-ad-site-style-20261028-prompt.txt`,Logo参考归档 `codex/output/fuc-logo-reference-20261028.png`。新增组件 `fuc-article-ad.blade.php`,汇总组件增加FUC显示判断;配置 `advertising.fuc.enabled/url`,支持 `FUC_AD_URL` 覆盖,默认采用GemDocs当前主站 `https://xn--123-9i9dj97q.com/`(福云123.com),不使用旧fuuu.cloud。无外部资源加载、无扫光,整图链接带sponsored/noopener/noreferrer和键盘焦点轮廓。
|
||||
|
||||
FNA_V3本地页面已验收三图加载、顺序和href;桌面各624×255、390px视口各322×131,无横向溢出。截图 `codex/output/fuc-site-style-preview-20261028.png`。未点击落地页,未改文章内旧福云文字、FUC源码/业务数据或线上配置,未提交、推送或部署。
|
||||
|
||||
2026-10-28用户认可DPL网站风格版,并要求HN同样参考网站重设计。本次只读查看 `http://hn.loc/` 当前EZ首页:深炭灰背景、柔和绿紫光晕、渐变品牌字及简洁居中构图。新版 `public/images/ads/hn-ad-site-style-20261028.png`(1962×802)通过内置image_gen参考首页截图和原广告图生成,保留无方框的眼镜H图形及Hardnerd首字母大写,采用首页文案“探索全球网络无限可能”和“了解 HN”。提示词 `codex/output/hn-ad-site-style-20261028-prompt.txt`,参考截图 `codex/output/hn-site-style-reference-20261028.png`;旧纯黑图保留供回退。当前先接入本地供用户看效果;本地实测两图均624×255、加载成功且无横向溢出,页面截图 `codex/output/hn-site-style-preview-20261028.png`;广告位、链接配置与无扫光行为不变,DPL已认可版不变。GemDocs当前HN档案已登记2026-10-27独立上线,旧文“域名停放”属于历史状态;本任务未访问生产,也未将本地广告默认链接改到线上。未提交、推送或部署。
|
||||
|
||||
2026-10-28当前DPL广告按用户要求参考DPL网站重新设计,替换不获认可的蓝白玻璃版。已现场只读查看 `http://dpl.loc/`,并核对 `xb/stellar/src/views/Landing.vue` 与 `landing.css`:深蓝黑底、蓝紫渐变标题、细网格、轨道与悬浮线路卡片。当前图片 `public/images/ads/dpl-ad-site-style-20261028.png`(1962×801),由内置image_gen以首页截图及正确Logo为参考生成;文案“畅连全球网络”“日常访问 · 远程办公 · 在线娱乐”“查看套餐”,线路卡仅显示地区与装饰信号,不带延迟/速度/在线率数字。完整提示词 `codex/output/dpl-ad-site-style-20261028-prompt.txt`,风格参考截图 `codex/output/dpl-site-style-reference-20261028.png`。原蓝白版保留但不再引用。整图链接、焦点轮廓及无扫光行为保留,DPL与HN继续上下满行2.45:1;本地624×255加载回读通过。效果截图 `codex/output/dpl-site-style-preview-20261028.png`。HN未改,DPL源站代码未改,未提交、推送或部署。
|
||||
|
||||
2026-10-27按用户最新要求,仅在文章正文(含免费订阅和使用提示)之后、标签之前保留场景推荐广告区;同日按后续要求增加 HN,与 DPL 共同展示。首页/列表顶部横幅和文章文末轻卡已移除,组件中不再保留这两种分支,样式同步精简。
|
||||
|
||||
当前首页控制器直接展示最新免费节点文章,因此首页也只在同一文章内位置展示该推荐区,不另设顶部广告;分类列表 `/freenode` 无广告组件。
|
||||
|
||||
保留的白色推荐卡缩小内边距、品牌标志、标题和按钮间距;标题取消强制换行,精简说明文字,移除“另一种连接选择”独立小标题。用户最终要求增加卡片高度而恢复之前字号:桌面标题20px、正文与按钮13px、品牌14px,手机标题18px;保留增加后的纵向留白,桌面内边距24px、品牌与标题间距22px、底部区域上间距24px/内边距18px。桌面实测高度约255px,无横向溢出。
|
||||
|
||||
- 模板:`resources/views/components/dpl-article-ad.blade.php`,由 `components/article-ads.blade.php` 汇总 DPL 与 HN,`resources/views/pages/articles/default/show.blade.php` 在正文后引入;同页 CSS 只加载一次。
|
||||
- 样式:`public/css/dpl-article-ad.css`,通过 Blade styles 栈加载,链接带文件修改时间版本以避免旧样式缓存;使用独立类名,适配现有 `nice-dark-mode`。
|
||||
- 品牌素材:`public/images/ads/dpl-logo.svg`,2026-10-27已更正为 DPL 当前源文件 `/Users/hellcat/Documents/GemCodes/xb/stellar/public/favicon.svg`(带三条信号线),与 DPL 前台/邮件使用的视觉一致。原广告误用了旧聊天输出 `2026-10-07/dp-link-net-logo-var-www/outputs/dpl-logo-approved-b-layer-echo/dpl-logo.svg` 中的历史候选,不能作为当前品牌来源;旧广告与该候选的 SHA-256 均为 `fba12420cb7eb84d49a0035a830bf8c3428c6c96908ba6b2e85f929107ae93cd`。现用源文件哈希 `2f94a1311ae15ec9a41681ff288411d9b3f67bbba54f26e5fd8b5c78026c1bff`,图片URL带修改时间,避免缓存旧图。以后从 DPL 品牌维护入口取图,不从旧设计输出取图。
|
||||
- 配置:`config/advertising.php`,`dpl.enabled` 控制显示,`dpl.url` 为 `https://dp-link.net/`。
|
||||
- 点击新窗口打开,链接带 `sponsored noopener noreferrer`。组件没有预加载、远程图片、统计脚本或价格/速度承诺。
|
||||
|
||||
## 本次验证
|
||||
|
||||
当前固定入口为 `http://fna-v3.loc/`。2026-10-27在文章 `/a/fn20261021.html` 回读确认推荐区有 DPL、HN 各一张广告,桌面与390px手机视口无溢出,当前截图在 `codex/output/dpl-original-fonts-taller-card.png`。刷新时临时阻止外部线上资源请求,验证后恢复浏览器原设置。原2026-10-21三款广告验收属于历史状态,不能当作当前投放。
|
||||
|
||||
未提交、推送或部署。未改 FN_B、NodeHub 或 DPL 代码及数据库。其他聊天已有修改保持原样。
|
||||
|
||||
## 调整与回退
|
||||
|
||||
停用可将 `config/advertising.php` 的 `dpl.enabled` 设为 `false`;如启用了配置缓存,按本地运行方式刷新对应缓存。完全撤回时只移除文章正文后 `components.dpl-article-ad` 的 include,再删除本广告专属模板、配置、CSS及素材;勿回滚其他并行修改。
|
||||
|
||||
## HN 接入(2026-10-27)
|
||||
|
||||
- HN模板:`resources/views/components/hn-article-ad.blade.php`;Logo复制自HN当前配置指向的 `public/brand/hn/logo.svg`(独立工作树 `/Users/hellcat/Documents/Codex/2026-10-12/ji-cha/work/dpl-hn`),绿色眼镜H标志,不复用DPL或旧tpl-a设计素材。
|
||||
- 配置:`advertising.hn.enabled`、`advertising.hn.url`;本地环境默认 `http://hn.loc/`,可通过 `HN_AD_URL` 显式设置。生产未配置地址则不展示HN卡片:hardnerd.net只核实到停放状态,未把它当作已上线落地页。
|
||||
- 用户最新确认改为所有屏幕上下排列,DPL、HN各占一整行;不再使用桌面双列。原并排验收为历史记录:1280px视口实测两列343px、两卡等高约283px;390px手机视口单列322px,两卡均无溢出。Logo实际加载成功,DPL链接与HN本地链接分别回读正确。未打开落地页、未写HN数据、未发布。
|
||||
- 当前截图:`codex/output/dpl-hn-ads.png`。仅在原有文章推荐区增加HN,不恢复顶部横幅、侧栏或文末投放。
|
||||
|
||||
## HN整图广告(2026-10-27)
|
||||
|
||||
用户要求HN改为整张图片,保持原广告位尺寸。当前 `hn-article-ad.blade.php` 使用整图链接,文字、Logo及按钮全部在图片内,不再叠加HTML标题/按钮。图片为 `public/images/ads/hn-ad-20261027.png`,由内置 image_gen 生成,使用当前HN Logo为参考;完整提示词在 `codex/output/hn-ad-20261027-prompt.txt`。画面为黑色/荧光绿网络路径主题,文案“探索全球网络”“hardnerd · 网络服务”“了解 HN ↗”,无价格或速度承诺。
|
||||
|
||||
桌面1280px实测HN与DPL均343×283px(四舍五入),390px手机视口HN为322×248px,与此前HN卡片接近。整图使用 contain 保证图内文字不被裁切,空余部分延续黑底。链接仍为HN本地预览入口。加载及无溢出已确认;预览截图 `codex/output/hn-full-image-ad-preview.png`。DPL模板未改。
|
||||
|
||||
验证期间本机Vite5187进程已停止,已按现有固定入口配置恢复原回环监听;未新增登录项或扩大监听。未提交、推送、部署。
|
||||
|
||||
2026-10-27最终布局:DPL和HN上下各占一整行;HN后续已重新生成为2.45:1横版,铺满行宽,手机按图片比例缩放,不再保留旧版黑边。
|
||||
|
||||
## HN横版满幅更新(2026-10-27,当前)
|
||||
|
||||
按用户要求重新设计横版,非拉伸旧图。内置 image_gen 以原整图为参考生成1962×801px图片,当前文件 `public/images/ads/hn-ad-wide-20261027.png`;完整最终提示词在 `codex/output/hn-ad-wide-20261027-prompt.txt`。旧接近方形图保留为历史产物,不再在页面引用。
|
||||
|
||||
广告位宽高比2.45:1,图片cover铺满,去掉contain及固定手机高度,不再出现左右补黑。实测当前桌面624×255px,与原行高一致;390px手机视口322×131px,按相同比例展示,无溢出。当前页面截图 `codex/output/hn-wide-ad-preview.png`。DPL广告未变,HN仍使用原本地链接;未发布。
|
||||
|
||||
## HN突出Logo版本(2026-10-27,当前引用)
|
||||
|
||||
用户认可眼镜H标志并要求突出Logo,再次使用内置 image_gen 以官方Logo为参考制作。当前整图 `public/images/ads/hn-ad-logo-hero-20261027.png`(1959×803),大Logo占左侧主要面积,右侧hardnerd品牌字与“以硬核,连接世界”,弱化背景纹理,保留黑绿配色与整图链接。最终提示词 `codex/output/hn-ad-logo-hero-20261027-prompt.txt`,页面效果 `codex/output/hn-logo-hero-preview.png`。
|
||||
|
||||
广告位保持原横版2.45:1,当前本地实测624×255px,新图片加载成功且铺满。旧网络路径横幅仅保留作历史产物,页面不再引用。DPL与原有广告位置、链接配置均未改,未发布。
|
||||
|
||||
## HN纯黑独立图形版(2026-10-27,当前)
|
||||
|
||||
按用户纠正去掉Logo的圆角方块,只使用白色H与绿色眼镜图形,整张纯黑背景,取消光晕、纹理、几何背景和按钮底块。当前整图 `public/images/ads/hn-ad-pure-black-20261027.png`(1962×801),通过内置 image_gen 参照官方Logo重新设计;完整提示词 `codex/output/hn-ad-pure-black-20261027-prompt.txt`。旧版只作历史产物,不再引用。
|
||||
|
||||
已本地页面验证新图加载、624×255px原横幅尺寸、广告位背景为rgb(0,0,0);当前截图 `codex/output/hn-pure-black-preview.png`。Logo SVG原始文件未改,仅广告图去掉图标容器。DPL未变,未提交、推送或部署。
|
||||
|
||||
## HN协调构图版(2026-10-27,当前)
|
||||
|
||||
用户指出此前把“大Logo、纯黑”执行得过于绝对,要求重新设计而非机械照搬。当前通过内置 image_gen 重新构图:适中独立眼镜H标志与hardnerd品牌字组合,柔和深墨绿背景,低对比弧线与留白,主文案“以硬核,连接世界”,右下角小按钮。无圆角Logo容器,不再使用巨型图标或空白纯黑背景。
|
||||
|
||||
当前图片 `public/images/ads/hn-ad-balanced-20261027.png`(1962×801);完整提示词 `codex/output/hn-ad-balanced-20261027-prompt.txt`;当前页面效果 `codex/output/hn-balanced-preview.png`。本地已回读新图加载成功,广告位维持624×255px,DPL与链接未变。旧版保留作历史产物、不再引用。未部署。
|
||||
|
||||
## 当前选用版本
|
||||
|
||||
2026-10-27用户最终选择“纯黑背景版本”,当前页面重新引用 `public/images/ads/hn-ad-pure-black-20261027.png`,即独立H/眼镜图形、无Logo方框的纯黑横幅。协调构图版保留为候选,不再引用。尺寸、位置和链接不变,未部署。
|
||||
|
||||
## HN纯黑精简排版(2026-10-27,当前)
|
||||
|
||||
按用户要求同时缩小Logo和文字,调整字号层级与行距,品牌字改用较轻字重,整体居中组合、文案左对齐,增加留白,保持纯黑背景、无Logo容器和2.45:1横幅。最终图片 `public/images/ads/hn-ad-refined-black-v2-20261027.png`,通过内置 image_gen 以原纯黑版为参考制作,并作一次组合占比校准;完整两阶段提示词 `codex/output/hn-ad-refined-black-20261027-prompt.txt`。当前页面截图 `codex/output/hn-refined-black-preview.png`,DPL及链接不变,未部署。
|
||||
|
||||
2026-10-27用户要求品牌名全大写:通过内置image_gen仅替换图内wordmark为HARDNERD,当前文件 `public/images/ads/hn-ad-uppercase-20261027.png`,提示词 `codex/output/hn-ad-uppercase-20261027-prompt.txt`;布局、独立图形、文案与纯黑背景保留。同步图片替代文字,未部署。
|
||||
|
||||
2026-10-27用户将品牌名改为首字母大写Hardnerd,并要求重新协调字体、字号和间距。当前图片 `public/images/ads/hn-ad-titlecase-20261027.png`:品牌字/灰色中文副标题/绿色CTA分层,重新对齐组合,保留纯黑背景及无框眼镜H标志;由内置image_gen参照大写版重新排版,完整提示词 `codex/output/hn-ad-titlecase-20261027-prompt.txt`,效果截图 `codex/output/hn-titlecase-preview.png`。仍为本地接入,未部署。
|
||||
|
||||
2026-10-27HN广告增加与网站文章缩略图一致的鼠标扫光:沿用core-ui.css的shine关键帧、0.85秒时长、白色20%透明渐变、-25度斜角,伪元素不接收点击。不额外引入JS或改动其他图片;键盘焦点同样触发,减少动态效果偏好下禁用。浏览器实测hover为true、animationName为shine、duration为0.85s、pointer-events为none;图片为Hardnerd首字母大写新版。未部署。
|
||||
|
||||
2026-10-27用户反馈HN横幅扫光过快,仅该广告的时长从0.85秒改为1.6秒,使用ease-in-out缓动;网站其他图片不变。
|
||||
|
||||
2026-10-27用户最终要求去掉HN广告扫光,已移除扫光伪元素、hover/focus动画及对应减少动态效果规则,仅保留静态整图链接和键盘焦点轮廓。网站其他图片扫光不变。
|
||||
|
||||
## 资源正文引导与TG入口(2026-10-31)
|
||||
|
||||
按用户要求将免费节点(freenode)和免费苹果ID(shadowrocketids)正文中“点击加入我们的tg频道…”与“点击关注我们的github仓库…”两段移除展示,连带其后的空段。`ResourceArticlePresentation::body` 仅在这两个栏目匹配已知引导文案;不改文章存储、订阅字段、苹果ID内容、其他栏目或正常教程链接,所以后续日更同样生效。
|
||||
|
||||
导航使用 `components.telegram-link`:桌面右侧GitHub前增加纸飞机SVG,手机右上角同样提供入口,36px点击区、20px图标、说明标签和新窗口安全属性;不加载远程图标。链接沿用当前文章已有的 `https://t.me/clashfreenode`,配置 `community.telegram_url` / `COMMUNITY_TELEGRAM_URL`。不点击频道,不发送消息。原GitHub导航入口保留。
|
||||
|
||||
生产模板由现场版本定点修改,本地额外的机场推荐功能未随任务发布。应用提交 `de6b931823b3fe49811d1026393c38f073480054`,分支 `codex/tg-header-20261031`,恢复点 VPS-003 `/root/backups/cfn-tg-header-20261031`。回滚只撤销本次五个应用文件增量,保留其他聊天后续提交。单测2项4断言通过,32项服务器HTML/配置检查通过、0失败,覆盖两个栏目的最新/最早文章及首页/列表/教程。已完成服务器侧验收,未做线上页面验收;回执见 `output/tg-header-20261031/verification.json`;文档同步提交仅改本专题。
|
||||
|
||||
## 单张随机广告(2026-10-31)
|
||||
|
||||
用户确认每次打开只随机展示三张之一,并要求不影响页面渲染/速度。组件 `components.article-ads` 使用配置启用、URL存在、素材存在的候选;正式补齐DPL/FUC配置及对应网站风格素材,HN使用已发布refined版。JS在浏览器独立抽样,页面HTML缓存不固定选择;返回/前进命中bfcache时通过pageshow.persisted重新抽取,无定时轮播和接口请求。不保证每次不同。
|
||||
|
||||
所有图片候选放在原生template内,未选中图片不进入活动DOM、不请求;仅克隆一个链接+图片。脚本源 `public/js/random-article-ad.js` 不到1KB,内联进已有缓存HTML,不额外发起JS请求。独立CSS `public/css/random-article-ad.css` 替代旧HN广告CSS,总体仍为单个广告样式请求,2.45:1比例和圆角保留。关闭JavaScript时noscript展示首个有效候选;全部停用或缺图时无广告。不做访问统计或追踪。
|
||||
|
||||
配置沿用 `advertising.{dpl,hn,fuc}.enabled/url`;生产三者链接分别dp-link.net、hardnerd.net、福云123.com。DPL_AD_ENABLED / HN_AD_ENABLED / FUC_AD_ENABLED 可独立停用。线上文章模板定点切换为汇总组件,没有发布本地额外机场推荐逻辑。未改数据库、响应缓存策略或Vite构建。
|
||||
|
||||
应用提交 `cb8cd8467a8a61ef09deaa9a24c78e4c4dbed3f4` 已Git推送 `codex/random-ad-20261031` 并正式检出;恢复点 VPS-003 `/root/backups/cfn-random-ad-20261031`。回滚只撤本批增量,可先将show模板切回独立HN组件;不得整库/整站回退覆盖并行更新。
|
||||
|
||||
本地真实Blade组件隔离页已在浏览器验收:桌面760×310、390视口342×140,无横向溢出;活动DOM始终单图,观察到HN→福云变化,CDP网络仅一次选中福云图片请求。3项脚本测试通过,覆盖三个抽样区间、bfcache恢复、单个/零候选。截图与证据见 `output/random-ad-20261031/`。56项生产服务器HTML/资源检查全部通过,回执 `verification.json`;已完成服务器侧验收,未做线上页面验收。文档后续部署不改变应用文件。
|
||||
|
||||
## TG图标协调(2026-10-31,仅本地)
|
||||
|
||||
用户反馈TG蓝色实心图标突兀,随后明确本次先只改本地。`components.telegram-link` 去掉固定蓝色、36px自定义尺寸,使用导航现有btn-link/btn-icon/btn-sm继承灰色及深色模式/交互样式;按后续要求使用18px实心纸飞机,包裹与其他按钮相同的居中span。链接与无障碍说明保留。
|
||||
|
||||
真实本地导航组件、现有构建CSS隔离验收:TG/GitHub/搜索均为rgb(141,143,150)、32×32,垂直中心35px一致;初版线框截图 `output/tg-icon-polish-20261031/local-preview.png`,后续实心版截图 `output/tg-icon-polish-20261031/solid-local-preview.png`。临时验收页用后删除。未提交、推送或部署,本次线上仍保留此前蓝色图标。准备的发布脚本未执行,不把线上只读核对当作发布。
|
||||
|
||||
## 广告高度(2026-10-31,仅本地)
|
||||
|
||||
用户要求广告高度调到原来三分之二。最初仅将单张随机广告组件的比例2.45改为3.675、object-fit改为contain。用户随后明确否定直接缩放旧图,要求按矮横幅重新设计;此初版已被下述三张重设计替代。保持原单张抽样、template延迟载入与noscript回退,不改候选、素材、跳转地址或JS。桌面718px宽约195.37px高(原293.06px),手机322px宽约87.62px高(原131.43px),均为66.7%;活动DOM仅1张图。未提交/推送或发布,生产仍沿前述原尺寸。
|
||||
|
||||
## 矮横幅重设计(2026-10-31,仅本地)
|
||||
|
||||
用户明确高度为原来三分之二,需重新设计而非等比缩旧图。内置image_gen分别生成DPL/HN/FUC新构图,文件为 `public/images/ads/{dpl,hn,fuc}-ad-compact-20261031.png`,完整提示词与原始尺寸清单在 `output/compact-ads-20261031/`。不覆盖旧文件。DPL改为横向三地区卡片与左右分区;HN保留眼镜H、Hardnerd和用户指定白字,重新协调留白;福云改为当前深紫星空/火箭及云形新Logo,撤掉旧浅紫大福字视觉。
|
||||
|
||||
FUC参考只读新版HEAD `4eff00023420175662792769d1d2ee1c16d9bb68` 的 `docs/maintenance/BRANDING.md`、官网离线桌面截图 `docs/maintenance/evidence/logo-2026-10-30/front-desktop.png` 及 `public/images/brand/fuc-mark-512.png`。未运行真实FUC Web配置或访问FUC线上;未改FUC源码、品牌源文件和业务数据。
|
||||
|
||||
实际广告位保持3.675:1,满宽约为原高度66.7%。生成图原始尺寸DPL2169×725、HN2021×778、FUC2142×734保留背景出血,cover仅从上下背景留白取景;字号与主要内容按横向构图重新布局,不再contain缩小整张/补两侧空白。福云取景center40%,保护顶部品牌与底部CTA;固定小“广告”标签保证出血裁切后仍可见。活动组件候选引用、真实图片尺寸与替代文字同步,随机JS、链接、缓存与单图加载机制未变。旧独立广告组件属于保留实现,不是当前随机位消费者。
|
||||
|
||||
真实Blade隔离页浏览器验收:桌面三张均718×195.37;390px视口三张均354×96.32,无横向溢出,图文与品牌显示完整。实际随机组件仅1张新版福云图片进入活动DOM并加载。桌面/手机截图与验收摘要见上述输出目录,临时Web验收页用后清理。未提交、推送或部署;线上仍为之前2.45:1旧素材随机位,本次实心TG图标同样仅本地。
|
||||
|
||||
2026-10-31用户纠正广告品牌字标为 `DP-LINK.NET`。内置image_gen定点替换原图左上DPL,现用 `public/images/ads/dpl-ad-compact-wordmark-20261031.png`,2169×725;原图保留。提示词 `output/compact-ads-20261031/dpl-wordmark-prompt.txt`。实际随机组件候选及alt同步为DP-LINK.NET,广告位比例、其他两图和链接不变,仅本地未发布。
|
||||
|
||||
2026-10-31按用户要求将HN品牌字放大、中文标语缩小并增加两行间距;追加要求首字母小写,最终字标为 `hardnerd`。内置image_gen定点编辑,当前素材 `public/images/ads/hn-ad-compact-lowercase-20261031.png`,2021×778;提示词 `output/compact-ads-20261031/hn-lowercase-prompt.txt`。本地随机组件引用、尺寸及alt同步,保留旧图,不改线上。
|
||||
|
||||
2026-10-31按用户指定文案将福云主标题改为“全球网络加速”、副标题改为“五年稳定运营”。内置image_gen只替换两行文字,保留新云形Logo/紫色火箭构图及开始使用按钮;当前素材 `public/images/ads/fuc-ad-compact-five-years-20261031.png`(2141×734),提示词 `output/compact-ads-20261031/fuc-copy-prompt.txt`。随机组件引用/尺寸/alt同步,仅本地未发布;文案为用户指定,不将本次设计视作独立运营年限核验。
|
||||
|
||||
## 本任务高度调整正式状态(2026-10-31)
|
||||
|
||||
[2026-10-31正式发布记录](UI_RELEASE_2026-10-31.md)已将正式广告位调整为3.675:1,并对生产原三张素材使用contain完整展示。此为页头/免费节点界面发布中的高度调整;compact重设计及其后续文案、cover取景仍为另一项本地任务,未随本批发布。生产article-ads模板、随机JS、广告配置及三张原图保持基线。各原图路线与本次精确SHA/恢复点以发布记录为准。
|
||||
@@ -0,0 +1,39 @@
|
||||
# 统一机场推荐模块
|
||||
|
||||
**已正式发布**:[2026-10-31正式发布记录](UI_RELEASE_2026-10-31.md)。以下为最初本地实施记录,当前正式数据保护及189篇覆盖验收以发布记录为准。
|
||||
|
||||
2026-10-31用户确认截图方案并要求“弄,先在本地”。仅FNA_V3本地生效,没有提交/推送、线上访问或生产部署。原整图广告区保留,本模块替换资源正文内旧福云文字推荐并补充教程末尾,不改变其他广告配置。
|
||||
|
||||
## 唯一资料入口
|
||||
|
||||
`config/airport_recommendations.php`集中维护开关、顺序、品牌名、地址、起售价/单位、解锁文案、场景说明、优惠码及折扣。初始三家与价格/优惠文案按用户截图:福云18元/月、DP-LINK.NET26元/月、hardnerd28元/月;三家均使用clashfreenode.com九折(HN优惠由用户随后确认补齐)。该价格和营销说明为用户指定文案,不表示本次完成网络或套餐实测。
|
||||
|
||||
地址沿已登记/既有配置:FUC免翻墙入口`https://xn--123-9i9dj97q.com/`,DPL `https://dp-link.net/`,HN `https://hardnerd.net/`;未点击或访问落地页。可通过AIRPORT_FUC_URL、AIRPORT_DPL_URL、AIRPORT_HN_URL覆盖。使用独立展示配置避免本地HN广告使用hn.loc时污染公开推荐网址。未新建后台、数据库、DomainHub调用或TeleHub汇报;无新增公共服务需求,当前统一配置足够维护三个固定条目,后续后台接入另按明确需求设计。
|
||||
|
||||
修改资料后运行`php artisan config:clear`与`php artisan responsecache:clear`即可全站更新,无需逐篇改稿。禁用单家用enabled=false,排序用order;总开关AIRPORT_RECOMMENDATIONS_ENABLED=false。无可用条目时不插入推荐或跳转,旧正文原样显示。
|
||||
|
||||
## 渲染与边界
|
||||
|
||||
- `ArticleRecommendations::prepare`仅处理展示副本,不更新文章数据库、编辑版本、正文源、收录日期或点赞设置。
|
||||
- freenode、shadowrocketids:识别旧“机场推荐 - 福云”标题及其同段“机场官网:福云”链接,在原位置替换共享组件。匹配不跨下一个标题;未匹配时保留正文并在末尾追加,不猜测删除范围。订阅/账号/复制数据原字节保留。
|
||||
- client及其子栏目、advanced:正文后追加同一个模块。advanced在首个涉及订阅/节点/线路的段落后插入一次自然文案与文末锚点,无匹配时文末加入;已有该锚点链接不重复插入。
|
||||
- 首页复用最新文章详情,自然包含一处推荐;栏目列表不增加模块,其他栏目不展示。
|
||||
- 服务端输出table,桌面五列、767.98px及以下为三张纵向卡片。稳定锚点`#airport-recommendations`,不得在正文另建同名ID。CSS/JS独立同源静态文件,@once单次加载;不依赖JS获取推荐数据。
|
||||
- 外链为sponsored/nofollow/noopener/noreferrer,新窗口访问;可复制优惠码并以状态文字反馈,HTTP本地使用用户点击触发的复制兼容路径,失败则选中文字供手动复制。不会读取用户原剪贴板。
|
||||
- 不向正文源和AI写作稿重复写入价格/优惠码。本站文章API及其hash校验未改,不用SQL改文章;此模块与冻结的正文数据分离。
|
||||
|
||||
## 本地验收
|
||||
|
||||
5项专项测试/40断言通过:旧区替换与订阅/账号保留、未识别结构保护、入门子栏目/综合跳转、总开关与其他栏目、统一资料修改/单家关闭/推广链接。因项目既有CLI命令重复类,测试沿原约定使用`--process-isolation`,未改无关CLI代码。
|
||||
|
||||
全量只读遍历本地171篇公开目标文章:160篇资源文章均替换旧区,11篇教程统一追加,4篇综合教程含锚点跳转,171篇data-clipboard-text载荷完全一致,未识别旧推荐为0。数据库正文未写入。
|
||||
|
||||
本地浏览器1280px桌面表格、390px手机卡片无横向溢出;每页模块1处,文内链接实际滚动至距离顶部100px,复制优惠码显示“优惠码已复制”。图片、CSS/JS与原广告加载正常;没有点击服务商落地页。截图:[桌面](../../output/recommendations/desktop.png)、[手机](../../output/recommendations/mobile.png)。开发模式沿用,未运行build。完成检查后恢复浏览器默认视口。
|
||||
|
||||
本地预览:`http://fna-v3.loc/a/fn20261021.html#airport-recommendations`;入门`/a/clash-verge-rev-windows.html#airport-recommendations`;综合`/a/mihomo-dns-leak.html`可点击文内“机场推荐”跳转。
|
||||
|
||||
2026-10-31后续免费节点详情重设计仅将freenode页推荐区移至订阅及使用说明之后,仍使用本组件/配置;苹果ID维持原位置替换、教程文末维持不变。结构与验收见[免费节点内容页](FREENODE_ARTICLE_LAYOUT.md),均仅本地。
|
||||
|
||||
## Hardnerd优惠补齐(2026-10-31)
|
||||
|
||||
用户确认hardnerd同样使用`clashfreenode.com`享9折。仅更新共享推荐配置的HN coupon/discount及对应渲染断言,所有引用页随配置/响应缓存刷新生效,无需逐篇编辑正文。不创建或修改HN服务端优惠码,不执行下单或优惠核销。Git提交、正式HEAD、恢复点和服务器验收回执见`output/hn-coupon-20261031/`。
|
||||
@@ -0,0 +1,37 @@
|
||||
# CFN页头品牌标志(2026-10-31)
|
||||
|
||||
**已随[2026-10-31正式发布记录](UI_RELEASE_2026-10-31.md)上线**。以下标注“仅本地”的段落为当时实施历史;当前正式品牌、窄屏居中及侧栏TG/GitHub均已发布。
|
||||
|
||||
**当前字标已恢复文字**:用户试看风格化图片后要求改回ClashFreeNode文字。当前为统一深灰色的HTML字标,猫仍是独立SVG,下方文案保留;图片生成记录仅作历史。
|
||||
|
||||
用户要求尝试将现有猫转SVG,右侧显示clashfreenode,下行显示“每天分享免费节点”。已在FNA_V3本地接入,未提交/推送/部署;旧PNG与其他实例标志保留。
|
||||
|
||||
- SVG:`public/sites/cfn/images/logo/cat.svg`,从现有logo.png猫的紫色轮廓提取并简化为二次贝塞尔曲线,5个轮廓包含双眼与独立腿部,原色#764679。只有矢量path,不嵌入PNG、脚本、字体或外部资源;透明背景。
|
||||
- 复现脚本:`output/branding/vectorize-cat.py`,使用桌面已带的Pillow/NumPy,无项目新增依赖;读取原PNG、不修改原图。svg约7.6KB。
|
||||
- 文字:`components/cfn-brand.blade.php`使用可读HTML文字,避免把字做进图片;CSS位于`public/css/cfn-brand.css`,app-layout在cfn环境单次加载。品牌名保持用户要求的小写,文案“每天分享免费节点”。
|
||||
- 接入:nav-bar仅对site_code_short=cfn使用新组件,其他实例沿原PNG轻/深色分支。菜单顺序、菜单当前状态、TG/GitHub/搜索功能未改。
|
||||
- 适配:桌面猫44×44、品牌文字23px;手机猫38×38/21px;小于360px猫32×32/18px。深色文字有主题分支,不引入远程字体或JS。
|
||||
|
||||
本地1280、390及320视口检查:SVG正常加载、两行文案正确,无导航横向溢出;320px品牌块约158px宽。截图:[页头](../../output/branding/header-logo.png)。本地HTTP/SVG XML检查通过;未点击线上落地页,未build。
|
||||
|
||||
回退:cfn导航切回原logo.png,移除app-layout的cfn-brand.css引用;不用删原PNG或修改其他实例。保持其他并行导航改动。
|
||||
|
||||
2026-10-31用户将字标明确为ClashFreeNode并要求设计,已本地改为CamelCase:Clash深灰、FreeNode呼应猫的紫色;字重700/650、字距-.65px,微调图文和两行间距,下方文案不变。保留真实文字及原SVG,无新字体请求,桌面/手机复验后仅本地。
|
||||
|
||||
## 风格化图片字标(2026-10-31)
|
||||
|
||||
原稿`output/branding/wordmark/clashfreenode-generated.png`,2172×724真实透明通道;完整提示词见[生成提示词](../../output/branding/wordmark/prompt.txt),由内置image_gen生成,无CLI/API密钥。交付文件`public/sites/cfn/images/logo/wordmark-stylized.webp`约83KB,只做网页格式编码,不重画或合成;原PNG完整保留。CSS透明画布窗口去掉上下空白,不拉伸字形。
|
||||
|
||||
`cfn-brand.blade.php`已将普通字替换为带alt=ClashFreeNode的img,保留独立SVG猫与“每天分享免费节点”。桌面字标视窗182×25,手机160×22,320px小屏134×19;活动品牌块在320px宽约172px,无横向溢出、文字识别清楚。预览见[图片字标效果](../../output/branding/header-wordmark-image.png)。本次未改广告尺寸、正文、导航链接或其他实例标志,未build、提交/推送或上线。
|
||||
|
||||
2026-10-31按用户最新要求,已将图片字标恢复为文字ClashFreeNode及先前字重/配色/响应字号,页头不再请求wordmark-stylized.webp;图片及提示词保留归档。SVG猫、下方文案与广告高度不变,仍仅本地。
|
||||
|
||||
2026-10-31用户要求颜色与此前一致,已将ClashFreeNode字标统一为原PNG字标深灰#555555,取消FreeNode的紫色强调;猫的原紫色不变,深色模式字标统一继承浅色。仅本地。
|
||||
|
||||
## 窄屏导航对齐与GitHub(2026-10-31,仅本地)
|
||||
|
||||
用户反馈Logo位置不对并要求窄屏不隐藏GitHub。已为SVG品牌补回6px左侧视觉留白,菜单/Logo/Telegram/GitHub/搜索垂直中心保持一致。移动导航增设使用原config(path.url_github_href)的GitHub链接,沿用原灰色32px按钮与新窗口属性;桌面保留原GitHub,不重复显示。320px下将字标微调17px并禁止导航换行,5项中心均35px,搜索不掉到第二行,未溢出;390/499px也检查通过,最终恢复默认视口。页头预览见[窄屏导航](../../output/branding/mobile-nav-github.png)。不改变文字/猫颜色、落地页地址或菜单逻辑,未上线。
|
||||
|
||||
2026-10-31用户澄清原要求为“窄屏整个Logo居中”,上次补左侧留白的理解已纠正。现窄屏品牌相对导航容器绝对居中,不受左菜单/右侧三个按钮宽度差影响;按390/375/320宽度协调品牌及按钮尺寸,全部图标保留。390px品牌中心195px,320px中心160px,与视口中心一致,且不重叠;桌面品牌位置不改。仅本地。
|
||||
|
||||
2026-10-31按用户最新要求,窄屏Telegram和GitHub从顶部移到移动侧栏的栏目菜单下方,用分隔线与菜单区分;顶部保留左侧菜单、居中品牌和右侧搜索。桌面TG/GitHub/搜索保持原位,链接配置保持原样。窄屏品牌恢复38px猫/21px文字,无需此前为右侧三图标设置的小屏压缩规则;本地检查侧栏开关与品牌中心,未上线。
|
||||
@@ -10,7 +10,7 @@ ## 职责与数据
|
||||
|
||||
项目正文源保留可编辑稿;`editorial_drafts`保存收到并渲染后的冻结版本,发布读取该快照,不临时重新读取文件。`articles`为公开显示数据,草稿不写入它。`editorial_documents`按稳定`content_key`绑定本站文章;`editorial_versions`保留已发布版本和首次接管旧文的基线版本0;`editorial_publications`保存独立发布回执及后续处理状态。图片元信息在`editorial_assets`。
|
||||
|
||||
新API不调用旧接收器,不发送旧Telegram通知、IndexNow提交或ATOM请求。旧资源接收接口继续沿用原流程,不在本次改造范围;普通编辑API拒绝免费节点与小火箭ID两个自动资源栏目。旧接口/人工直接编辑同一文章会造成草稿基线变化,新API发布时返回409,不能静默覆盖并行修改。
|
||||
新API不调用旧接收器,不发送旧Telegram通知或ATOM请求。2026-10-31起编辑文章新增/实质修改后具有独立IndexNow回执与失败重试,见[教程SEO通知](EDITORIAL_INDEXNOW.md);本地和测试不真实外发。旧资源接收接口继续沿用原流程,不在本次改造范围;普通编辑API拒绝免费节点与小火箭ID两个自动资源栏目。旧接口/人工直接编辑同一文章会造成草稿基线变化,新API发布时返回409,不能静默覆盖并行修改。
|
||||
|
||||
## 凭据与环境
|
||||
|
||||
@@ -116,9 +116,9 @@ ### 3 发布确认过的版本
|
||||
|
||||
- `status: published`:本次内容已写入本站公开文章表;这是所调用环境的状态,本地成功不代表生产成功。
|
||||
- `articles`:各文章的`content_key`、`article_id`、`revision`和URL。
|
||||
- `effects.cache/search/sitemap`:各后续处理的独立结果。搜索暂时失败不撤销已提交正文,返回`pending`,不能重发正文来弥补搜索失败。
|
||||
- `effects.cache/search/sitemap/indexnow`:各后续处理的独立结果。搜索暂时失败不撤销已提交正文,返回`pending`,不能重发正文来弥补搜索失败。
|
||||
|
||||
后续处理为刷新本站响应缓存与热门数据缓存、同步本站搜索,以及使用数据库驱动的sitemap。缓存未刷新时sitemap也标记pending。不调用搜索引擎主动提交。
|
||||
后续处理为刷新本站响应缓存与热门数据缓存、同步本站搜索,以及使用数据库驱动的sitemap。缓存未刷新时sitemap也标记pending。IndexNow以独立`effects.indexnow`记录,不与sitemap结果混用,见[教程SEO通知](EDITORIAL_INDEXNOW.md)。
|
||||
|
||||
### 4 查询、重试与回退
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
# 编辑文章 IndexNow
|
||||
|
||||
用户2026-10-31要求接入教程发布后的自动推送。新增或实际内容改变的编辑文章在发布事务写入IndexNow待处理状态,缓存刷新完成后提交当前有效URL。目标为IndexNow官方API,复用本站既有key及根目录验证文件,不生成/轮换密钥,不改旧资源接收器。
|
||||
|
||||
- `config/editorial.php` 的 `indexnow_enabled`:默认仅production开启,可用`EDITORIAL_INDEXNOW_ENABLED=false`关闭。local不会发出通知,测试使用Http fake。
|
||||
- `PublicationEffects`保存`effects.indexnow`,包括状态、次数、HTTP状态和下一次重试时间;不保存key、响应正文或异常消息。只有200/202记done;202表示收到并待验证key。提交被接收不等于搜索引擎已经抓取或收录,见[官方协议](https://www.indexnow.org/documentation)。
|
||||
- `editorial:indexnow-retry`挂接原Laravel调度,每5分钟检查一次,单次最多10个到期回执,防重叠;退避从5分钟递增,最大24小时。定时任务运行在FNA业务服务器,以原nginx身份执行,白色机仅SSH跳板。
|
||||
- 已done的通知不重复调用;同一发布UUID重放不重发文章。网络结果未知或提交后进程崩溃可能重复通知同一URL,按至少一次投递处理,不能承诺第三方只收到一次。每次重试都重新确认文章仍公开、栏目启用且可索引。
|
||||
- 内容未变、已撤下、不再允许索引时跳过;旧版本中没有IndexNow状态的历史发布回执不自动补推。暂时禁用不会丢弃已pending状态。
|
||||
- 仅推送同一站点的规范文章及其相关有效栏目地址;app.url、editorial.base_url、app.site_code必须一致,不跟随重定向,不从文章输入指定外部推送目标。
|
||||
|
||||
## SEO整体升级后的现行合同
|
||||
|
||||
2026-10-31随 `7c11ca77` 保留原编辑发布回执,并在实质更新通知中追加所属栏目/父栏目;日更资源改为通知稳定首页和栏目,新增持久出站队列及业务服务器重试,取消旧接收器无差别直推快照。首页及9个栏目真实通知返回200,旧回执不变。完整实现、边界及恢复点统一见[SEO实施记录](SEO_IMPLEMENTATION_2026-10-31.md);下面较早发布记录仅描述各自批次。
|
||||
|
||||
## 2026-10-31已部署与验证
|
||||
|
||||
功能提交`574812438338755b160453c4a574557365903506`已Git推送并部署正式cfn,独立分支`codex/editorial-indexnow-publish-20261031`,基线`d981a2aa4fa21abe4512ddd287a2f51f87b11197`。同名旧候选分支另有包含sitemap改动的并行提交415b5f8,保留未覆盖;本任务只部署IndexNow范围,没有捆绑其他SEO工作。
|
||||
|
||||
专项4项测试/52断言通过:新增/更新通知、同UUID去重、无变化跳过、429退避后202成功、旧回执不补推、禁用环境/域名错配拒发、撤下后停止重试。本地相关业务回归合计36项/344断言通过;其中共享工作区的sitemap测试未作为本次部署范围。
|
||||
|
||||
正式站现有188篇文章的核心内容与日期、所有旧编辑发布回执保持;生成标签模板哈希和data.ms并行目录保留。新重试命令以nginx实际运行,空队列返回processed=0/pending=0,已登记每5分钟调度;未为演练制造失败队列,也未宣称已观察到一笔真实失败的自动恢复。公网编辑API仍关闭,首页HTTP200。
|
||||
|
||||
2026-10-31 14:20:55北京时间,通过本机SSH→白色机→业务服务器,由新组件对现有`/a/system-proxy-vs-tun.html`执行一次真实通知验收,HTTP200,密钥文件HTTP200且内容匹配;未改正文、未重新发布、未改旧回执、未批量补推。只证明通知被接收,不代表已收录。已完成服务器侧验收,未做线上页面验收。精确证据见[回执](EDITORIAL_INDEXNOW_2026-10-31.json)。
|
||||
|
||||
私有恢复点:VPS-003 `/root/backups/cfn-indexnow-20261031/`,包含Git bundle、原HEAD/工作区状态、标签模板、文章核心字段与旧回执快照、真实提交事件和部署记录。回滚可检出基线,保留已有effects状态和内容;单独停推可设`EDITORIAL_INDEXNOW_ENABLED=false`,不要删除pending回执。普通发布继续通过[白色机发布封装](EDITORIAL_RELEASE.md)。
|
||||
|
||||
|
||||
## 两个教程栏目sitemap已部署(2026-10-31)
|
||||
|
||||
基于并行IndexNow正式文档提交`ace6d74a18988697340ebcd15e2b79a4dee0e697`,只发布本批7个栏目/测试/文档文件,功能提交`252e0c38cb85d0c1331063b1019a2bb13c27ac8a`已推送`codex/tutorial-sitemap-20261031`并检出正式cfn。保留57481243的通知实现,不重复部署旧候选415b5f8,也不覆盖其并行验收记录。
|
||||
|
||||
本地34项/310断言通过。正式sitemap从25项变27项,精确增加`/client`与`/advanced`,旧集合无移除;首页、两栏目和system-proxy-vs-tun详情HTTP200,两栏目index/follow及自引用canonical通过。188篇正文核心、既有发布回执、生成标签模板哈希及data.ms并行目录保持。重试命令以nginx执行返回processed=0/pending=0,原项目调度存在,密钥文件HTTP200且内容匹配。
|
||||
|
||||
切换时曾因2秒PHP OPcache检查窗口出现新模板与旧控制器混用,验收脚本立即回滚。最终通过Unix FastCGI socket仅失效本批文件缓存,临时私有脚本用后删除;未重启共享PHP-FPM、未改其配置。原两次候选回滚后,接续并行IndexNow新基线完成本次限定发布。
|
||||
|
||||
本批未再次发送真实通知、不补交历史文章;上一节的真实HTTP200验收继续有效。已完成服务器侧验收,未做线上页面验收。脱敏验收见[栏目回执](TUTORIAL_SITEMAP_2026-10-31.json)。恢复点:VPS-003 `/root/backups/cfn-tutorial-sitemap-20261031/`,包含原HEAD/status、Git bundle、模板、前后运行摘要和opcode失效回执。仅回滚本批时检回ace6d74a并定点失效PHP缓存,保留新通知实现、内容及回执。
|
||||
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"base": "d981a2aa4fa21abe4512ddd287a2f51f87b11197",
|
||||
"commit": "574812438338755b160453c4a574557365903506",
|
||||
"branch": "codex/editorial-indexnow-publish-20261031",
|
||||
"files": [
|
||||
"app/Console/Commands/RetryEditorialIndexNow.php",
|
||||
"app/Services/Editorial/IndexNowNotification.php",
|
||||
"app/Services/Editorial/PublicationEffects.php",
|
||||
"app/Services/Editorial/Publisher.php",
|
||||
"app/Services/Editorial/ReleaseRunner.php",
|
||||
"config/editorial.php",
|
||||
"docs/maintenance/EDITORIAL_API.md",
|
||||
"docs/maintenance/EDITORIAL_INDEXNOW.md",
|
||||
"docs/maintenance/EDITORIAL_RELEASE.md",
|
||||
"routes/console.php",
|
||||
"tests/Feature/EditorialApiTest.php"
|
||||
],
|
||||
"checks": {
|
||||
"enabled": true,
|
||||
"public_api_enabled": false,
|
||||
"key_valid": true,
|
||||
"retry_scheduled": true,
|
||||
"retry_command": {
|
||||
"processed": 0,
|
||||
"pending": 0
|
||||
},
|
||||
"existing_articles_and_receipts_unchanged": true,
|
||||
"tags_preserved": true,
|
||||
"homepage_http": 200
|
||||
},
|
||||
"backup_directory": "/root/backups/cfn-indexnow-20261031",
|
||||
"status": "M resources/views/components/generated-tags-cloud.blade.php\n?? data.ms/",
|
||||
"live_verification": {
|
||||
"ok": true,
|
||||
"key_file_http_matches": true,
|
||||
"notification": {
|
||||
"status": "done",
|
||||
"attempts": 1,
|
||||
"http_status": 200,
|
||||
"urls": [
|
||||
"https://clashfreenode.com/a/system-proxy-vs-tun.html"
|
||||
],
|
||||
"submitted_at": "2026-10-31T06:20:55+00:00",
|
||||
"result": "received"
|
||||
},
|
||||
"verification_only": true,
|
||||
"article_modified": false
|
||||
},
|
||||
"tests": {
|
||||
"indexnow_tests": 4,
|
||||
"indexnow_assertions": 52,
|
||||
"local_regression_tests": 36,
|
||||
"local_regression_assertions": 344
|
||||
},
|
||||
"parallel_branch_preserved": "codex/editorial-indexnow-20261031 (415b5f8ab57432ff238b6d83b83d1bee75c95c7b); sitemap changes not deployed in this task"
|
||||
}
|
||||
@@ -28,7 +28,7 @@ ## 调用
|
||||
- id.json仅`{"release_id":"原UUID"}`。服务器先保存稳定草稿ID/发布UUID,再调用API;相同bundle重复prepare不新建版本或重新抽取参数,相同release_id改正文拒绝409。改稿应显式创建新release并使用当前版本。
|
||||
- review.json的`data.previews`含原模板渲染的HTML,`data.review`含hash和digest。先阅读及检查冻结版本;程序渲染通过不等于人类/浏览器视觉验收。正式HTML内含线上资源链接,禁止直接在本机浏览器打开加载;视觉检查在本地对应稿件完成。必须线上页面验收时仍按项目访问批准规则到Windows,不以取预览为由越界。
|
||||
- publish.json为`{"release_id":"原UUID","expected_hash":"review中hash","review_digest":"review中digest"}`,不得盲填或以另一份稿件替换。程序先查回执;已发表则只重试后处理,草稿版本冲突返回失败。
|
||||
- status会从API重新查询并核对公开正文,不只读本地台账。`phase=complete`要求内容/版本/上传图哈希和缓存/搜索/sitemap状态通过;`published_pending`代表正文已提交但后续仍待处理,退出码2,不能据此另发正文。返回`published_at`来自服务器真实发布事务时间。
|
||||
- status会从API重新查询并核对公开正文,不只读本地台账。`phase=complete`要求内容/版本/上传图哈希和缓存/搜索/sitemap/IndexNow状态通过(无需通知的IndexNow skipped视为完成),且IndexNow通知为done或明确skipped;`published_pending`代表正文已提交但后续仍待处理,退出码2,不能据此另发正文。返回`published_at`来自服务器真实发布事务时间。
|
||||
|
||||
本机工具只输出结果文件路径及状态,不回显SSH认证、正文或预览。SSH断开、超时或非JSON输出都保存未知/失败状态,不自动重放写入;用原release_id查status。不存在草稿时沿原bundle恢复prepare。
|
||||
|
||||
@@ -41,3 +41,11 @@ ## 状态与恢复
|
||||
上线前仅执行`2026_10_31_150000_add_article_display_timestamp.php`迁移(新增可空`sDisplayPublishedAt`);旧文显示回退原时间。新文草稿冻结0~21600秒偏移,首次发布计算展示时间;保留created_at、实际回执、点赞起点,旧文改稿不改展示日期。回滚程序保留新增可空列和历史发布记录,不删业务数据。
|
||||
|
||||
验证与当前部署状态见[2026-10-31发布记录](EDITORIAL_RELEASE_2026-10-31.md)。周期调度和额度唯一见[WEEKLY_TUTORIALS.md](WEEKLY_TUTORIALS.md)。
|
||||
|
||||
IndexNow的结果、环境开关及服务器延时重试见[教程SEO通知](EDITORIAL_INDEXNOW.md)。通知pending只重试后处理,不再次发表正文。
|
||||
|
||||
2026-10-31编辑发布已接入[IndexNow通知与重试](EDITORIAL_INDEXNOW.md),复用发布回执effects;通知pending不表示正文未发布,禁止为通知重发正文。
|
||||
|
||||
## 图片发布目录
|
||||
|
||||
2026-10-31首篇真实上传配图时发现正式 `public/images/editorial` 缺失。用户明确批准创建该专用目录并设为nginx所有、0755;已实施并完成真实文章发布。上级public/images权限未改变。以后部署预检该目录存在且执行身份nginx可写,禁止临时以root执行文章发布来绕过。回执见[首篇周期教程](ROUTING_MODES_2026-10-31.md)。
|
||||
@@ -0,0 +1,69 @@
|
||||
# 免费节点内容页重设计(2026-10-31)
|
||||
|
||||
**已正式发布**:[2026-10-31正式发布记录](UI_RELEASE_2026-10-31.md),应用7d564df7;原业务正文不变。以下本地实施历史中的“未上线”表示该步骤当时状态,最终版本已包含提示框移除。
|
||||
|
||||
用户要求重新设计“免费节点”内容页,沿当前任务仅本地实施。未提交、推送、部署或访问线上,免费苹果ID、教程和列表页不变。首页继续复用最新免费节点详情,因此自然采用同一新版布局;没有另建首页数据源或改菜单选中规则。
|
||||
|
||||
## 结构
|
||||
|
||||
- 顶部:简洁H1“月日免费节点订阅”、客户端提示与该文章已有猫图。原title/description/canonical等SEO元信息保持;不改数据库标题或URL。
|
||||
- 概览:从原正文提取本篇节点数、原速度文字、地区;只对重复地区去重,不重估节点可用性、不换算速度单位。0节点如实显示,并给最新更新入口,不捏造数值。
|
||||
- 页内导航:获取订阅、使用说明、机场推荐。各锚点scroll-margin防导航遮挡。
|
||||
- 订阅区:Clash/Mihomo、V2ray/Shadowrocket、Sing-box/Hiddify按已有格式显示卡片,桌面与手机都明确显示原地址和复制按钮。早期只有两种格式就只显示两张,不添加推测URL。
|
||||
- 使用说明:增加简短三步说明,保留订阅下载补充说明;原三段使用提示框按用户最终要求不再展示,附已有Windows、Android、入门栏目内链。
|
||||
- 机场推荐:复用[统一推荐](AIRPORT_RECOMMENDATIONS.md),仅免费节点页移到订阅/使用说明之后,仍每页一处;其他栏目沿原维护规则。更新频道和仓库链接从正文读取后归并到末尾,未访问目标。
|
||||
- 正文后既有整图广告、标签、点赞和分享保持。未创建或修改图片,顶部展示文章已有本地缩略图,保留文章原图片关联。
|
||||
|
||||
## 实现与保护
|
||||
|
||||
`app/Services/FreeNodeArticleLayout.php`只读解析已经过ArticleRecommendations处理的展示副本;没有更新文章数据库、编辑版本、正文源、创建时间、访问地址或点赞设置。新模板为`resources/views/pages/articles/freenode/header.blade.php`与`content.blade.php`,仅default/show中的freenode条件分支接入。样式`public/css/freenode-article.css`只在新版页面加载并以free-node-page/fn类限定,不影响其他页面。
|
||||
|
||||
原日更HTML含不规范的p/a嵌套,使用本地DOM解析属性和正文。识别明确的订阅区、提示区与已知URL格式,HTML实体还原后交给Blade重新转义;不请求订阅服务器,不验证节点。未知URL格式、重复格式、未知文章结构或解析失败时回退原内容页,避免静默遗漏内容。额外编辑说明和普通补充链接保留。
|
||||
|
||||
复制复用现有ClipboardJS的copy-permalink/data-clipboard-text机制,沿原成功反馈;不新增复制库、读取用户剪贴板或访问资源链接。侧栏保持原点赞活跃模块,只协调圆角和对齐。
|
||||
|
||||
## 本地验收
|
||||
|
||||
- 全量只读遍历78篇公开免费节点:78篇识别成功,订阅地址与原data-clipboard-text逐项一致;早期两格式和后期三格式均覆盖。
|
||||
- 12项测试/61断言通过:非规范HTML、URL查询串与实体、0数值、去重地区、未知格式安全回退、两格式不补造、保留额外说明/链接,以及已有推荐和首页选择回归。
|
||||
- HTTP核对首页、当前三格式、早期两格式、苹果ID、入门教程、免费节点列表均200;新版只出现在首页/免费节点详情,推荐模块仍单处,列表不出现。
|
||||
- 浏览器1280桌面、390及320手机无横向溢出;逐个核对复制按钮边界在卡片内,没有被父级overflow遮住。真实复制显示“复制成功”,使用既有ClipboardJS。URL始终为原有值,未访问订阅/服务商/TG/GitHub落地页。
|
||||
- dev模式沿用,未build。截图:[桌面](../../output/freenode-redesign/desktop.png)、[手机](../../output/freenode-redesign/mobile.png)。浏览器最终恢复默认视口。
|
||||
|
||||
预览:`http://fna-v3.loc/a/fn20261018.html`;最新首页`http://fna-v3.loc/`。本地最新10月21日及前两天原始记录为0,本次没有改成非零或制造线上新数据。
|
||||
|
||||
回退只移除show.blade.php的freeNodeLayout分支并恢复原共用渲染;无需回灌数据库、替换素材或修改推荐配置。保留其他本地/并行代码,本次没有执行Git清理或全量覆盖。
|
||||
|
||||
2026-10-31用户要求移除装饰性小字,已本地移除SUBSCRIPTIONS、QUICK START及共享推荐区“网络服务推荐”,保留中文主标题和功能,未上线。
|
||||
|
||||
2026-10-31用户进一步明确删除卡片内“免费节点 / 日期”小字,已移除fn-eyebrow整行,卡片外面包屑及日期主标题保留,仍仅本地。
|
||||
|
||||
2026-10-31按用户要求简化订阅卡片:移除C/V/S字母图标、客户端说明小字和格式小标签,主标题统一为“适用于:客户端名”;订阅原值及复制功能保留,仅本地。
|
||||
|
||||
2026-10-31按用户反馈同步收紧删字后的留白:标题行高1.3、说明上间距6px,桌面插画120×96、标题区下间距16px;手机插画68×76,说明间距6px;纯标题订阅卡头部下间距9px。不保留已删除眉题/图标的占位,仍仅本地。
|
||||
|
||||
2026-10-31按用户截图将标题下方两行说明合并为“支持 Clash / V2ray / Shadowrocket / Singbox / Hiddify”,移除原第二行,手机按宽度自然换行,仅本地。
|
||||
|
||||
2026-10-31按用户要求移除“按客户端选择格式”辅助文字,保留“获取免费订阅”标题及订阅卡片,仅本地。
|
||||
|
||||
2026-10-31对照用户指定clash-rule-global-direct教程的浏览器实际样式,修正免费节点页过小字号:桌面H1 32px/正文16px/二级标题22.72px,手机H1 26px/正文15px/二级标题19.5px,与参考页一致;卡片标题约18/17px、按钮14px、地址13/12px,概览/导航/步骤与辅助说明同步放大至可读层级。推荐表的字号覆盖限定free-node-page,参考教程和其他页面不改。清理已移除图标/装饰文字的孤立CSS,标题分组换行以防手机末尾孤字;390/320检查复制按钮边界、正文和推荐布局,默认视口恢复。本地生效,未上线。截图[字号对齐](../../output/freenode-redesign/typography.png)。
|
||||
|
||||
2026-10-31按用户截图仅缩小订阅地址与原使用提示:桌面地址12px、提示14px/1.8;手机地址11px、提示13px/1.8。正文主层级与标题保持,仅本地。
|
||||
|
||||
2026-10-31用户澄清使用提示框须恢复统一字号调整之前的版本,已仅恢复该框桌面/手机均11px、行高1.9、原文字色#786c84,原边框/背景/内边距不变;其他正文、标题和订阅地址保持,不是只缩小一档。仅本地。
|
||||
|
||||
2026-10-31用户随后要求提示框字号稍大,已仅将该框从11px调为12px(桌面/手机一致),行高、颜色和内边距保留,仅本地。
|
||||
|
||||
2026-10-31按用户最新截图要求,移除免费节点新布局里的整块原使用提示框(免费节点稳定性、DNS和全局模式三段说明)。不再渲染该容器,因此不保留空白占位;三步使用说明和教程入口保留。原文章正文及解析数据不改,仅本地展示调整,未上线。
|
||||
|
||||
2026-10-31用户反馈外层卡片圆角与其他页不一致,经浏览器核对参考教程正文/侧栏桌面与手机均4px,已移除免费节点正文卡片14px/手机10px及侧栏10px局部覆盖,沿网站共用4px圆角。仅本地。
|
||||
|
||||
2026-10-31用户再次反馈标题区留白不均,已将桌面标题/插画改为顶部对齐,标题行高1.3、说明上间距8px/行高1.6,插画112×80、概览前间距20px;手机沿其原独立尺寸和顶部对齐,不变更字号或文字。仅本地。
|
||||
|
||||
## 使用方法区重设计(2026-10-31,已发布)
|
||||
|
||||
用户在正式发布后指出“三步说明+第一次使用链接”排版怪异,本次先在本地重设计:标题精简为“使用方法”,用单个浅紫灰区域统一容纳三步及教程入口;圆形序号与步骤标题对齐,说明文字简短统一,底部以细分隔线和教程导航收尾。桌面三列,767.98px及以下纵向排列;4px圆角沿本站卡片尺度,步骤标题16px/说明14px,手机教程链接13px避免挤压。教程链接显示Windows、Android、全部教程,实际URL及对应无障碍标签保留。
|
||||
|
||||
仅调整freenode/content.blade.php及freenode-article.css,清掉已删除提示框的孤立样式。原订阅值/复制按钮、文章数据、广告、推荐模块及其他页面保持。1280桌面、390/320窄屏检查通过:三步与三条教程链接都在容器内,无横向溢出;默认视口恢复。本次为可逆展示修改,未新增测试;用户随后要求发布,已Git提交推送并更新正式站,应用888358a6,46项服务器侧检查通过。精确SHA、恢复点及最终文档提交见[使用方法区发布记录](USAGE_RELEASE_2026-10-31.md)。
|
||||
|
||||
本地预览:`http://fna-v3.loc/a/fn20261018.html#node-usage`。截图:[桌面](../../output/usage-redesign-20261031/desktop.png)、[手机](../../output/usage-redesign-20261031/mobile.png)。
|
||||
@@ -1,10 +1,12 @@
|
||||
# Hardnerd 广告正式发布 · 2026-10-30
|
||||
|
||||
当前活动随机广告已于2026-10-31更新为用户批准的compact最终版(HN为小写hardnerd),见[相关补齐发布](RELATED_RELEASE_2026-10-31.md)。下文为各次历史增量与恢复记录。
|
||||
|
||||
用户明确要求把此前Hardnerd广告放上去并发布,暂停后已恢复授权。此次只发布HN,不携带DPL/FUC广告或其他本地未提交功能。
|
||||
|
||||
## 当前实现
|
||||
|
||||
- 素材:`public/images/ads/hn-ad-quality-20261030.png`,1962×801,SHA-256 `d90b99505237090b4936b3ea6fbc175605accce40c7aa8dee1b0940a3e85895b`;采用此前参考HN网站完成的深炭灰、绿紫光晕、渐变Hardnerd品牌字、独立眼镜H版本,不是旧纯黑版。
|
||||
- 素材:`public/images/ads/hn-ad-refined-20261031.png`,1964×801,SHA-256 `f7af72fd5074908418ffaf7f634ce620e8bb14b6029931ff06ab86ac7c95fe2f`;采用此前参考HN网站完成的深炭灰、绿紫光晕、渐变Hardnerd品牌字、独立眼镜H版本,不是旧纯黑版。
|
||||
- 位置:文章正文之后、标签之前,首页当前展示最新文章时同样显示;栏目列表不增加广告。满行宽高比2.45,圆角12px,无扫光,保留键盘焦点轮廓。
|
||||
- 模板:`components/hn-article-ad.blade.php`,独立加载`public/css/hn-article-ad.css`一次;生产文章模板直接引入HN组件,不调用本地DPL/HN/FUC汇总组件。
|
||||
- 生产`config/advertising.php`仅包含HN配置,`HN_AD_ENABLED`默认true,`HN_AD_URL`默认`https://hardnerd.net/`。链接新窗口打开,含`sponsored noopener noreferrer`。本地保留其他广告配置及`hn.loc`开发落地页。
|
||||
@@ -28,3 +30,13 @@ ## 广告文案定点更新(2026-10-30)
|
||||
用户指定将底部“了解 HN ↗”替换为“硬核专线架构,品质网络体验”。内置image_gen以原图为编辑目标,仅替换底部绿色文案并去除箭头,保留品牌图形、字形、主副标题和背景。新素材路径/尺寸/hash见当前实现;完整提示词 `output/hn-ad-release-20261030/quality-text-prompt.txt`,旧图保留回退。模板替代文字同步。
|
||||
|
||||
应用提交48a97f2820e3549580d3c7d1dff79197a9d0431e已推送codex/hn-ad-copy-20261030并在正式cfn检出;只增加新版图片和更新HN组件引用。24项服务器检查全部通过,含正式图片HTTPS完整SHA及页面引用/尺寸/链接/位置;没有HN业务站部署。回执 `output/hn-ad-copy-20261030/release.json` / `verification.json`;恢复点 `/root/backups/cfn-hn-ad-copy-20261030`。后续文档提交不改应用文件。已完成服务器侧验收,未做线上页面验收。
|
||||
|
||||
## 版式精简与侧栏撤广告(2026-10-31)
|
||||
|
||||
按用户指定删除HN底部绿字,白色文案改为“硬核架构,品质专线,全球网络畅通无阻”,两行品牌/文案重新居中并协调字号、字距与留白。内置image_gen编辑,最终提示词 `output/hn-ad-refine-20261031/prompt.txt`;当前图片见上表,旧文件保留恢复。
|
||||
|
||||
同时将 `components/banners.blade.php` 改为空输出组件,撤下首页、文章与列表的旧福云侧栏广告,包括“广告”标题及卡片。保留原调用避免影响其他布局,热门标签组件不变;未删除历史图片或改动FUC业务站。
|
||||
|
||||
基于现场HEAD `77f9b09c58b46ef2bbe0882ec89194bf25aa82cd` 构造隔离增量,应用提交 `6c94ecbd0bbfac229a63d650d95f80df608817b0` 已推送 `codex/hn-ad-refine-20261031` 并正式检出。仅三个应用文件;并行生成标签模板、data.ms、public/images/editorial与其他已发布功能保留。恢复点 `/root/backups/cfn-hn-ad-refine-20261031` 包含发布前Git bundle、tracked差异与回执。
|
||||
|
||||
清理nginx身份视图/响应缓存后完成31项服务器验收、0失败:首页、最新文章fn20261031、教程和列表均无旧福云图片及广告标题;HN新图、替代文案、位置、链接、尺寸和完整HTTPS SHA正确。最初检查错误地将热门标签共用CSS类当作广告残留,核对HTML后修正为广告图片/标题判据。回执 `output/hn-ad-refine-20261031/release.json` / `verification.json`。已完成服务器侧验收,未做线上页面验收。此次未发布HN业务站首页的本地调整。
|
||||
@@ -9,3 +9,9 @@ # 插画交付接收
|
||||
回退先停fna-illustration-delivery.timer和service、关闭开关;静态副本和旧配图保留。原同步/静态展示维护见[静态配图](LOCAL_ILLUSTRATIONS.md)。批次验收与具体SHA由Resource发布记录维护。
|
||||
|
||||
当前已上线,真实自动回执与既有停用图片的验收差异见[发布记录](/Users/hellcat/Documents/GemCodes/resource.loc/v2/docs/ILLUSTRATION_DELIVERY_RELEASE.md)。
|
||||
|
||||
## 2026-10-30 乔治002—011交付
|
||||
|
||||
用户明确批准发布后,通过唯一交付工具提交10张新画:002—006猫图至freenode,007—011狗图至shadowrocketids。批次`06025e43-7a07-5922-a60a-1b694398c28d`经received、awaiting_sync到completed,Resource处理1次、无错误,完成时间2026-10-30 11:09:41 UTC(北京时间19:09:41)。回执包含10项资产;completed表示FNA已核对本批静态副本及SHA并完成ACK,Resource再次确认发布、授权和图池成员。
|
||||
|
||||
私有交付目录为`storage/app/private/illustration-deliveries/20261030-george-002-011/`,含原图、完整提示词、delivery.json及receipt.json;原来源文件保留。画师只执行check、submit和status,后续由服务器自动处理,没有手工修改图池、分配旧文章或执行全量同步。本次无代码部署;已完成服务器侧自动交付验收,未做线上页面验收。
|
||||
@@ -0,0 +1,30 @@
|
||||
# 相关改动补齐发布(2026-10-31)
|
||||
|
||||
用户明确要求“李响那边的改动”“相关的没提交的都提交发布”。已精确读取“李响 - FNA_V支援”最近工作并核对同一本地目录,基于当前正式 `bd8b58a6cfde27067cfd176146bfa0ce4e860e3f` 隔离提交38个相关文件,推送分支 `codex/related-ui-ads-20261031`,正式检出应用提交 `add9ed489e5fa229d606e72e9f9065ea41cf8b43`。随后文档提交仍沿同一分支,最终HEAD见 `output/related-release-20261031/docs-release.json`;应用哈希保持不变。
|
||||
|
||||
目标仍为VPS-003 `/www/wwwroot/clashfreenode-new.com`、`https://clashfreenode.com/`,本机SSH经白色机执行。未发送跨聊天消息,未恢复test或访问HN/DPL/FUC业务后台。
|
||||
|
||||
## 本次补齐
|
||||
|
||||
- 李响最终确认的三张矮横幅:`DP-LINK.NET`字标;小写`hardnerd`、品牌大字/小标语/两行留白;福云“全球网络加速 / 五年稳定运营”。精确路径、原始尺寸及SHA见[素材清单](../assets/advertising/20261031/assets.json),原稿PNG随Git提交,六份完整原始/定点编辑提示词及来源说明一并归档。
|
||||
- 活动广告组件引用最终三图,尺寸及alt同步,广告标记保留。比例3.675:1,cover取景,福云center 40%;本次替换上一批临时使用的contain旧图展示。每次进入独立抽样、template候选、noscript回退和随机JS不变。
|
||||
- 共享广告配置合并保留生产DPL/HN/FUC启用环境开关。本地HN仍可预览hn.loc;生产环境回退为hardnerd.net,正式三家URL均已验收。未把本地硬编码enabled=true覆盖生产开关。
|
||||
- 文章与栏目模板清理已为空的侧栏广告include;免费节点新版、品牌、窄屏侧栏、综合教程去横幅/介绍及HN九折配置保持。
|
||||
- 补交原资源关注提示过滤的两项单元测试,以及相关维护入口、写作关系索引、周期教程台账、图片交付与test退役记录。
|
||||
- 已经发表的规则模式/TUN教程源稿和关联图源入Git。发布前将两篇HTML源与生产正文做SHA比对,均一致;仅补齐源码档案,没有重发API、修改正文、发布时间、文章ID或数据库图片关联。运行时editorial图片继续由文章发布机制维护。
|
||||
|
||||
## 对未提交文件的核对
|
||||
|
||||
本地主目录仍保留最初FN_B的旧Git基线,不根据它的M/??直接全量覆盖生产。对应用、配置、视图、路由、测试、公开CSS/JS与维护源进行服务器哈希比对:222个文件已与正式相同,无需重复发布。剩余差异逐项审查并归入本批或明确排除,清单在 `output/related-release-20261031/inventory.json`,最终38项文件SHA在manifest.json。
|
||||
|
||||
排除内容是私密.env及_env、node_modules/vendor、缓存与编译产物、生产自动生成标签模板、data.ms、运行时图片目录,以及未被当前页面引用的旧广告组件/迭代图片和试验字标。生产构建manifest沿现场版本,资源源码无新增打包需求,不从本地覆盖构建结果;未提交这些不等于还有未发布的活动广告。`.gitignore`差异只是同一忽略项的位置变化,无语义增量。生产未提交的生成标签模板和两个运行目录逐项保留,不以本地历史计数覆盖。
|
||||
|
||||
## 验收与恢复
|
||||
|
||||
- 本地11项测试/59断言通过,涵盖资源提示过滤、推荐配置/优惠、免费节点解析和订阅原值保护。
|
||||
- 桌面718×195.37、390视口354×96.32,三张均为3.675:1,图片自然尺寸与清单一致、无溢出,品牌/文案完整。实际文章活动广告DOM只有1张图片、图片加载成功,三个优惠码按钮保持。截图在本批输出目录ads-desktop.png、ads-mobile.png。临时预览页已删除,浏览器视口已恢复。
|
||||
- 正式149项服务器侧检查通过、0失败,覆盖首页/免费节点/苹果ID/两篇教程/两个栏目、新图引用与尺寸、随机脚本保留、三家生产跳转、HN九折、上一批UI及全部38文件哈希;三图与CSS的HTTPS完整SHA通过。
|
||||
- 189篇文章核心字段SHA不变,两篇已发表正文源SHA一致,.env及生产并行标签文件SHA不变。未执行数据库迁移、文章发布、通知、真实订阅下载或优惠核销。
|
||||
- 已清理nginx身份config/Blade/响应缓存。已完成服务器侧验收,未做线上浏览器页面验收。
|
||||
|
||||
恢复点VPS-003 `/root/backups/cfn-related-ui-ads-20261031`(0700),含原HEAD/status、Git bundle、tracked-before.patch、候选工作树及发布/验收回执;本地回执在 `output/related-release-20261031/`。没有后续发布时可检回 `bd8b58a6cfde27067cfd176146bfa0ce4e860e3f` 并清相同缓存;有后续变更时只反向撤销本批增量,提交推送后再更新。旧广告图仍在Git,回退不用恢复数据库、删除用户图片或关闭其他业务站。
|
||||
@@ -132,3 +132,12 @@ ## 文章点赞增量发布(2026-10-29)
|
||||
## 静态配图副本增量发布(2026-10-30)
|
||||
|
||||
功能提交`ce27dbdd1eb206a9b7e7ac9b5a1c77778ed75e03`已推送并部署test和正式,基于最新正式f315215保留年度点赞及并行生成模板;未发布广告。Resource保留素材/图池/分配,FNA保存按SHA去重的公开副本,Nginx直接提供。37份文件覆盖正式176篇、test174篇;35项/277断言自动测试、test283项及正式246项服务器检查均通过。正文/原始字段和年度点赞参数摘要不变,未新增后台任务或Resource权限。机制、恢复点和退役边界见[静态配图维护](LOCAL_ILLUSTRATIONS.md),逐项回执见[验收JSON](STATIC_ILLUSTRATIONS_RELEASE_2026-10-30.json)。已完成服务器侧验收,未做线上页面验收。
|
||||
|
||||
## test退役(2026-10-30)
|
||||
|
||||
用户明确要求正式切换后取消test,已撤销test DNS及测试应用/资源公开入口、停用专属证书续期;保留410拒绝旧DNS缓存请求,正式站不变。测试数据仅保留离线恢复用途,详情与验证见[test下线记录](TEST_RETIREMENT_2026-10-30.md)。此前“test继续在线”均为历史状态。
|
||||
|
||||
|
||||
## Resource独立后续管理升级(2026-10-30)
|
||||
|
||||
Resource图片V2已在0d9e71a图池基线上独立发布ATOM管理增量,当前运行SHA以[Resource管理正式发布](/Users/hellcat/Documents/GemCodes/resource.loc/v2/docs/MANAGEMENT.md#正式发布与服务器验收2026-10-30)为准;本页0d9e71a是FNA正式切换时的历史基线,不能据其覆盖当前资源服务。旧图片、37图池素材/引用及FNA消费者凭据保持,本次未改FNA代码/数据库/静态副本。
|
||||
@@ -0,0 +1,173 @@
|
||||
{
|
||||
"release_id": "daabedf9-a81c-49ca-995b-7b6832dd2254",
|
||||
"published_at": "2026-10-31T06:58:28+00:00",
|
||||
"phase": "complete",
|
||||
"receipt": {
|
||||
"publication_id": "c7f9be21-3914-43f1-b7e5-9e7b49ef224d",
|
||||
"status": "published",
|
||||
"articles": [
|
||||
{
|
||||
"content_key": "clash-routing-modes",
|
||||
"article_id": 382,
|
||||
"revision": 1,
|
||||
"content_changed": true,
|
||||
"url": "https://clashfreenode.com/a/clash-rule-global-direct.html"
|
||||
},
|
||||
{
|
||||
"content_key": "system-proxy-vs-tun",
|
||||
"article_id": 376,
|
||||
"revision": 2,
|
||||
"content_changed": true,
|
||||
"url": "https://clashfreenode.com/a/system-proxy-vs-tun.html"
|
||||
}
|
||||
],
|
||||
"effects": {
|
||||
"indexnow": {
|
||||
"status": "done",
|
||||
"attempts": 1,
|
||||
"http_status": 200,
|
||||
"urls": [
|
||||
"https://clashfreenode.com/a/clash-rule-global-direct.html",
|
||||
"https://clashfreenode.com/a/system-proxy-vs-tun.html"
|
||||
],
|
||||
"submitted_at": "2026-10-31T06:58:29+00:00",
|
||||
"result": "received"
|
||||
},
|
||||
"cache": {
|
||||
"status": "done"
|
||||
},
|
||||
"search": {
|
||||
"status": "done",
|
||||
"method": "meilisearch",
|
||||
"index": "cfn_articles_v3",
|
||||
"documents": 2
|
||||
},
|
||||
"sitemap": {
|
||||
"status": "done",
|
||||
"method": "database-driven"
|
||||
}
|
||||
}
|
||||
},
|
||||
"readback": [
|
||||
{
|
||||
"content_key": "clash-routing-modes",
|
||||
"article_id": 382,
|
||||
"revision_matches": true,
|
||||
"content_matches": true,
|
||||
"body_sha256": "b9986ade5893115611f8a02070f5e98ba2fb8b7d9a100dff39e11ff60876c5c2",
|
||||
"like_growth": {
|
||||
"seven_day_remaining": 29,
|
||||
"yearly": 50,
|
||||
"one_year_target": 241,
|
||||
"one_year_added": 0,
|
||||
"one_year_started_at": "2026-10-31 06:58:28"
|
||||
}
|
||||
},
|
||||
{
|
||||
"content_key": "system-proxy-vs-tun",
|
||||
"article_id": 376,
|
||||
"revision_matches": true,
|
||||
"content_matches": true,
|
||||
"body_sha256": "255db797e5e1403ee779e960e2129558e160badf0fe53f1822250b8d45e0ddb3",
|
||||
"like_growth": {
|
||||
"seven_day_remaining": 0,
|
||||
"yearly": 50,
|
||||
"one_year_target": 106,
|
||||
"one_year_added": 0,
|
||||
"one_year_started_at": "2026-10-29 13:30:35"
|
||||
}
|
||||
}
|
||||
],
|
||||
"display_published_at_utc": "2026-10-31 02:10:28",
|
||||
"http": {
|
||||
"new_page": 200,
|
||||
"chapter_anchors": [
|
||||
"custom",
|
||||
"groups",
|
||||
"modes",
|
||||
"order",
|
||||
"troubleshoot",
|
||||
"verify"
|
||||
],
|
||||
"images": [
|
||||
{
|
||||
"path": "/images/editorial/417b203a4af30200b6ed3b37d0b0e823a9b47db49e2d743b1110b35329cc5de8.png",
|
||||
"status": 200,
|
||||
"sha256_matches": true
|
||||
},
|
||||
{
|
||||
"path": "/images/editorial/98a43bdd771dd4c6c5ec6b87bb5f0ebf679fa2b228dddbb764adecf50b0374e9.png",
|
||||
"status": 200,
|
||||
"sha256_matches": true
|
||||
}
|
||||
],
|
||||
"links": [
|
||||
{
|
||||
"target": "/a/clash-verge-rev-windows.html#enable",
|
||||
"status": 200,
|
||||
"anchor_exists": true
|
||||
},
|
||||
{
|
||||
"target": "/a/m173.html#enable",
|
||||
"status": 200,
|
||||
"anchor_exists": true
|
||||
},
|
||||
{
|
||||
"target": "/a/mihomo-dns-leak.html#dns-2",
|
||||
"status": 200,
|
||||
"anchor_exists": true
|
||||
},
|
||||
{
|
||||
"target": "/a/system-proxy-vs-tun.html#routing",
|
||||
"status": 200,
|
||||
"anchor_exists": true
|
||||
},
|
||||
{
|
||||
"target": "/a/system-proxy-vs-tun.html#troubleshoot",
|
||||
"status": 200,
|
||||
"anchor_exists": true
|
||||
}
|
||||
],
|
||||
"incoming_link": true,
|
||||
"directory": {
|
||||
"owner": "nginx",
|
||||
"mode": "0o755"
|
||||
},
|
||||
"head": "77f9b09c58b46ef2bbe0882ec89194bf25aa82cd"
|
||||
},
|
||||
"local_browser": {
|
||||
"checks": [
|
||||
{
|
||||
"width": 1360,
|
||||
"scroll": 1360,
|
||||
"headings": [
|
||||
"01 三个模式,改变的是出口选择",
|
||||
"02 换了节点没效果,可能换错了组",
|
||||
"03 先看顺序,再看规则写得对不对",
|
||||
"04 在 Verge Rev 里给一个网站添加规则",
|
||||
"05 改完以后,检查一条新连接",
|
||||
"06 几种常见现象,对应查哪里"
|
||||
],
|
||||
"brokenImages": [],
|
||||
"tables": 2,
|
||||
"images": 2
|
||||
},
|
||||
{
|
||||
"width": 390,
|
||||
"scroll": 390,
|
||||
"headings": [
|
||||
"01 三个模式,改变的是出口选择",
|
||||
"02 换了节点没效果,可能换错了组",
|
||||
"03 先看顺序,再看规则写得对不对",
|
||||
"04 在 Verge Rev 里给一个网站添加规则",
|
||||
"05 改完以后,检查一条新连接",
|
||||
"06 几种常见现象,对应查哪里"
|
||||
],
|
||||
"brokenImages": [],
|
||||
"tables": 2,
|
||||
"images": 2
|
||||
}
|
||||
],
|
||||
"blockedOrigins": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
# 规则、全局与直连教程 · 2026-10-31
|
||||
|
||||
## 本次授权与范围
|
||||
|
||||
用户要求“现在就来一篇,当检测触发了”。本次作为提前的人工触发登记到2026-10-26周的 `2026-10-26-manual-1` 槽位,不改变2026-11-02起的每周三篇计划。本篇已按真实发布回执计入当周额度。
|
||||
|
||||
新文内容键 `clash-routing-modes`,路径 `/a/clash-rule-global-direct.html`,栏目综合教程。两张解释图、一张沿用现有样式的封面。系统代理/TUN文章只在 `#choose` 前补一个新文 `#groups` 入口,其余内容不改。新文链接Windows入门 `#enable`、Mac入门 `#enable`、TUN `#routing` / `#troubleshoot`、DNS `#dns-2`。
|
||||
|
||||
## 资料与质量检查
|
||||
|
||||
2026-10-31阅读 Mihomo 官方运行模式、路由规则、手动/自动代理组文档,以及 Clash Verge Rev 名词解释、自定义规则文档。准确链接保留在正文。原创示例使用example.com,不把配置片段写成完整可直接导入的订阅。未开展客户端真机联网实测,此边界只留维护记录。
|
||||
|
||||
本地实际模板桌面1360和手机390检查:均无横向溢出、2张正文图无破图、2张表格正常渲染、6个章节锚点存在。浏览器请求先按本地origin白名单拦截;没有本机线上页面访问。初次检查发现本地Vite未运行,启动原5187开发服务后复检通过,未改样式。正式签名预览由VPS-003内部Kernel渲染,未在本机打开其线上资源。
|
||||
|
||||
## 发布与恢复
|
||||
|
||||
- release_id:`daabedf9-a81c-49ca-995b-7b6832dd2254`
|
||||
- publication_request_id:`c7f9be21-3914-43f1-b7e5-9e7b49ef224d`
|
||||
- draft hash:`6ebc848487be507cd71e61016bf1232f1fc7c28b4042f019ff63654c8e29c486`
|
||||
- 正式冻结默认值:i7like 29,i365like 50,一次性年度目标241;显示偏移17280秒。旧文设置不变。
|
||||
- 本地已通过API发表:新文ID366/版本1,TUN ID365/版本2;本地IndexNow禁用并返回skipped。
|
||||
- 正式首次publish失败;原ID status确认尚无发表回执,草稿仍draft。VPS-003错误为ContentRenderer.php:83 mkdir Permission denied;公开图片目录 `public/images/editorial` 不存在,上级root:root0755,API运行身份nginx无法创建。私有资产上传目录nginx:nginx0700正常。
|
||||
- 创建该专用目录并设nginx:nginx0755的操作被自动审批拒绝(持久生产权限变更);用户随后明确批准“允许,仅创建这个专用目录并继续发布”,已按该范围创建并验证;其他目录所有权与权限未改。沿原release恢复,未另起发布请求。
|
||||
- 私有工作文件:本机 `/private/tmp/fna-modes-20261031/`;服务器原release台账位于 `storage/app/private/editorial-releases/daabedf9-a81c-49ca-995b-7b6832dd2254.json`。
|
||||
|
||||
## 最终验收
|
||||
|
||||
正式发布完成:2026-10-31 14:58:28北京时间(服务器回执06:58:28 UTC),新文ID382/版本1,TUN ID376/版本2。展示时间比实际时间提前17280秒(4小时48分);点赞29/50/241已回读,旧文106年度目标及起点保留。新文全文与冻结版、两文版本、三张上传图片文件SHA由发布封装回读一致。
|
||||
|
||||
IndexNow由VPS-003在14:58:29北京时间提交新文和旧文更新两条URL,HTTP200、attempts1;白色机仅转发SSH。缓存、Meilisearch与sitemap均done,phase complete。此结果表示通知接收,不表示搜索引擎已收录。
|
||||
|
||||
服务器侧真实HTTP:新文200,2张正文图200且SHA一致;5条正文关联链接200且锚点存在,TUN旧文入向链接存在,6个章节锚点齐全。目录nginx所有/0755回读通过。已完成服务器侧验收,未做线上页面验收。本机浏览器只验收本地实际模板。
|
||||
|
||||
周期台账已用原release回执record到2026-10-26-manual-1,实际发表时间用于计数;2026-11-02当周三个计划未改。正文、图源、PNG、渲染HTML、关系索引同步保存,机器可读回执见[发布证据](ROUTING_MODES_2026-10-31.json)。
|
||||
|
||||
如需回退,旧文可从API版本1创建回退草稿,新文保留同URL通过API修订;不直接SQL修改,也不为撤回图片删除共享内容寻址资源。专用图片目录是API后续发文必需部署项,新增部署前应检查该目录归属与nginx写入能力。
|
||||
@@ -0,0 +1,55 @@
|
||||
# FNA_V3 SEO 实施与发布 · 2026-10-31
|
||||
|
||||
用户授权:落实已讨论方案,并全权优化 FNA_V3 SEO。范围为正式 cfn 的增量;开发初始基线 `77f9b09c58b46ef2bbe0882ec89194bf25aa82cd`;上线前发现HN广告并行发布,最终基线改为 `a820755e7e914180178e6928f73d5b42b0b24c86`,4个并行文件均不在本批覆盖范围,经白色机到 VPS-003 `/www/wwwroot/clashfreenode-new.com`。本地隔离工作副本 `output/seo-20261031/stage`。本文件是实现和本批验收唯一正文,36项总状态仍在 [SEO_PLAN](SEO_PLAN.md)。
|
||||
|
||||
搜索渠道按用户此前与雷欧确认的 Yandex / Bing 优先,保留通用搜索兼容;两者均支持本批采用的规范URL、sitemap与IndexNow。依据:[Bing指南](https://www.bing.com/webmasters/help/webmaster-guidelines-30fba23a)、[Yandex IndexNow](https://www.yandex.com/support/webmaster/en/indexing-options/index-now.html)、[IndexNow协议](https://www.indexnow.org/documentation)(2026-10-31核对)。
|
||||
|
||||
> 用户于本批上线后明确纠正:只做内部SEO,界面必须与优化前一致。可见布局、说明、分页、标题和图片呈现已恢复到优化前,修复已上线;现行约束及验证以[界面保留修复](SEO_UI_RESTORE_2026-10-31.md)为准,下面保留首批发布历史。
|
||||
|
||||
## 首批实现记录
|
||||
|
||||
- 首页 `/` 使用稳定标题/H1、WebSite、独立 canonical,显示最近可用记录全文及真实记录时间;明确零结果或失败不顶替上次记录,无可展示记录返回503/Retry-After。`/freenode` 是带历史说明的分页归档。旧的 `/?page=N` 定向到对应归档页;首页不是分页第一页。
|
||||
- 新免费节点记录创建即 `sSeoPolicy=archive`,可浏览、noindex、退出sitemap;已有资源仍保留分类7天策略,教程不继承资源期限。没有批量删除、合并、301到首页或恢复历史收录。取消 ClearDb 的180天正文删除,30天点赞明细清理保留。
|
||||
- `Seo` + `Articles::publicVisible` 统一公开、索引、URL、元信息。草稿、未来文章、隐藏分类或父分类在详情、列表、标签、搜索、推荐、sitemap中一致排除。已知平级子栏目一跳到真实父路径,错误父路径404,旧文章路径不变。Android/iOS纠正显示名称,保留原andorid路径。
|
||||
- 合法分页每页20条、自引用canonical带页码,移除跟踪参数;page=1归一,0/负数/非数字/数组/重复/越界404。HTML上一页下一页,JS读取实际下一页链接,追加去重、更新末页导航。robots放行查询参数,保留非内容路径限制。
|
||||
- 搜索使用当前站点数据库公开查询,转义LIKE通配字符,支持中文、空结果、无JS GET表单;不依赖过期的Meilisearch结果,也不删除/重建共享索引。现有发布索引副作用保留。普通浏览标签noindex,不做无流量证据的同义合并。
|
||||
- 去掉全局“今天”简介;纯文本实体解码、空白清洗、标题转义。首页、栏目、标签、搜索和文章各有主题。分享复制当前规范文章URL,OG一致,绝对图片URL,增加Twitter和真实Article/BreadcrumbList/CollectionPage结构;不输出评分或伪造作者资历。
|
||||
- 新增nullable `sContentUpdatedAt`:仅有实质内容变动时写入,点赞不改变。旧数据未知修改时间省略lastmod,不以updated_at冒充。新sitemap包含非空有效栏目、首页及可索引文章,排除日更新快照;栏目未建立可信历史时钟时不输出lastmod。
|
||||
- 免费节点接收校验字段与结果,失败、零节点、空正文拒绝并保留旧文。兼容旧摘要中的明确数量,状态默认unknown;数量不等于客户端连接实测,未向上游伪造check字段。已被编辑API接管的教程拒绝旧接口覆盖。
|
||||
- 原编辑API的持久IndexNow回执继续使用,实质更新通知文章与相关栏目;日更通知首页/栏目,取消无差别直接推送快照。新增 `seo_notifications` 出站表及业务服务器 `seo:indexnow-retry` 每5分钟最多10条、去重、5分钟到24小时退避;删除事件可以通知404地址,日志不含密钥。既有回执不自动补推,200/202仅代表接收。
|
||||
- HTML包含会话/点赞和随时间变化策略,因此关闭整页响应缓存路径(原生产也已关闭);静态资源缓存继续使用。GET点赞不再写数据,改POST+CSRF。非内容请求输出noindex头,旧/test路由仅local注册。
|
||||
- 保留教程横幅和既有广告;封面从CSS背景改为可发现img且保持原卡片比例,本地图片取真实尺寸;确认的福云/Hardnerd推广链接补sponsored,普通引用不一律nofollow。移动菜单增加可访问名称、展开状态、Escape关闭与焦点返回;无JS有导航和搜索后备。
|
||||
- 不新增后台:本次设置由现有应用配置维护,后续若做可视管理沿ATOM规范。域名不变无需DomainHub变更;未新增TeleHub消息,原日更通知调用保持。
|
||||
|
||||
## 验证
|
||||
|
||||
- 独立SQLite、冻结时钟和HTTP替身,62项业务测试523断言通过,无警告(APP_URL显式提供)。包含原编辑发布/重试、插画交付与独立副本、年度点赞、新URL/可见性/时间/清理/IndexNow合同。未往业务库插入测试文章。
|
||||
- 本地工作区最终整套64项/527断言通过,无警告。旧Laravel示例测试在未建表时访问首页,修正为独立健康入口启动及noindex检查;首页内容已有完整隔离数据测试。生产派生版本原62项/523断言通过,且本地/生产广告差异分别保留。
|
||||
- Vite正式构建通过;JS gzip约80.25KB,主题CSS gzip141.79KB。仅性能体积基线,不是线上CWV成绩;未重写框架。
|
||||
- 临时回环合成数据浏览器:从第2页滚动到第3页,26条且26个唯一ID、末页无next;390/320宽无横向溢出,菜单展开/键盘Escape;禁用JS仍有下一页链接。临时浏览器设置已复原。该验收不是生产页面验收。
|
||||
- 本地固定入口 `fna-v3.loc` 首页、免费节点第2页、Windows栏目均200,canonical使用本地域名,非生产统一noindex/nofollow。生产验收与精确提交、恢复点见下节。
|
||||
|
||||
## 保留边界与后续证据
|
||||
|
||||
历史正文、ID、URL、发布时间、插画关联和现有点赞设置不批量改动。旧资源7天noindex是过渡保留规则,不是给首页“转权重”的工具;未来按真实流量/外链与独立价值逐条处理。旧账号重复组保留既有noindex,不机械删文。既有客户端教程已经上线,本批不重写正文,未做客户端实机联网验证。
|
||||
|
||||
旧文章接收接口缺少入站认证;master01 `FnSitePublish::fn_b` 当前本地调用实现不带token,Nginx也未发现该路径专门认证。不得单方面启用token导致日更中断;需要在master01/FNA共同核对真实调用方并完成有兼容期的认证切换。当前编辑API认证保持,公网默认关闭。本批不把SEO发布宣称为旧接口安全问题全部解决。
|
||||
|
||||
未获取Search Console/Bing/Yandex的查询、外链、索引报告,不能据此承诺排名或声称历史URL没有流量;搜索平台效果、真实用户CWV、全部设备体验仍须后续数据观察。作者/运营反馈资料不虚构,现有点赞业务按用户此前明确设定保留,未作为搜索结构化评分。
|
||||
|
||||
## 回滚合同
|
||||
|
||||
代码回到本批base;只恢复本批覆盖的构建文件及缓存。新增列/出站表可保留,不还原整库覆盖发布后新文章。若需要撤销迁移,先确认无新写入并导出出站状态;默认不执行down。保留并行generated-tags-cloud、data.ms和public/images/editorial,禁止reset --hard/clean。不重启共享PHP-FPM;只定点失效本站变更文件OPcache。
|
||||
|
||||
## 发布记录
|
||||
|
||||
状态:**本批技术优化已Git提交、推送并部署正式cfn,服务器侧验收通过**。功能提交 `7c11ca77bcad5880ee0d50610f05419d40e18d46`,分支 `codex/fna-seo-20261031`,最终基线 `a820755e7e914180178e6928f73d5b42b0b24c86`;后续只同步本批文档与健康检查测试,不改运行代码。脱敏证据见 [发布回执](SEO_RELEASE_2026-10-31.json)。
|
||||
|
||||
- 189篇文章逐项HTTP200、规范地址、index/noindex、Article结构化数据及OG地址通过;全部核心字段、ID、日期、配图和旧编辑发布回执哈希保持。35个sitemap目标逐项200、自引用canonical、index/follow,无重复。原28项中的首页仅统一尾斜杠,原文章地址无移除,新增7个有效栏目。
|
||||
- 正式首页独立WebSite身份与最近可用文章一致;合法第2页及实际第3页HTML链接通过,非法父路径、无效/越界/重复分页均404。HTTP首页一跳301到HTTPS,HTTPS证书校验成功;XML、robots、CSS/JS状态及MIME通过。只存在已登记主域Nginx server_name,未为验收猜测www别名。
|
||||
- 编辑公网API保持关闭,调试路由404;原和新增IndexNow调度均在业务服务器存在。2026-10-31 15:52:55北京时间,由新持久队列通知首页及9个栏目共10个URL,回执done、1次、HTTP200;仅证明已接收,不代表已抓取、已收录或排名提升。未修改旧发布回执或补推历史文章。
|
||||
- 保留刚上线的HN广告调整、生产生成标签模板及data.ms、public/images/editorial并行目录。未改变DNS、邮件、Resource或其他实例;本地保留其DPL/FUC/HN组合广告差异,没有将本地其他未发布修改带上线。
|
||||
- 第一次切换因验收把首页尾斜杠变化当成URL丢失而自动回滚,已核实只有该等价变化;严格保留其他URL差异检查后再次切换成功。最终维护窗口1.34秒,维护标记已撤。未重启共享FPM,只定点失效本站PHP文件OPcache。
|
||||
- 私有恢复点:VPS-003 `/root/backups/cfn-seo-20261031/`,包含Git bundle、整库一致性备份、环境、Nginx、旧构建、前后状态、回滚失败原因与实际验收。新增SEO列与出站表为追加迁移,本地171篇原行旧字段保持;生产不回灌整库。
|
||||
|
||||
已完成服务器侧验收,未做线上页面验收。搜索平台报告、设备实机和真实用户性能不因这次技术发布自动完成;分项状态在SEO_PLAN。
|
||||
@@ -1,8 +1,12 @@
|
||||
> 2026-10-31界面约束更新:只做内部SEO,保持优化前外观。可见分页、说明/H1及列表图片改造撤回;以[界面恢复](SEO_UI_RESTORE_2026-10-31.md)为准,不能沿旧清单重新改版。
|
||||
|
||||
> 2026-10-31最新状态:本批技术实现已发布正式cfn,189篇服务器侧验收通过、原数据保持;sitemap 35项,IndexNow首页/栏目通知HTTP200。实现、限制及精确发布证据见 [SEO实施记录](SEO_IMPLEMENTATION_2026-10-31.md)。原审计的“未实施/未发布”仅描述其当时状态。
|
||||
|
||||
# FNA_V3 SEO 优化建议与执行清单
|
||||
|
||||
评估日期:2026-10-22,Asia/Shanghai。状态:**分析与建议文档已完成;SEO-001 的部署定位已由用户确认,配置改造尚未实施;SEO-020 于2026-10-27完成本地教程正文更新,设备实测及生产验收未做,D02首页最新免费节点全文展示于2026-10-27本地完成,其余项目尚未实施**。本文件是后续 SEO 工作的唯一执行清单;按 `SEO-001` 至 `SEO-036` 跟踪,实施后在本文件更新结果,不另建重复的“最新版计划”。
|
||||
初始评估:2026-10-22,Asia/Shanghai;执行状态更新:2026-10-31。**本批技术优化已正式部署,20项按当前技术范围完成,16项仍有分项或长期证据缺口。** 本文件是唯一执行清单;下方审计证据保留原日期与原采样值,当前状态看第5节和[实施记录](SEO_IMPLEMENTATION_2026-10-31.md),不把旧审计的“未发布”当作当前状态。
|
||||
|
||||
本轮依据当前代码、当前本地数据库、重新取得的 HTTP 响应及受限浏览器检查形成结论。网站源码、样式和业务数据未作修改。当前三款 DPL 广告属于已存在的实现,纳入分析基准并保留。网站仍在独立本地副本中开发;用户随后确认未来替换现有 cfn,并支持同一套代码部署多个同类站点,ClashFreeNode 为主力站,尚未实际部署或迁移。
|
||||
初始审计依据当时本地代码、数据库、HTTP及受限浏览器形成,只读未改站;当时的DPL广告纳入基准。cfn已于2026-10-29正式切换,本批SEO于2026-10-31增量部署,具体上线范围不从初始快照推断。
|
||||
|
||||
**最优先的工作是让有价值的内容拥有唯一、稳定、可发现的地址,并让页面真实兑现搜索结果中的承诺。** 当前主要问题集中于重复 URL、分页发现路径、内容生命周期和资源质量;仅增加标题、关键词或结构化数据不能解决这些问题。现有 Laravel Blade 已能在首次 HTML 响应中输出文章正文,没有证据表明必须改用另一套框架或全面重写网站。
|
||||
|
||||
@@ -24,9 +28,9 @@ ## 1 如何阅读和执行
|
||||
|
||||
证据等级:**已确认**指本轮代码、数据或响应直接支持;**条件性风险**指相关代码存在,但触发条件或生产影响未确认;**策略建议**指需要结合业务取舍决定;**待线上验证**指必须有实际生产环境或搜索平台数据才能判断。
|
||||
|
||||
本报告以 Google 的技术要求为主要参照;通用的 URL、HTTP、内容与内链原则也有助于其他搜索引擎。Bing、百度等渠道的具体投入,应由目标用户和后续数据决定,不能假定它们完全采用相同的收录规则。
|
||||
2026-10-22审计以Google资料作为技术参考。按用户随后与雷欧明确的实际来源,2026-10-31实施以 **Yandex / Bing** 为主要搜索渠道,兼顾通用抓取与索引规则;使用IndexNow通知,效果核验优先两平台Webmaster报告,不把Google报告当作唯一指标。各平台是否收录与排序分别核实。
|
||||
|
||||
## 2 当前状态和核心判断
|
||||
## 2 2026-10-22审计基线与判断
|
||||
|
||||
### 2.1 检查范围
|
||||
|
||||
@@ -94,7 +98,7 @@ ### 2.4 关键因果关系
|
||||
|
||||
## 3 实施前需要确定的产品决策
|
||||
|
||||
D01、D02 已由用户确认;其余条目仍是建议,未因这些确认而自动获批。
|
||||
D01、D02早期已确认;2026-10-31用户确认讨论方案并授权全面优化。历史去留仍须逐条依据内容/流量证据,不授权无差别删除。
|
||||
|
||||
| 决策 | 方案与确认状态 | 为什么 | 影响范围 |
|
||||
| --- | --- | --- | --- |
|
||||
@@ -103,16 +107,16 @@ ## 3 实施前需要确定的产品决策
|
||||
| D03 日更文章的角色 | 稳定资源入口承接“当前可用”的需求;有独立记录价值的日更页保留,重复或失败记录不争取搜索曝光 | 用户需要可用资源,日期变动本身不是新价值 | 003、017、018 |
|
||||
| D04 历史内容 | 先按有效性、独立信息、已有流量/外链分类,再决定 index、noindex、合并或删除 | 不批量把 148 篇开放收录,也不机械全删/全跳首页 | 003、018、036 |
|
||||
| D05 标签 | 只培养有独立意图、有可维护内容的标签页;其余可保留浏览功能并 noindex | 25 个标签中存在同义名称和高度重叠文章集合 | 015 |
|
||||
| D06 渠道和目标 | 首先定义有效自然访问和实际使用完成率,Google 为初始技术基线;其他渠道按目标市场补充 | 没有搜索量和 Search Console 数据时不能编造关键词机会或流量预测 | 002、035 |
|
||||
| D06 渠道和目标 | 用户已明确Yandex/Bing为主要来源,按两平台有效自然访问、索引原因与实际使用完成率评估,Google保留通用兼容 | 没有搜索量和 Search Console 数据时不能编造关键词机会或流量预测 | 002、035 |
|
||||
| D07 样式边界 | 保持既有视觉语言和已批准广告方案;标题语义、链接、数据真实性先行;新增可见信息或调整广告占比单独评审 | SEO 改动不默认授权重设计整站或移除已批准广告 | 010、023、027 |
|
||||
|
||||
D01 的部署角色已明确。具体生产映射、新增实例清单以及多站相同内容的收录归属仍需在相应实施项确定;不阻塞本地分页、URL 规则和元数据开发。用户尚未授权本次上线或修改现有 cfn。
|
||||
D01 的部署角色已明确。具体生产映射、新增实例清单以及多站相同内容的收录归属仍需在相应实施项确定;不阻塞本地分页、URL 规则和元数据开发。该段为2026-10-22审计历史;2026-10-31用户已授权全面落实,当前发布状态见本批实施记录。
|
||||
|
||||
## 4 建议采用的 URL 与索引规则
|
||||
|
||||
### 4.1 页面行为矩阵
|
||||
|
||||
下表为建议合同,实施前与 D02–D05 一起确认。
|
||||
下表为初始目标合同;2026-10-31已实施部分按第5节及实施记录核验。标签index、历史合并等条件项未自动开启。
|
||||
|
||||
| 页面类型 | 建议 HTTP | 抓取与索引 | Canonical | Sitemap |
|
||||
| --- | --- | --- | --- | --- |
|
||||
@@ -166,46 +170,48 @@ ### 4.3 内容模型的最小改造方向
|
||||
|
||||
## 5 执行总表
|
||||
|
||||
所有项目当前均未实施。依赖列用于确定顺序,不是要求一次性同时完成全部项目。
|
||||
2026-10-31用户授权全权落实。最新实现和验证见[本批实施记录](SEO_IMPLEMENTATION_2026-10-31.md);下方历史审计描述保留日期语义,以下总表以本次状态为准。
|
||||
|
||||
| 完成 | 编号 | 项目 | 优先级 | 主要依赖 | 当前性质 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| [ ] | SEO-001 | 明确公开身份、主域名和环境边界 | P0 发布前 | D01 | 部署定位已确认,配置待实施 |
|
||||
| [ ] | SEO-002 | 确定搜索意图、目标用户和效果基线 | P1 | D06 | 待决策/待数据 |
|
||||
| [ ] | SEO-003 | 确定内容生命周期与索引资格 | P0 策略 | D03、D04 | 待决策 |
|
||||
| [ ] | SEO-004 | 统一规范 URL 和历史别名 | P0 | D02 | 已确认 |
|
||||
| [ ] | SEO-005 | 修复分页发现与滚动加载 | P0 | 004 | 已确认 |
|
||||
| [ ] | SEO-006 | 协调 robots、参数和 noindex | P0 | 003、005 | 已确认 |
|
||||
| [ ] | SEO-007 | 修复无效分页、空结果与错误状态 | P0 | 004、005 | 已确认 |
|
||||
| [ ] | SEO-008 | 统一公开可见性与发布时间判断 | P0 发布前 | 003 | 条件性风险 |
|
||||
| [ ] | SEO-009 | 修复面包屑和全站内链地址 | P1 | 004 | 已确认 |
|
||||
| [ ] | SEO-010 | 分类、标签、搜索的标题与语义层级 | P1 | 001、004 | 已确认 |
|
||||
| [ ] | SEO-011 | 生成真实、干净的页面简介 | P1 | 010 | 已确认 |
|
||||
| [ ] | SEO-012 | 分离真实内容日期并统一时间基准 | P1 | 003 | 已确认/条件性风险 |
|
||||
| [ ] | SEO-013 | 统一 sitemap 的集合和 lastmod | P1 | 003、004、008、012 | 已确认 |
|
||||
| [ ] | SEO-014 | 建立长期内链和内容导航 | P1 | 005、009、018 | 已确认/策略建议 |
|
||||
| [ ] | SEO-015 | 整理标签与重复主题页 | P1 | 002、003 | 策略建议 |
|
||||
| [ ] | SEO-016 | 隔离并同步本站搜索索引 | P1 | 008、032 | 已确认 |
|
||||
| [ ] | SEO-017 | 建立空资源与检测失败的发布门槛 | P0 内容 | 003 | 已确认/待上游核实 |
|
||||
| [ ] | SEO-018 | 建立稳定资源入口和日更归档策略 | P1 | 002、003、004、017 | 策略建议 |
|
||||
| [~] | SEO-019 | 处理真实重复文章与跨平台内容(本地Mac/Linux教程已区分) | P1 | 003、004 | 已确认 |
|
||||
| [~] | SEO-020 | 提升客户端教程的任务完成能力(本地全栏目正文完成,实机/生产未验收) | P1 | 002、019 | 已确认/内容建议 |
|
||||
| [ ] | SEO-021 | 明确来源、验证和跨站内容差异 | P1 | 017、020 | 策略建议 |
|
||||
| [ ] | SEO-022 | 作者、编辑责任与真实互动数据 | P1 | 001、012 | 已确认/策略建议 |
|
||||
| [ ] | SEO-023 | 推广链接、广告与正文体验 | P1 | D07 | 部分已具备,仍有缺口 |
|
||||
| [ ] | SEO-024 | 添加匹配真实内容的结构化数据 | P2 | 009、010、012、022 | 增强项 |
|
||||
| [ ] | SEO-025 | 修复分享地址和社交预览信息 | P2 | 001、004、011 | 已确认 |
|
||||
| [ ] | SEO-026 | 图片语义、尺寸和加载方式 | P2 | 020、028 | 已确认/待测量 |
|
||||
| [ ] | SEO-027 | 手机端与无障碍完整验收 | P2 | 005、010 | 部分样本通过 |
|
||||
| [ ] | SEO-028 | 建立正式构建性能基线并按瓶颈优化 | P2 | 026、027 | 待测量 |
|
||||
| [ ] | SEO-029 | 缓存与发布、撤稿、到期一致性 | P1 启用前 | 003、008、012 | 条件性风险 |
|
||||
| [ ] | SEO-030 | 文章接收、更新与删除的发布合同 | P0 发布前 | 003、008、017、029 | 已确认/条件性风险 |
|
||||
| [ ] | SEO-031 | 正式主机、HTTPS 与 HTTP 服务质量 | P0 发布前 | 001、004 | 待部署验证 |
|
||||
| [ ] | SEO-032 | 本地、预发布和生产资源隔离 | P0 发布前 | 001 | 已确认/条件性风险 |
|
||||
| [ ] | SEO-033 | 规范 IndexNow 及搜索提交 | P2 | 003、004、030、032 | 已确认/待部署验证 |
|
||||
| [ ] | SEO-034 | SEO 自动回归与数据样例 | P1 | 跟随各批次 | 当前测试缺口 |
|
||||
| [ ] | SEO-035 | 搜索平台与业务效果监测 | P1 上线后 | 001、002、036 | 待线上数据 |
|
||||
| [ ] | SEO-036 | 发布、迁移、回滚与复核 | P0 发布时 | 前述必需项 | 待发布授权 |
|
||||
| [x] | SEO-001 | 明确公开身份、主域名和环境边界 | P0 发布前 | D01 | 已发布;本地回归及服务器侧验收通过 |
|
||||
| [~] | SEO-002 | 确定搜索意图、目标用户和效果基线 | P1 | D06 | 页面意图已区分;Yandex/Bing流量基线未取得 |
|
||||
| [x] | SEO-003 | 确定内容生命周期与索引资格 | P0 策略 | D03、D04 | 已发布;本地回归及服务器侧验收通过 |
|
||||
| [x] | SEO-004 | 统一规范 URL 和历史别名 | P0 | D02 | 已发布;本地回归及服务器侧验收通过 |
|
||||
| [~] | SEO-005 | 修复分页发现与滚动加载 | P0 | 004 | 滚动与canonical修复保留;原界面不新增分页条,无JS翻页未提供 |
|
||||
| [x] | SEO-006 | 协调 robots、参数和 noindex | P0 | 003、005 | 已发布;本地回归及服务器侧验收通过 |
|
||||
| [x] | SEO-007 | 修复无效分页、空结果与错误状态 | P0 | 004、005 | 已发布;本地回归及服务器侧验收通过 |
|
||||
| [x] | SEO-008 | 统一公开可见性与发布时间判断 | P0 发布前 | 003 | 已发布;本地回归及服务器侧验收通过 |
|
||||
| [x] | SEO-009 | 修复面包屑和全站内链地址 | P1 | 004 | 已发布;本地回归及服务器侧验收通过 |
|
||||
| [~] | SEO-010 | 分类、标签、搜索的标题与语义层级 | P1 | 001、004 | head元信息保留;可见H1/栏名完全沿用原界面 |
|
||||
| [x] | SEO-011 | 生成真实、干净的页面简介 | P1 | 010 | 已发布;本地回归及服务器侧验收通过 |
|
||||
| [x] | SEO-012 | 分离真实内容日期并统一时间基准 | P1 | 003 | 已发布;本地回归及服务器侧验收通过 |
|
||||
| [x] | SEO-013 | 统一 sitemap 的集合和 lastmod | P1 | 003、004、008、012 | 已发布;本地回归及服务器侧验收通过 |
|
||||
| [~] | SEO-014 | 建立长期内链和内容导航 | P1 | 005、009、018 | 内链地址修复保留;新增说明和导航撤销 |
|
||||
| [~] | SEO-015 | 整理标签与重复主题页 | P1 | 002、003 | 普通标签noindex已上线;历史主题合并待流量证据 |
|
||||
| [x] | SEO-016 | 隔离并同步本站搜索索引 | P1 | 008、032 | 已发布;本地回归及服务器侧验收通过 |
|
||||
| [~] | SEO-017 | 建立空资源与检测失败的发布门槛 | P0 内容 | 003 | 零结果/失败门槛已上线;上游结构化实测字段待接入 |
|
||||
| [x] | SEO-018 | 建立稳定资源入口和日更归档策略 | P1 | 002、003、004、017 | 已发布;本地回归及服务器侧验收通过 |
|
||||
| [~] | SEO-019 | 处理真实重复文章与跨平台内容(本地Mac/Linux教程已区分) | P1 | 003、004 | 教程已区分;历史重复组保持,待流量/外链证据 |
|
||||
| [~] | SEO-020 | 提升客户端教程的任务完成能力(正文已上线,设备实机未验收) | P1 | 002、019 | 既有教程已上线;客户端实机联网未验收 |
|
||||
| [~] | SEO-021 | 明确来源、验证和跨站内容差异 | P1 | 017、020 | 时效与来源边界保留;真实资源验证及跨站差异待核实 |
|
||||
| [~] | SEO-022 | 作者、编辑责任与真实互动数据 | P1 | 001、012 | 不伪造作者或结构化评分;既有点赞按用户规则保留 |
|
||||
| [~] | SEO-023 | 推广链接、广告与正文体验 | P1 | D07 | 推广链接sponsored已上线;既有广告保留,完整体验待实测 |
|
||||
| [x] | SEO-024 | 添加匹配真实内容的结构化数据 | P2 | 009、010、012、022 | 已发布;本地回归及服务器侧验收通过 |
|
||||
| [x] | SEO-025 | 修复分享地址和社交预览信息 | P2 | 001、004、011 | 已发布;本地回归及服务器侧验收通过 |
|
||||
| [~] | SEO-026 | 图片语义、尺寸和加载方式 | P2 | 020、028 | 图片呈现恢复原样;列表img及新增宽高改造撤销 |
|
||||
| [~] | SEO-027 | 手机端与无障碍完整验收 | P2 | 005、010 | 320/390及键盘/无JS样本通过;全设备无障碍未覆盖 |
|
||||
| [~] | SEO-028 | 建立正式构建性能基线并按瓶颈优化 | P2 | 026、027 | 构建体积基线已建立;真实用户CWV未取得 |
|
||||
| [x] | SEO-029 | 缓存与发布、撤稿、到期一致性 | P1 启用前 | 003、008、012 | 已发布;本地回归及服务器侧验收通过 |
|
||||
| [~] | SEO-030 | 文章接收、更新与删除的发布合同 | P0 发布前 | 003、008、017、029 | 校验、编辑保护和POST点赞已上线;旧入站认证须与master01协同 |
|
||||
| [x] | SEO-031 | 正式主机、HTTPS 与 HTTP 服务质量 | P0 发布前 | 001、004 | 已发布;本地回归及服务器侧验收通过 |
|
||||
| [x] | SEO-032 | 本地、预发布和生产资源隔离 | P0 发布前 | 001 | 已发布;本地回归及服务器侧验收通过 |
|
||||
| [x] | SEO-033 | 规范 IndexNow 及搜索提交 | P2 | 003、004、030、032 | 已发布;本地回归及服务器侧验收通过 |
|
||||
| [x] | SEO-034 | SEO 自动回归与数据样例 | P1 | 跟随各批次 | 已发布;本地回归及服务器侧验收通过 |
|
||||
| [~] | SEO-035 | 搜索平台与业务效果监测 | P1 上线后 | 001、002、036 | 通知回执已上线;Yandex/Bing实际索引和流量报告未取得 |
|
||||
| [x] | SEO-036 | 发布、迁移、回滚与复核 | P0 发布时 | 前述必需项 | 已发布;本地回归及服务器侧验收通过 |
|
||||
|
||||
按最新界面约束保留20项技术范围;16项保留部分验收或长期证据缺口。`[x]`只表示当前明确技术合同已交付,不表示排名、真实收录或所有设备验证通过。搜索改为本站数据库实时查询,未清空共享Meilisearch;整页缓存明确禁用,不再以未来启用缓存为完成条件。
|
||||
|
||||
## 6 各项优化的实施说明
|
||||
|
||||
@@ -225,7 +231,7 @@ ### SEO-001 明确公开身份、主域名和环境边界
|
||||
|
||||
多个站点的内容相同与否、是否各自争取独立收录,以及是否有副本归集到主力站,在 SEO-021 明确;“主力站”不自动授权把所有副站 canonical 指向它,也不代表复制内容的各站一定能获得独立搜索曝光。
|
||||
|
||||
**当前状态:部署定位与主力品牌已确认,配置统一和环境验收尚未实施;未修改代码,未部署。**
|
||||
**2026-10-31状态:** 正式cfn已发布统一配置生成的URL、品牌、schema及环境隔离;本地固定域名noindex,正式域名index。未把其他实例自动切为ClashFreeNode。
|
||||
|
||||
### SEO-002 确定搜索意图、目标用户和效果基线
|
||||
|
||||
@@ -352,6 +358,8 @@ ### SEO-013 统一 sitemap 的集合和 lastmod
|
||||
|
||||
**验收:** XML 解析、URL 编码、正式 host、状态、canonical、robots、noindex 做交叉校验;新增/撤稿/到期后集合及时变化;集合差异有可解释原因。Google 忽略 priority 与 changefreq,不应将调大这些数字作为优化工作。[Google sitemap 指南](https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap)
|
||||
|
||||
**2026-10-31定点实施:** 见[教程SEO通知](EDITORIAL_INDEXNOW.md)。仅编辑API新增/实质更新通知、独立回执/退避重试,以及client/advanced非空栏目进入sitemap;未完成本项所有全站建议,发布/验收以该正文为准。
|
||||
|
||||
### SEO-014 建立长期内链和内容导航
|
||||
|
||||
**优先级:P1。证据:E03。** 当前资源发现主要依赖列表首屏和“点赞活跃”;动态热门榜并不保证重要教程或可索引资源长期获得入口。
|
||||
@@ -539,6 +547,8 @@ ### SEO-033 规范 IndexNow 及搜索提交
|
||||
|
||||
**验收:** 本地使用替身验证,不实际发送;正式获准后单条核验目标主机、验证文件和返回结果;删除事件不因目标已 404 而被本地逻辑永远过滤掉。IndexNow 表示通知采用该协议的搜索引擎,不能当成 Google 通用收录接口。Google Indexing API 仅支持其指定的招聘及直播事件页面,不适用于普通节点文章。[IndexNow 协议](https://www.indexnow.org/documentation)、[Google Indexing API 适用范围](https://developers.google.com/search/apis/indexing-api/v3/using-api)
|
||||
|
||||
**2026-10-31定点实施:** 见[教程SEO通知](EDITORIAL_INDEXNOW.md)。仅编辑API新增/实质更新通知、独立回执/退避重试,以及client/advanced非空栏目进入sitemap;未完成本项所有全站建议,发布/验收以该正文为准。
|
||||
|
||||
### SEO-034 SEO 自动回归与数据样例
|
||||
|
||||
**优先级:P1,随每批实现。** 当前仓库测试只有首页 200 示例和恒真示例,不能防止 URL、索引和发布规则回退。本轮未执行这些与审计目标无关的示例测试,也没有新增业务测试或修改代码。
|
||||
@@ -551,7 +561,7 @@ ### SEO-035 搜索平台与业务效果监测
|
||||
|
||||
**优先级:P1,上线后。** 本轮没有生产搜索数据,不能确认哪些页面已经收录、用户通过哪些查询进入、Google 选择了哪个 canonical,也不能证明某项缺陷已造成多少损失。
|
||||
|
||||
获准后配置或核实实际站点的 Search Console;按目标渠道需要补 Bing 等平台。记录 sitemap 处理、页面索引原因、选定 canonical、查询与页面表现、地区/设备、人工处置及安全问题。服务器日志用于区分真实机器人抓取和普通流量;访客分析用于衡量实际使用,不记录订阅密钥、账号或敏感正文。
|
||||
优先核实实际站点的Yandex Webmaster与Bing Webmaster Tools;Google Search Console作为补充。记录 sitemap 处理、页面索引原因、选定 canonical、查询与页面表现、地区/设备、人工处置及安全问题。服务器日志用于区分真实机器人抓取和普通流量;访客分析用于衡量实际使用,不记录订阅密钥、账号或敏感正文。
|
||||
|
||||
**验收:** 有可回溯的发布前基线或新站起始基线;页面类型与业务目标能分组分析;出现错误有明确负责人和处理方式。监测频率和通知自动化另行授权,本报告不创建定时任务。[Search Console 能提供的数据](https://developers.google.com/search/docs/monitor-debug/search-console-start)
|
||||
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
{
|
||||
"deployment": {
|
||||
"base": "a820755e7e914180178e6928f73d5b42b0b24c86",
|
||||
"commit": "7c11ca77bcad5880ee0d50610f05419d40e18d46",
|
||||
"branch": "codex/fna-seo-20261031",
|
||||
"backup_directory": "/root/backups/cfn-seo-20261031",
|
||||
"pushed": true,
|
||||
"head": "7c11ca77bcad5880ee0d50610f05419d40e18d46",
|
||||
"maintenance_seconds": 1.34,
|
||||
"articles_verified": 189,
|
||||
"core_preserved": true,
|
||||
"receipts_preserved": true,
|
||||
"before_sitemap": 28,
|
||||
"after_sitemap": 35,
|
||||
"sitemap_added": [
|
||||
"https://clashfreenode.com/client/andorid",
|
||||
"https://clashfreenode.com/client/ios",
|
||||
"https://clashfreenode.com/client/linux",
|
||||
"https://clashfreenode.com/client/mac",
|
||||
"https://clashfreenode.com/client/windows",
|
||||
"https://clashfreenode.com/freenode",
|
||||
"https://clashfreenode.com/shadowrocketids"
|
||||
],
|
||||
"sitemap_removed": [],
|
||||
"homepage_trailing_slash_normalized": true,
|
||||
"canonical_robots_schema_verified": true,
|
||||
"status": "M resources/views/components/generated-tags-cloud.blade.php\n?? data.ms/\n?? public/images/editorial/",
|
||||
"server_verification": true,
|
||||
"browser_production_verification": false
|
||||
},
|
||||
"verification": {
|
||||
"verified_at": "2026-10-31T07:52:55.987543+00:00",
|
||||
"head": "7c11ca77bcad5880ee0d50610f05419d40e18d46",
|
||||
"edge": {
|
||||
"http://clashfreenode.com/": {
|
||||
"status": 301,
|
||||
"location": "https://clashfreenode.com/",
|
||||
"content_type": "text/html",
|
||||
"tls_verify_result": "0"
|
||||
},
|
||||
"https://clashfreenode.com/": {
|
||||
"status": 200,
|
||||
"location": null,
|
||||
"content_type": "text/html; charset=utf-8",
|
||||
"tls_verify_result": "0"
|
||||
},
|
||||
"https://clashfreenode.com/sitemap.xml": {
|
||||
"status": 200,
|
||||
"location": null,
|
||||
"content_type": "application/xml; charset=UTF-8",
|
||||
"tls_verify_result": "0"
|
||||
},
|
||||
"https://clashfreenode.com/robots.txt": {
|
||||
"status": 200,
|
||||
"location": null,
|
||||
"content_type": "text/plain; charset=utf-8",
|
||||
"tls_verify_result": "0"
|
||||
},
|
||||
"https://clashfreenode.com/css/seo.css": {
|
||||
"status": 200,
|
||||
"location": null,
|
||||
"content_type": "text/css",
|
||||
"tls_verify_result": "0"
|
||||
}
|
||||
},
|
||||
"indexnow": {
|
||||
"id": 1,
|
||||
"urls": [
|
||||
"https://clashfreenode.com/",
|
||||
"https://clashfreenode.com/freenode",
|
||||
"https://clashfreenode.com/client",
|
||||
"https://clashfreenode.com/client/windows",
|
||||
"https://clashfreenode.com/client/andorid",
|
||||
"https://clashfreenode.com/client/ios",
|
||||
"https://clashfreenode.com/client/linux",
|
||||
"https://clashfreenode.com/client/mac",
|
||||
"https://clashfreenode.com/shadowrocketids",
|
||||
"https://clashfreenode.com/advanced"
|
||||
],
|
||||
"state": {
|
||||
"status": "done",
|
||||
"attempts": 1,
|
||||
"http_status": 200,
|
||||
"urls": [
|
||||
"https://clashfreenode.com/",
|
||||
"https://clashfreenode.com/freenode",
|
||||
"https://clashfreenode.com/client",
|
||||
"https://clashfreenode.com/client/windows",
|
||||
"https://clashfreenode.com/client/andorid",
|
||||
"https://clashfreenode.com/client/ios",
|
||||
"https://clashfreenode.com/client/linux",
|
||||
"https://clashfreenode.com/client/mac",
|
||||
"https://clashfreenode.com/shadowrocketids",
|
||||
"https://clashfreenode.com/advanced"
|
||||
],
|
||||
"submitted_at": "2026-10-31T07:52:55+00:00",
|
||||
"result": "received"
|
||||
}
|
||||
},
|
||||
"nginx_server_names": [
|
||||
"clashfreenode.com",
|
||||
"clashfreenode.com"
|
||||
],
|
||||
"maintenance_absent": true
|
||||
},
|
||||
"local_tests": {
|
||||
"production_derived_suite": {
|
||||
"tests": 62,
|
||||
"assertions": 523
|
||||
},
|
||||
"final_workspace_suite": {
|
||||
"tests": 64,
|
||||
"assertions": 527
|
||||
}
|
||||
},
|
||||
"production_browser_test": false
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
# SEO界面保留修复 · 2026-10-31
|
||||
|
||||
用户明确:先不改变网站布局,用户看到的界面必须与SEO优化前完全一样,只做内部SEO。本修复撤销前批7c11ca77引入的可见改变;以SEO前生产`a820755e7e914180178e6928f73d5b42b0b24c86`的页面模板为外观基线,增量接续`fa2bc2dafec4392c20004cef840ce54bc59ea41c`,不整站回退、不恢复旧广告或业务数据。
|
||||
|
||||
## 实施边界
|
||||
|
||||
- 恢复栏目横幅在左侧内容区的位置、旧卡片结构和CSS背景封面、原空结果样式、原导航/页脚文字。移除新增栏目说明、首页/文章历史说明块、可见分页条及额外导航。
|
||||
- 首页可见标题恢复当前文章标题,发布时间恢复原相对时间文字;不再添加可见更新时间。去掉seo.css和其全局图片/焦点样式覆盖。生产HN广告、此前已撤下的旧侧栏广告、本地DPL/FUC/HN组合保持各自现状。
|
||||
- 内部meta、canonical、robots、JSON-LD、sitemap、公开性/无效路径校验、内容时钟、发布门槛和IndexNow保留。面包屑地址与复制链接修正保留,不改变可见文字。原每页数量从既有page_limit配置读取。
|
||||
- 翻页辅助地址移入head的rel=prev/next,原滚动交互读取实际next并去重;不再增加可见分页,也不声称有无JS翻页能力。head关系仅为辅助元数据,不能保证搜索引擎将它当作完整发现链路;不使用隐藏关键词或给机器人单独渲染页面。
|
||||
|
||||
## 已取得的本地证据
|
||||
|
||||
- 完整64项测试、533断言通过;Vite发布构建通过。
|
||||
- 同一份隔离合成数据,首页、栏目、文章、空结果各在1280桌面及390手机视口与优化前模板对照,8组PNG字节/哈希完全一致。测试图、结果存项目output/seo-20261031/ui-comparison;不包含线上页面截图,不作为生产浏览器验收。
|
||||
- 正文DOM在仅归一内部URL/属性和语义time标签后四类一致;滚动从第2页追加到第3页,共26条/26唯一ID,末页next消失,无可见分页条。
|
||||
- 临时测试不访问生产网站,不往业务数据库插入文章。页面原样要求高于上一批关于可见H1、说明块、img改造或分页UI的实施记录。
|
||||
|
||||
## 发布与恢复
|
||||
|
||||
部署按Git显式提交,保留当前代码、构建、数据摘要及回滚点;本批不迁移数据库、不改内容或通知回执。已提交、推送并正式部署功能提交 `bc48be39e646bc365a1421fe4ad939f504f6615e`,分支 `codex/fna-seo-ui-20261031`;恢复点为VPS-003 `/root/backups/cfn-seo-ui-20261031/`。若补丁失败只回退本批代码,不能回灌整库覆盖新文章。
|
||||
|
||||
|
||||
## 正式结果
|
||||
|
||||
本次界面恢复已完成。189篇文章逐项HTTP、canonical、robots、Article结构化数据通过;首页可见H1与当前文章标题相同,原相对发布时间文字恢复,新增说明块/分页条/seo.css均已移除。原正文、日期、配图及编辑回执哈希不变,sitemap前后均35项且集合完全一致;原HN广告及并行生成标签、data.ms、编辑图片目录保持。维护窗口1.30秒,已退出维护。
|
||||
|
||||
已完成服务器侧验收,未做线上页面验收;8组本地截图对照与服务器检查分别记录,不混同证据。没有再次通知IndexNow,没有修改DNS、邮件、Resource或其他项目。脱敏回执见[界面恢复发布记录](SEO_UI_RESTORE_RELEASE_2026-10-31.json)。
|
||||
@@ -0,0 +1,93 @@
|
||||
{
|
||||
"deployment": {
|
||||
"base": "fa2bc2dafec4392c20004cef840ce54bc59ea41c",
|
||||
"commit": "bc48be39e646bc365a1421fe4ad939f504f6615e",
|
||||
"branch": "codex/fna-seo-ui-20261031",
|
||||
"backup_directory": "/root/backups/cfn-seo-ui-20261031",
|
||||
"pushed": true,
|
||||
"head": "bc48be39e646bc365a1421fe4ad939f504f6615e",
|
||||
"maintenance_seconds": 1.3,
|
||||
"articles_verified": 189,
|
||||
"core_preserved": true,
|
||||
"receipts_preserved": true,
|
||||
"before_sitemap": 35,
|
||||
"after_sitemap": 35,
|
||||
"sitemap_added": [],
|
||||
"sitemap_removed": [],
|
||||
"homepage_trailing_slash_normalized": true,
|
||||
"canonical_robots_schema_verified": true,
|
||||
"status": "M resources/views/components/generated-tags-cloud.blade.php\n?? data.ms/\n?? public/images/editorial/",
|
||||
"server_verification": true,
|
||||
"browser_production_verification": false,
|
||||
"ui_baseline": "a820755e7e914180178e6928f73d5b42b0b24c86",
|
||||
"ui_restored": true,
|
||||
"local_identical_screenshot_pairs": 8,
|
||||
"tests": 64,
|
||||
"assertions": 533
|
||||
},
|
||||
"local_screenshot_comparison": [
|
||||
{
|
||||
"page": "list",
|
||||
"width": 1280,
|
||||
"identical": true,
|
||||
"before_sha256": "695e25cf7547c2e19cc858d16de823ee661c338a00bcf0d7363672232849b6bd",
|
||||
"after_sha256": "695e25cf7547c2e19cc858d16de823ee661c338a00bcf0d7363672232849b6bd"
|
||||
},
|
||||
{
|
||||
"page": "home",
|
||||
"width": 1280,
|
||||
"identical": true,
|
||||
"before_sha256": "8ccc3f46f309d7fbddc72972e748e89640e550b9b12c8d798d8aa13ce7d8ceab",
|
||||
"after_sha256": "8ccc3f46f309d7fbddc72972e748e89640e550b9b12c8d798d8aa13ce7d8ceab"
|
||||
},
|
||||
{
|
||||
"page": "article",
|
||||
"width": 1280,
|
||||
"identical": true,
|
||||
"before_sha256": "6373c0ff398e07529bbed095d89302d8f2e1336b6660b14294a8228adc65e590",
|
||||
"after_sha256": "6373c0ff398e07529bbed095d89302d8f2e1336b6660b14294a8228adc65e590"
|
||||
},
|
||||
{
|
||||
"page": "empty",
|
||||
"width": 1280,
|
||||
"identical": true,
|
||||
"before_sha256": "ee48eaed8ef476839579f7ea65a9d223ff882e70cdef64ccb385d5b5a5909ecb",
|
||||
"after_sha256": "ee48eaed8ef476839579f7ea65a9d223ff882e70cdef64ccb385d5b5a5909ecb"
|
||||
},
|
||||
{
|
||||
"page": "list",
|
||||
"width": 390,
|
||||
"identical": true,
|
||||
"before_sha256": "49bfd131721f1f3b5ce08ab28d60ea4c7ac2b78650b75ea3d60f7d5804b58593",
|
||||
"after_sha256": "49bfd131721f1f3b5ce08ab28d60ea4c7ac2b78650b75ea3d60f7d5804b58593"
|
||||
},
|
||||
{
|
||||
"page": "home",
|
||||
"width": 390,
|
||||
"identical": true,
|
||||
"before_sha256": "abc76c5a1048711ac5e5653952c20073e9667e312df5216f983571265b5630e3",
|
||||
"after_sha256": "abc76c5a1048711ac5e5653952c20073e9667e312df5216f983571265b5630e3"
|
||||
},
|
||||
{
|
||||
"page": "article",
|
||||
"width": 390,
|
||||
"identical": true,
|
||||
"before_sha256": "2670e1a0668376414af3194419bd06355102886518089883806a2be0d138b66f",
|
||||
"after_sha256": "2670e1a0668376414af3194419bd06355102886518089883806a2be0d138b66f"
|
||||
},
|
||||
{
|
||||
"page": "empty",
|
||||
"width": 390,
|
||||
"identical": true,
|
||||
"before_sha256": "82f91577c5af25e233309ea01b15a862537881be9b519b514c075da098e90a94",
|
||||
"after_sha256": "82f91577c5af25e233309ea01b15a862537881be9b519b514c075da098e90a94"
|
||||
}
|
||||
],
|
||||
"infinite_scroll": {
|
||||
"starting_page": 2,
|
||||
"final_items": 26,
|
||||
"unique_ids": 26,
|
||||
"next_absent": true,
|
||||
"visible_pager": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"retired_at": "2026-10-30T04:36:51Z",
|
||||
"checks": [
|
||||
{
|
||||
"url": "http://test.clashfreenode.com/",
|
||||
"status": 410
|
||||
},
|
||||
{
|
||||
"url": "https://test.clashfreenode.com/",
|
||||
"status": 410
|
||||
},
|
||||
{
|
||||
"url": "https://test.clashfreenode.com/resource-v2/",
|
||||
"status": 410
|
||||
},
|
||||
{
|
||||
"url": "https://test.clashfreenode.com/images/illustrations/0000000000000000000000000000000000000000000000000000000000000000.png",
|
||||
"status": 410
|
||||
}
|
||||
],
|
||||
"production_http": 200,
|
||||
"production_nginx_unchanged": true,
|
||||
"test_renewal_disabled": true,
|
||||
"test_data_retained_offline": true,
|
||||
"dns": {
|
||||
"cloudflare_test_A_removed": true,
|
||||
"authoritative": [
|
||||
{
|
||||
"ns": "bradley.ns.cloudflare.com.",
|
||||
"status": "NXDOMAIN"
|
||||
},
|
||||
{
|
||||
"ns": "jewel.ns.cloudflare.com.",
|
||||
"status": "NXDOMAIN"
|
||||
}
|
||||
],
|
||||
"prior_record": {
|
||||
"type": "A",
|
||||
"name": "test.clashfreenode.com",
|
||||
"content": "45.153.247.44",
|
||||
"proxied": false,
|
||||
"ttl": "auto"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
# test 预览下线(2026-10-30)
|
||||
|
||||
用户明确要求切正式后取消test。当前唯一公开业务站为https://clashfreenode.com/;test.clashfreenode.com已撤销Cloudflare单条A记录(原45.153.247.44、DNS-only、自动TTL)。主域名、www、邮件等其余10条记录保留。DNS界面证据见[截图](TEST_DNS_RETIRED_2026-10-30.png)。
|
||||
|
||||
经白色机SSH在VPS-003下线test网页及/resource-v2/入口,原虚拟主机不再指向测试代码或PHP;保留同名HTTP/HTTPS 410拒绝规则,避免尚有DNS缓存的客户端落入其他虚拟主机。关闭仅test的Certbot续期配置,现有证书只供缓存客户端返回410;未撤销或修改共享证书、PHP-FPM、Resource生产服务。Nginx配置验证/reload通过,正式站HTTP200且正式Nginx配置摘要未变。
|
||||
|
||||
测试代码、独立MySQL库和测试Resource SQLite/资产保留为离线恢复资料,不再提供公开访问;没有执行数据库删除、素材删除或撤销正式凭据。后续不得把test作为仍在线验收入口,也不自动重新开放。
|
||||
|
||||
VPS-003恢复点:`/root/backups/cfn-test-retirement-20261030/`,包含原test Nginx、原续期配置及退役回执。恢复须重新授权:恢复原test虚拟主机和续期配置,nginx -t后reload,再按原值重建精确test A记录并验证。不得用旧部署脚本擅自恢复。
|
||||
|
||||
已完成服务器侧验收,未做线上页面验收。
|
||||
@@ -182,3 +182,9 @@ ## 小标题蓝线定点调整(2026-10-28)
|
||||
## 本地样式服务恢复(2026-10-28)
|
||||
|
||||
用户反馈/advanced排版再次错乱。现场确认public/hot仍指向127.0.0.1:5187,但该端口无监听,导致Vite样式/脚本不可用,页面退化为原始HTML(双Logo及展开导航)。已按原配置恢复npm run dev,仅监听127.0.0.1:5187,Vite7.3.1启动成功;刷新后浏览器截图确认Logo、导航、栏目banner与文章卡片恢复,无横向溢出。未修改教程正文、数据库、模板、全局字号或生产环境。截图codex/output/advanced-styles-restored-20261028.png。恢复的是当前本地dev进程,不代表已配置登录自启或已核实此前进程退出原因。
|
||||
|
||||
## 综合教程列表移除图片横幅(2026-10-31,仅本地)
|
||||
|
||||
按用户要求,`/advanced`不再渲染列表顶部的猫图横幅及叠加数量;用户随后明确标题介绍卡也不要,现与免费节点列表一样直接显示文章列表。页面title与meta description仍保留栏目名称和简介。仅调整列表模板的展示条件,栏目配置和文章内容未改;入门教程与平台子栏目仍按原配置显示横幅。未上线。
|
||||
|
||||
2026-10-31综合教程列表去除横幅及介绍卡已随[2026-10-31正式发布记录](UI_RELEASE_2026-10-31.md)上线,入门和平台子栏目横幅保留;本次不发布新的教程正文。
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"base": "ace6d74a18988697340ebcd15e2b79a4dee0e697",
|
||||
"commit": "252e0c38cb85d0c1331063b1019a2bb13c27ac8a",
|
||||
"files": [
|
||||
"AGENTS.md",
|
||||
"app/Http/Controllers/SitemapController.php",
|
||||
"docs/maintenance/EDITORIAL_INDEXNOW.md",
|
||||
"docs/maintenance/SEO_PLAN.md",
|
||||
"resources/views/sitemap.blade.php",
|
||||
"tests/Feature/EditorialApiTest.php",
|
||||
"tests/Feature/EditorialReleaseTest.php"
|
||||
],
|
||||
"branch": "codex/tutorial-sitemap-20261031",
|
||||
"backup_directory": "/root/backups/cfn-tutorial-sitemap-20261031",
|
||||
"pushed": true,
|
||||
"before_count": 25,
|
||||
"after_count": 27,
|
||||
"added": [
|
||||
"https://clashfreenode.com/advanced",
|
||||
"https://clashfreenode.com/client"
|
||||
],
|
||||
"checks": {
|
||||
"article_core_preserved": true,
|
||||
"publications_unchanged": true,
|
||||
"indexnow_enabled": true,
|
||||
"keyfile": {
|
||||
"http_status": 200,
|
||||
"body_matches_key": true
|
||||
},
|
||||
"retry_command": {
|
||||
"processed": 0,
|
||||
"pending": 0
|
||||
},
|
||||
"existing_business_scheduler": true,
|
||||
"opcode_invalidation": true,
|
||||
"generated_template_preserved": true,
|
||||
"pages": {
|
||||
"/": 200,
|
||||
"/client": 200,
|
||||
"/advanced": 200,
|
||||
"/a/system-proxy-vs-tun.html": 200
|
||||
}
|
||||
},
|
||||
"live_indexnow_notification_sent": false,
|
||||
"head": "252e0c38cb85d0c1331063b1019a2bb13c27ac8a",
|
||||
"status": "M resources/views/components/generated-tags-cloud.blade.php\n?? data.ms/"
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
# CFN界面与推荐模块发布(2026-10-31)
|
||||
|
||||
已正式发布到 `https://clashfreenode.com/`。应用提交 `7d564df7e9509cbf58d6096cfbe55ae339ee15dc`,分支 `codex/cfn-ui-20261031`,目标 VPS-003 `/www/wwwroot/clashfreenode-new.com`。本机经白色机SSH执行;没有本机访问线上网站、重新开设test入口或整库迁移。
|
||||
|
||||
## 本次范围
|
||||
|
||||
- [统一机场推荐](AIRPORT_RECOMMENDATIONS.md):集中配置福云、DP-LINK.NET、hardnerd,资源正文替换旧推荐,教程文末追加,综合教程增加文内锚点入口。价格和优惠由共享配置维护,不改文章正文源。
|
||||
- [免费节点内容页](FREENODE_ARTICLE_LAYOUT.md):首页与免费节点详情复用新版标题、概览、订阅卡片、复制按钮及三步使用说明;按用户最终要求删除装饰小字、卡内栏目日期、图标与描述、原使用提示框,统一字号、圆角和间距。其他栏目不套此布局。
|
||||
- [页头品牌](BRANDING.md):原紫色猫轮廓SVG、深灰ClashFreeNode文字、每天分享免费节点;窄屏品牌居中,TG与GitHub移入侧栏,顶部保留菜单和搜索。
|
||||
- [综合教程列表](TUTORIALS.md#综合教程列表移除图片横幅2026-10-31仅本地):去掉大图及标题介绍卡,直接显示列表;入门教程及平台子栏目的横幅保留。title和meta description不变。
|
||||
- 随机广告高度比例从2.45调整为3.675,即同宽高度为此前三分之二;沿本任务旧图方案使用contain完整展示。保留生产现有三张广告素材、候选/随机脚本、跳转配置和noscript回退。本地另一个任务制作的compact广告新图及其文案/裁切规则未发布,不能把本地当前广告候选当作本次正式候选。
|
||||
|
||||
基于现场正式HEAD `a7adfac04108c68b58bd02c550fe98fd80b2feeb` 创建隔离Git工作树,审核并提交20个文件,Git推送并核对远端SHA后正式检出。生产空侧栏广告组件的原include保留,未携带本地无关删除;未覆盖现有生成标签模板的并行修改、data.ms、public/images/editorial、私密.env、数据库、静态配图及定时任务。未更改Vite源或重建前端包,新增CSS/JS为同源公开文件并按filemtime刷新版本。
|
||||
|
||||
## 验收
|
||||
|
||||
- 本地12项测试、61条断言通过,覆盖推荐替换、未知结构回退、原复制值、两/三格式、零节点和首页选择;新增JS语法检查通过。桌面及320/390窄屏界面、菜单开关、复制反馈已在本地检查。
|
||||
- 发布前在服务器只读事务遍历189篇目标文章,86篇免费节点全部识别;替换178篇旧推荐,原data-clipboard-text值逐项一致,0丢失、0回退。不请求节点订阅服务器。
|
||||
- 正式切换后183项服务器侧检查全部通过、0失败:覆盖首页、最新及最早免费节点详情、苹果ID详情、Windows与TUN教程、三个栏目;原title/canonical/robots/description及复制值保留,推荐单次输出和作用范围、导航结构、综合教程移除横幅及介绍、入门横幅保留正确。
|
||||
- 所有20个文件部署哈希一致,6个公开CSS/JS/SVG资源HTTPS完整SHA一致;nginx及PHP-FPM在运行。189篇文章完整原始行与分类行SHA与发布前一致,.env及并行生成标签模板SHA一致。随机广告模板/脚本/配置相对基线无差异。
|
||||
- 已清理nginx身份的Blade及响应缓存。未做线上浏览器页面验收,没有点击服务商/TG/GitHub落地页或触发真实订阅/通知/文章发布。
|
||||
|
||||
回执和已审核候选:`output/ui-release-20261031/`,含preflight、prepared、manifest、只读audit-before、http-before、release及verification.json。它们不含真实凭据或业务正文导出。应用文件的完整权威哈希以manifest/verification为准。
|
||||
|
||||
## 恢复
|
||||
|
||||
VPS-003恢复点 `/root/backups/cfn-ui-20261031`(0700),保留原HEAD/status、Git bundle、tracked-before.patch、候选工作树/补丁、逐文件manifest及验收回执。因为本次无业务数据迁移,回退不需要恢复数据库;不得回灌本地库。
|
||||
|
||||
没有后续生产变更时,可经白色机将正式目录检回发布前 `a7adfac04108c68b58bd02c550fe98fd80b2feeb`,再以nginx身份清理 `view:clear` 和 `responsecache:clear` 并做服务器冒烟核验。有后续发布时,在其当前HEAD上只撤销本次应用增量,提交推送后再切换,不覆盖后续功能或并行未提交文件。保留原PNG、图片资产及Resource关联。
|
||||
|
||||
后续文档同步提交仅更新维护记录;应用差异、远端分支SHA与正式最终HEAD由同目录docs-release.json核实。
|
||||
|
||||
## 同日后续补齐
|
||||
|
||||
用户随后明确要求发布李响及全部相关未提交内容;compact最终三图及cover样式现已正式替代本批的临时旧图contain方案。相关源稿/维护文件也已补交,见[相关补齐发布](RELATED_RELEASE_2026-10-31.md)。本页“新图未包含”仅说明7d564df7这一个历史批次,不能用于判断当前正式广告。
|
||||
@@ -0,0 +1,19 @@
|
||||
# 使用方法区发布(2026-10-31)
|
||||
|
||||
用户确认本地重设计后要求发布。已经白色机SSH在VPS-003 `/www/wwwroot/clashfreenode-new.com` 完成Git提交、推送及正式检出。应用提交 `888358a6b60b3da3fddc52fc8980a81bd83d4cc7`,发布前 `08ee2275fb3ff60b8db327f59af9bcd65284d761`,分支 `codex/usage-panel-20261031`。后续仅文档提交的最终HEAD见 `output/usage-release-20261031/docs-release.json`。
|
||||
|
||||
只发布两个应用文件:`resources/views/pages/articles/freenode/content.blade.php` 和 `public/css/freenode-article.css`。将原散列的三步说明改为单个浅色区域,圆形序号、标题/说明对齐、教程入口归并在底部分隔线下;标题精简为“使用方法”,桌面三列、手机纵向。教程URL与订阅区保留,清理已删除提示框的孤立CSS。实现与截图沿[内容页维护](FREENODE_ARTICLE_LAYOUT.md#使用方法区重设计2026-10-31已发布)。
|
||||
|
||||
此前三张compact广告、品牌/移动侧栏、综合教程列表和HN clashfreenode.com九折配置均保留。没有修改数据库、文章发布API、业务服务、Nginx、调度或前端构建包;不恢复test。生产.env、未提交的生成标签模板和运行目录保留。
|
||||
|
||||
## 验收
|
||||
|
||||
本地1280桌面、390/320窄屏检查已通过,三步及三条教程链接都在容器内、无横向溢出,默认视口恢复。截图在 `output/usage-redesign-20261031/`。此次为可逆展示调整,不新增镜像实现的测试。
|
||||
|
||||
正式46项服务器侧检查通过、0失败:覆盖首页、最新三格式及最早两格式免费节点、苹果ID、TUN教程;新面板仅出现在首页/免费节点详情,标题/三步/教程导航及原链接正确。各页title/canonical/robots/description及全部data-clipboard-text摘要与发布前完全一致,三个广告候选和三家优惠码保留。两个应用文件部署SHA一致,实际版本URL的CSS HTTPS完整SHA通过,.env和生产并行标签文件SHA不变。已以nginx身份清理Blade及响应缓存。
|
||||
|
||||
已完成服务器侧验收,未做线上浏览器页面验收,未打开订阅、TG/GitHub或服务商落地页。回执为 `output/usage-release-20261031/release.json` 和 verification.json;发布前精确diff在同目录diffs/。
|
||||
|
||||
## 恢复
|
||||
|
||||
VPS-003恢复点 `/root/backups/cfn-usage-20261031`(0700),含原HEAD/status、Git bundle、tracked-before.patch、仅含SEO/复制摘要的HTTP基线及发布验收回执。没有后续变更时可检回发布前08ee2275并以nginx清理view/responsecache;有后续发布时,在当前HEAD上仅反向撤销本次模板/CSS增量,Git推送后再更新。不回灌数据库或覆盖并行文件。
|
||||
@@ -1,6 +1,6 @@
|
||||
# 综合教程周期写作
|
||||
|
||||
2026-10-31用户最终规则:每周三篇,每天北京时间15:00检查;文章展示时间随机往前0~6小时,精确到秒。原每周两篇、早晚两个窗口的规则已替换。Codex heartbeat `fna`,名称“FNA 综合教程|每周三篇”,ACTIVE,绑定本聊天,自2026-11-02当周开始。调度已修改,首轮实际写作尚未执行。
|
||||
2026-10-31用户最终规则:每周三篇,每天北京时间15:00检查;文章展示时间随机往前0~6小时,精确到秒。原每周两篇、早晚两个窗口的规则已替换。Codex heartbeat `fna`,名称“FNA 综合教程|每周三篇”,ACTIVE,绑定本聊天,自2026-11-02当周开始。调度已修改;2026-10-31用户提前手动触发一篇已正式发布并计入当周台账,2026-11-02当周的三次计划保持不变。详见[首篇记录](ROUTING_MODES_2026-10-31.md)。
|
||||
|
||||
## 执行入口
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
function sa(n,t){return function(){return n.apply(t,arguments)}}const{toString:Hc}=Object.prototype,{getPrototypeOf:Fr}=Object,{iterator:Ti,toStringTag:oa}=Symbol,wi=(n=>t=>{const r=Hc.call(t);return n[r]||(n[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Ve=n=>(n=n.toLowerCase(),t=>wi(t)===n),Si=n=>t=>typeof t===n,{isArray:on}=Array,Qt=Si("undefined");function Cn(n){return n!==null&&!Qt(n)&&n.constructor!==null&&!Qt(n.constructor)&&Oe(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const aa=Ve("ArrayBuffer");function $c(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&aa(n.buffer),t}const Fc=Si("string"),Oe=Si("function"),la=Si("number"),On=n=>n!==null&&typeof n=="object",Bc=n=>n===!0||n===!1,li=n=>{if(wi(n)!=="object")return!1;const t=Fr(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(oa in n)&&!(Ti in n)},qc=n=>{if(!On(n)||Cn(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},Uc=Ve("Date"),Wc=Ve("File"),Vc=Ve("Blob"),zc=Ve("FileList"),Kc=n=>On(n)&&Oe(n.pipe),Yc=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||Oe(n.append)&&((t=wi(n))==="formdata"||t==="object"&&Oe(n.toString)&&n.toString()==="[object FormData]"))},Gc=Ve("URLSearchParams"),[Xc,Qc,Jc,Zc]=["ReadableStream","Request","Response","Headers"].map(Ve),eu=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Nn(n,t,{allOwnKeys:r=!1}={}){if(n===null||typeof n>"u")return;let o,c;if(typeof n!="object"&&(n=[n]),on(n))for(o=0,c=n.length;o<c;o++)t.call(null,n[o],o,n);else{if(Cn(n))return;const d=r?Object.getOwnPropertyNames(n):Object.keys(n),h=d.length;let p;for(o=0;o<h;o++)p=d[o],t.call(null,n[p],p,n)}}function ca(n,t){if(Cn(n))return null;t=t.toLowerCase();const r=Object.keys(n);let o=r.length,c;for(;o-- >0;)if(c=r[o],t===c.toLowerCase())return c;return null}const Tt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ua=n=>!Qt(n)&&n!==Tt;function Nr(){const{caseless:n,skipUndefined:t}=ua(this)&&this||{},r={},o=(c,d)=>{const h=n&&ca(r,d)||d;li(r[h])&&li(c)?r[h]=Nr(r[h],c):li(c)?r[h]=Nr({},c):on(c)?r[h]=c.slice():(!t||!Qt(c))&&(r[h]=c)};for(let c=0,d=arguments.length;c<d;c++)arguments[c]&&Nn(arguments[c],o);return r}const tu=(n,t,r,{allOwnKeys:o}={})=>(Nn(t,(c,d)=>{r&&Oe(c)?n[d]=sa(c,r):n[d]=c},{allOwnKeys:o}),n),nu=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),iu=(n,t,r,o)=>{n.prototype=Object.create(t.prototype,o),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),r&&Object.assign(n.prototype,r)},ru=(n,t,r,o)=>{let c,d,h;const p={};if(t=t||{},n==null)return t;do{for(c=Object.getOwnPropertyNames(n),d=c.length;d-- >0;)h=c[d],(!o||o(h,n,t))&&!p[h]&&(t[h]=n[h],p[h]=!0);n=r!==!1&&Fr(n)}while(n&&(!r||r(n,t))&&n!==Object.prototype);return t},su=(n,t,r)=>{n=String(n),(r===void 0||r>n.length)&&(r=n.length),r-=t.length;const o=n.indexOf(t,r);return o!==-1&&o===r},ou=n=>{if(!n)return null;if(on(n))return n;let t=n.length;if(!la(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=n[t];return r},au=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Fr(Uint8Array)),lu=(n,t)=>{const o=(n&&n[Ti]).call(n);let c;for(;(c=o.next())&&!c.done;){const d=c.value;t.call(n,d[0],d[1])}},cu=(n,t)=>{let r;const o=[];for(;(r=n.exec(t))!==null;)o.push(r);return o},uu=Ve("HTMLFormElement"),fu=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,o,c){return o.toUpperCase()+c}),Xs=(({hasOwnProperty:n})=>(t,r)=>n.call(t,r))(Object.prototype),du=Ve("RegExp"),fa=(n,t)=>{const r=Object.getOwnPropertyDescriptors(n),o={};Nn(r,(c,d)=>{let h;(h=t(c,d,n))!==!1&&(o[d]=h||c)}),Object.defineProperties(n,o)},hu=n=>{fa(n,(t,r)=>{if(Oe(n)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const o=n[r];if(Oe(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},pu=(n,t)=>{const r={},o=c=>{c.forEach(d=>{r[d]=!0})};return on(n)?o(n):o(String(n).split(t)),r},gu=()=>{},mu=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function yu(n){return!!(n&&Oe(n.append)&&n[oa]==="FormData"&&n[Ti])}const vu=n=>{const t=new Array(10),r=(o,c)=>{if(On(o)){if(t.indexOf(o)>=0)return;if(Cn(o))return o;if(!("toJSON"in o)){t[c]=o;const d=on(o)?[]:{};return Nn(o,(h,p)=>{const m=r(h,c+1);!Qt(m)&&(d[p]=m)}),t[c]=void 0,d}}return o};return r(n,0)},_u=Ve("AsyncFunction"),bu=n=>n&&(On(n)||Oe(n))&&Oe(n.then)&&Oe(n.catch),da=((n,t)=>n?setImmediate:t?((r,o)=>(Tt.addEventListener("message",({source:c,data:d})=>{c===Tt&&d===r&&o.length&&o.shift()()},!1),c=>{o.push(c),Tt.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Oe(Tt.postMessage)),Eu=typeof queueMicrotask<"u"?queueMicrotask.bind(Tt):typeof process<"u"&&process.nextTick||da,Tu=n=>n!=null&&Oe(n[Ti]),O={isArray:on,isArrayBuffer:aa,isBuffer:Cn,isFormData:Yc,isArrayBufferView:$cLine truncated
|
||||
`).forEach(function(h){c=h.indexOf(":"),r=h.substring(0,c).trim().toLowerCase(),o=h.substring(c+1).trim(),!(!r||t[r]&&$u[r])&&(r==="set-cookie"?t[r]?t[r].push(o):t[r]=[o]:t[r]=t[r]?t[r]+", "+o:o)}),t},eo=Symbol("internals");function En(n){return n&&String(n).trim().toLowerCase()}function ci(n){return n===!1||n==null?n:O.isArray(n)?n.map(ci):String(n)}function Bu(n){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=r.exec(n);)t[o[1]]=o[2];return t}const qu=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function ir(n,t,r,o,c){if(O.isFunction(o))return o.call(this,t,r);if(c&&(t=r),!!O.isString(t)){if(O.isString(o))return t.indexOf(o)!==-1;if(O.isRegExp(o))return o.test(t)}}function Uu(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,o)=>r.toUpperCase()+o)}function Wu(n,t){const r=O.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(n,o+r,{value:function(c,d,h){return this[o].call(this,t,c,d,h)},configurable:!0})})}let Ne=class{constructor(t){t&&this.set(t)}set(t,r,o){const c=this;function d(p,m,_){const v=En(m);if(!v)throw new Error("header name must be a non-empty string");const C=O.findKey(c,v);(!C||c[C]===void 0||_===!0||_===void 0&&c[C]!==!1)&&(c[C||m]=ci(p))}const h=(p,m)=>O.forEach(p,(_,v)=>d(_,v,m));if(O.isPlainObject(t)||t instanceof this.constructor)h(t,r);else if(O.isString(t)&&(t=t.trim())&&!qu(t))h(Fu(t),r);else if(O.isObject(t)&&O.isIterable(t)){let p={},m,_;for(const v of t){if(!O.isArray(v))throw TypeError("Object iterator must return a key-value pair");p[_=v[0]]=(m=p[_])?O.isArray(m)?[...m,v[1]]:[m,v[1]]:v[1]}h(p,r)}else t!=null&&d(r,t,o);return this}get(t,r){if(t=En(t),t){const o=O.findKey(this,t);if(o){const c=this[o];if(!r)return c;if(r===!0)return Bu(c);if(O.isFunction(r))return r.call(this,c,o);if(O.isRegExp(r))return r.exec(c);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=En(t),t){const o=O.findKey(this,t);return!!(o&&this[o]!==void 0&&(!r||ir(this,this[o],o,r)))}return!1}delete(t,r){const o=this;let c=!1;function d(h){if(h=En(h),h){const p=O.findKey(o,h);p&&(!r||ir(o,o[p],p,r))&&(delete o[p],c=!0)}}return O.isArray(t)?t.forEach(d):d(t),c}clear(t){const r=Object.keys(this);let o=r.length,c=!1;for(;o--;){const d=r[o];(!t||ir(this,this[d],d,t,!0))&&(delete this[d],c=!0)}return c}normalize(t){const r=this,o={};return O.forEach(this,(c,d)=>{const h=O.findKey(o,d);if(h){r[h]=ci(c),delete r[d];return}const p=t?Uu(d):String(d).trim();p!==d&&delete r[d],r[p]=ci(c),o[p]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return O.forEach(this,(o,c)=>{o!=null&&o!==!1&&(r[c]=t&&O.isArray(o)?o.join(", "):o)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
||||
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const o=new this(t);return r.forEach(c=>o.set(c)),o}static accessor(t){const o=(this[eo]=this[eo]={accessors:{}}).accessors,c=this.prototype;function d(h){const p=En(h);o[p]||(Wu(c,h),o[p]=!0)}return O.isArray(t)?t.forEach(d):d(t),this}};Ne.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);O.reduceDescriptors(Ne.prototype,({value:n},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(o){this[r]=o}}});O.freezeMethods(Ne);function rr(n,t){const r=this||Dn,o=t||r,c=Ne.from(o.headers);let d=o.data;return O.forEach(n,function(p){d=p.call(r,d,c.normalize(),t?t.status:void 0)}),c.normalize(),d}function ba(n){return!!(n&&n.__CANCEL__)}function an(n,t,r){ie.call(this,n??"canceled",ie.ERR_CANCELED,t,r),this.name="CanceledError"}O.inherits(an,ie,{__CANCEL__:!0});function Ea(n,t,r){const o=r.config.validateStatus;!r.status||!o||o(r.status)?n(r):t(new ie("Request failed with status code "+r.status,[ie.ERR_BAD_REQUEST,ie.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Vu(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function zu(n,t){n=n||10;const r=new Array(n),o=new Array(n);let c=0,d=0,h;return t=t!==void 0?t:1e3,function(m){const _=Date.now(),v=o[d];h||(h=_),r[c]=m,o[c]=_;let C=d,R=0;for(;C!==c;)R+=r[C++],C=C%n;if(c=(c+1)%n,c===d&&(d=(d+1)%n),_-h<t)return;const I=v&&_-v;return I?Math.round(R*1e3/I):void 0}}function Ku(n,t){let r=0,o=1e3/t,c,d;const h=(_,v=Date.now())=>{r=v,c=null,d&&(clearTimeout(d),d=null),n(..._)};return[(..._)=>{const v=Date.now(),C=v-r;C>=o?h(_,v):(c=_,d||(d=setTimeout(()=>{d=null,h(c)},o-C)))},()=>c&&h(c)]}const yi=(n,t,r=3)=>{let o=0;const c=zu(50,250);return Ku(d=>{const h=d.loaded,p=d.lengthComputable?d.total:void 0,m=h-o,_=c(m),v=h<=p;o=h;const C={loaded:h,total:p,progress:p?h/p:void 0,bytes:m,rate:_||void 0,estimated:_&&p&&v?(p-h)/_:void 0,event:d,lengthComputable:p!=null,[t?"download":"upload"]:!0};n(C)},r)},to=(n,t)=>{const r=n!=null;return[o=>t[0]({lengthComputable:r,total:n,loaded:o}),t[1]]},no=n=>(...t)=>O.asap(()=>n(...t)),Yu=Ee.hasStandardBrowserEnv?((n,t)=>r=>(r=new URL(r,Ee.origin),n.protocol===r.protocol&&n.host===r.host&&(t||n.port===r.port)))(new URL(Ee.origin),Ee.navigator&&/(msie|trident)/i.test(Ee.navigator.userAgent)):()=>!0,Gu=Ee.hasStandardBrowserEnv?{write(n,t,r,o,c,d,h){if(typeof document>"u")return;const p=[`${n}=${encodeURIComponent(t)}`];O.isNumber(r)&&p.push(`expires=${new Date(r).toUTCString()}`),O.isString(o)&&p.push(`path=${o}`),O.isString(c)&&p.push(`domain=${c}`),d===!0&&p.push("secure"),O.isString(h)&&p.push(`SameSite=${h}`),document.cookie=p.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+n+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Xu(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Qu(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function Ta(n,t,r){let o=!Xu(t);return n&&(o||r==!1)?Qu(n,t):t}const io=n=>n instanceof Ne?{...n}:n;function Ot(n,t){t=t||{};const r={};function o(_,v,C,R){return O.isPlainObject(_)&&O.isPlainObject(v)?O.merge.call({caseless:R},_,v):O.isPlainObject(v)?O.merge({},v):O.isArray(v)?v.slice():v}function c(_,v,C,R){if(O.isUndefined(v)){if(!O.isUndefined(_))return o(void 0,_,C,R)}else return o(_,v,C,R)}function d(_,v){if(!O.isUndefined(v))return o(void 0,v)}function h(_,v){if(O.isUndefined(v)){if(!O.isUndefined(_))return o(void 0,_)}else return o(void 0,v)}function p(_,v,C){if(C in t)return o(_,v);if(C in n)return o(void 0,_)}const m={url:d,method:d,data:d,baseURL:h,transformRequest:h,transformResponse:h,paramsSerializer:h,timeout:h,timeoutMessage:h,withCredentials:h,withXSRFToken:h,adapter:h,responseType:h,xsrfCookieName:h,xsrfHeaderName:h,onUploadProgress:h,onDownloadProgress:h,decompress:h,maxContentLength:h,maxBodyLength:h,beforeRedirect:h,transport:h,httpAgent:h,httpsAgent:h,cancelToken:h,socketPath:h,responseEncoding:h,validateStatus:p,headers:(_,v,C)=>c(io(_),io(v),C,!0)};return O.forEach(Object.keys({...n,...t}),function(v){const C=m[v]||c,R=C(n[v],t[v],v);O.isUndefined(R)&&C!==p||(r[v]=R)}),r}const wa=n=>{const t=Ot({},n);let{data:r,withXSRFToken:o,xsrfHeaderName:c,xsrfCookieName:d,headers:h,auth:p}=t;if(t.headers=h=Ne.from(h),t.url=ya(Ta(t.baseURL,t.url,t.allowAbsoluteUrls),n.params,n.paramsSerializer),p&&h.set("Authorization","Basic "+btoa((p.username||"")+":"+(p.password?unescape(encodeURIComponent(p.password)):""))),O.isFormData(r)){if(Ee.hasStandardBrowserEnv||Ee.hasStandardBrowserWebWorkerEnv)h.setContentType(void 0);else if(O.isFunction(r.getHeaders)){const m=r.getHeaders(),_=["content-type","content-length"];Object.entries(m).forEach(([v,C])=>{_.inclu
Line truncated
|
||||
`+h.map(co).join(`
|
||||
`):" "+co(h[0]):"as no adapter specified";throw new ie("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return c}const Aa={getAdapter:cf,adapters:Ur};function sr(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new an(null,n)}function uo(n){return sr(n),n.headers=Ne.from(n.headers),n.data=rr.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Aa.getAdapter(n.adapter||Dn.adapter,n)(n).then(function(o){return sr(n),o.data=rr.call(n,n.transformResponse,o),o.headers=Ne.from(o.headers),o},function(o){return ba(o)||(sr(n),o&&o.response&&(o.response.data=rr.call(n,n.transformResponse,o.response),o.response.headers=Ne.from(o.response.headers))),Promise.reject(o)})}const xa="1.13.2",xi={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{xi[n]=function(o){return typeof o===n||"a"+(t<1?"n ":" ")+n}});const fo={};xi.transitional=function(t,r,o){function c(d,h){return"[Axios v"+xa+"] Transitional option '"+d+"'"+h+(o?". "+o:"")}return(d,h,p)=>{if(t===!1)throw new ie(c(h," has been removed"+(r?" in "+r:"")),ie.ERR_DEPRECATED);return r&&!fo[h]&&(fo[h]=!0,console.warn(c(h," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(d,h,p):!0}};xi.spelling=function(t){return(r,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function uf(n,t,r){if(typeof n!="object")throw new ie("options must be an object",ie.ERR_BAD_OPTION_VALUE);const o=Object.keys(n);let c=o.length;for(;c-- >0;){const d=o[c],h=t[d];if(h){const p=n[d],m=p===void 0||h(p,d,n);if(m!==!0)throw new ie("option "+d+" must be "+m,ie.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ie("Unknown option "+d,ie.ERR_BAD_OPTION)}}const ui={assertOptions:uf,validators:xi},Xe=ui.validators;let At=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Zs,response:new Zs}}async request(t,r){try{return await this._request(t,r)}catch(o){if(o instanceof Error){let c={};Error.captureStackTrace?Error.captureStackTrace(c):c=new Error;const d=c.stack?c.stack.replace(/^.+\n/,""):"";try{o.stack?d&&!String(o.stack).endsWith(d.replace(/^.+\n.+\n/,""))&&(o.stack+=`
|
||||
`+d):o.stack=d}catch{}}throw o}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Ot(this.defaults,r);const{transitional:o,paramsSerializer:c,headers:d}=r;o!==void 0&&ui.assertOptions(o,{silentJSONParsing:Xe.transitional(Xe.boolean),forcedJSONParsing:Xe.transitional(Xe.boolean),clarifyTimeoutError:Xe.transitional(Xe.boolean)},!1),c!=null&&(O.isFunction(c)?r.paramsSerializer={serialize:c}:ui.assertOptions(c,{encode:Xe.function,serialize:Xe.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),ui.assertOptions(r,{baseUrl:Xe.spelling("baseURL"),withXsrfToken:Xe.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let h=d&&O.merge(d.common,d[r.method]);d&&O.forEach(["delete","get","head","post","put","patch","common"],E=>{delete d[E]}),r.headers=Ne.concat(h,d);const p=[];let m=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(r)===!1||(m=m&&S.synchronous,p.unshift(S.fulfilled,S.rejected))});const _=[];this.interceptors.response.forEach(function(S){_.push(S.fulfilled,S.rejected)});let v,C=0,R;if(!m){const E=[uo.bind(this),void 0];for(E.unshift(...p),E.push(..._),R=E.length,v=Promise.resolve(r);C<R;)v=v.then(E[C++],E[C++]);return v}R=p.length;let I=r;for(;C<R;){const E=p[C++],S=p[C++];try{I=E(I)}catch(x){S.call(this,x);break}}try{v=uo.call(this,I)}catch(E){return Promise.reject(E)}for(C=0,R=_.length;C<R;)v=v.then(_[C++],_[C++]);return v}getUri(t){t=Ot(this.defaults,t);const r=Ta(t.baseURL,t.url,t.allowAbsoluteUrls);return ya(r,t.params,t.paramsSerializer)}};O.forEach(["delete","get","head","options"],function(t){At.prototype[t]=function(r,o){return this.request(Ot(o||{},{method:t,url:r,data:(o||{}).data}))}});O.forEach(["post","put","patch"],function(t){function r(o){return function(d,h,p){return this.request(Ot(p||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:d,data:h}))}}At.prototype[t]=r(),At.prototype[t+"Form"]=r(!0)});let ff=class Ca{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(d){r=d});const o=this;this.promise.then(c=>{if(!o._listeners)return;let d=o._listeners.length;for(;d-- >0;)o._listeners[d](c);o._listeners=null}),this.promise.then=c=>{let d;const h=new Promise(p=>{o.subscribe(p),d=p}).then(c);return h.cancel=function(){o.unsubscribe(d)},h},t(function(d,h,p){o.reason||(o.reason=new an(d,h,p),r(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=o=>{t.abort(o)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Ca(function(c){t=c}),cancel:t}}};function df(n){return function(r){return n.apply(null,r)}}function hf(n){return O.isObject(n)&&n.isAxiosError===!0}const Pr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Pr).forEach(([n,t])=>{Pr[t]=n});function Oa(n){const t=new At(n),r=sa(At.prototype.request,t);return O.extend(r,At.prototype,t,{allOwnKeys:!0}),O.extend(r,t,null,{allOwnKeys:!0}),r.create=function(c){return Oa(Ot(n,c))},r}const ye=Oa(Dn);ye.Axios=At;ye.CanceledError=an;ye.CancelToken=ff;ye.isCancel=ba;ye.VERSION=xa;ye.toFormData=Ai;ye.AxiosError=ie;ye.Cancel=ye.CanceledError;ye.all=function(t){return Promise.all(t)};ye.spread=df;ye.isAxiosError=hf;ye.mergeConfig=Ot;ye.AxiosH
Line truncated
|
||||
`):e)),i};var Tc=/\[\]$/,qs=/\r?\n/g,wc=/^(?:submit|button|image|reset|file)$/i,Sc=/^(?:input|select|textarea|keygen)/i;function Qi(e,i,s,a){var u;if(Array.isArray(i))l.each(i,function(f,g){s||Tc.test(e)?a(e,g):Qi(e+"["+(typeof g=="object"&&g!=null?f:"")+"]",g,s,a)});else if(!s&&E(i)==="object")for(u in i)Qi(e+"["+u+"]",i[u],s,a);else a(e,i)}l.param=function(e,i){var s,a=[],u=function(f,g){var b=typeof g=="function"?g():g;a[a.length]=encodeURIComponent(f)+"="+encodeURIComponent(b??"")};if(e==null)return"";if(Array.isArray(e)||e.jquery&&!l.isPlainObject(e))l.each(e,function(){u(this.name,this.value)});else for(s in e)Qi(s,e[s],i,u);return a.join("&")},l.fn.extend({serialize:function(){return l.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=l.prop(this,"elements");return e?l.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!l(this).is(":disabled")&&Sc.test(this.nodeName)&&!wc.test(e)&&(this.checked||!Yn.test(e))}).map(function(e,i){var s=l(this).val();return s==null?null:Array.isArray(s)?l.map(s,function(a){return{name:i.name,value:a.replace(qs,`\r
|
||||
`)}}):{name:i.name,value:s.replace(qs,`\r
|
||||
`)}}).get()}});var Ac=/%20/g,xc=/#.*$/,Cc=/([?&])_=[^&]*/,Oc=/^(.*?):[ \t]*([^\r\n]*)$/mg,Nc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Dc=/^(?:GET|HEAD)$/,Lc=/^\/\//,Us={},Ji={},Ws="*/".concat("*"),Zi=P.createElement("a");Zi.href=_n.href;function Vs(e){return function(i,s){typeof i!="string"&&(s=i,i="*");var a,u=0,f=i.toLowerCase().match(Re)||[];if(typeof s=="function")for(;a=f[u++];)a[0]==="+"?(a=a.slice(1)||"*",(e[a]=e[a]||[]).unshift(s)):(e[a]=e[a]||[]).push(s)}}function zs(e,i,s,a){var u={},f=e===Ji;function g(b){var y;return u[b]=!0,l.each(e[b]||[],function(T,A){var L=A(i,s,a);if(typeof L=="string"&&!f&&!u[L])return i.dataTypes.unshift(L),g(L),!1;if(f)return!(y=L)}),y}return g(i.dataTypes[0])||!u["*"]&&g("*")}function er(e,i){var s,a,u=l.ajaxSettings.flatOptions||{};for(s in i)i[s]!==void 0&&((u[s]?e:a||(a={}))[s]=i[s]);return a&&l.extend(!0,e,a),e}function Pc(e,i,s){for(var a,u,f,g,b=e.contents,y=e.dataTypes;y[0]==="*";)y.shift(),a===void 0&&(a=e.mimeType||i.getResponseHeader("Content-Type"));if(a){for(u in b)if(b[u]&&b[u].test(a)){y.unshift(u);break}}if(y[0]in s)f=y[0];else{for(u in s){if(!y[0]||e.converters[u+" "+y[0]]){f=u;break}g||(g=u)}f=f||g}if(f)return f!==y[0]&&y.unshift(f),s[f]}function Rc(e,i,s,a){var u,f,g,b,y,T={},A=e.dataTypes.slice();if(A[1])for(g in e.converters)T[g.toLowerCase()]=e.converters[g];for(f=A.shift();f;)if(e.responseFields[f]&&(s[e.responseFields[f]]=i),!y&&a&&e.dataFilter&&(i=e.dataFilter(i,e.dataType)),y=f,f=A.shift(),f){if(f==="*")f=y;else if(y!=="*"&&y!==f){if(g=T[y+" "+f]||T["* "+f],!g){for(u in T)if(b=u.split(" "),b[1]===f&&(g=T[y+" "+b[0]]||T["* "+b[0]],g)){g===!0?g=T[u]:T[u]!==!0&&(f=b[0],A.unshift(b[1]));break}}if(g!==!0)if(g&&e.throws)i=g(i);else try{i=g(i)}catch(L){return{state:"parsererror",error:g?L:"No conversion from "+y+" to "+f}}}}return{state:"success",data:i}}l.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:_n.href,type:"GET",isLocal:Nc.test(_n.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ws,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":l.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,i){return i?er(er(e,l.ajaxSettings),i):er(l.ajaxSettings,e)},ajaxPrefilter:Vs(Us),ajaxTransport:Vs(Ji),ajax:function(e,i){typeof e=="object"&&(i=e,e=void 0),i=i||{};var s,a,u,f,g,b,y,T,A,L,w=l.ajaxSetup({},i),D=w.context||w,$=w.context&&(D.nodeType||D.jquery)?l(D):l.event,ee=l.Deferred(),G=l.Callbacks("once memory"),ge=w.statusCode||{},pe={},xe={},be="canceled",le={readyState:0,getResponseHeader:function(ue){var ve;if(y){if(!f)for(f={};ve=Oc.exec(u);)f[ve[1].toLowerCase()+" "]=(f[ve[1].toLowerCase()+" "]||[]).concat(ve[2]);ve=f[ue.toLowerCase()+" "]}return ve==null?null:ve.join(", ")},getAllResponseHeaders:function(){return y?u:null},setRequestHeader:function(ue,ve){return y==null&&(ue=xe[ue.toLowerCase()]=xe[ue.toLowerCase()]||ue,pe[ue]=ve),this},overrideMimeType:function(ue){return y==null&&(w.mimeType=ue),this},statusCode:function(ue){var ve;if(ue)if(y)le.always(ue[le.status]);else for(ve in ue)ge[ve]=[ge[ve],ue[ve]];return this},abort:function(ue){var ve=ue||be;return s&&s.abort(ve),Zn(0,ve),this}};if(ee.promise(le),w.url=((e||w.url||_n.href)+"").replace(Lc,_n.protocol+"//"),w.type=i.method||i.type||w.method||w.type,w.dataTypes=(w.dataType||"*").toLowerCase().match(Re)||[""],w.crossDomain==null){b=P.createElement("a");try{b.href=w.url,b.href=b.href,w.crossDomain=Zi.protocol+"//"+Zi.host!=b.protocol+"//"+b.host}catch{w.crossDomain=!0}}if(zs(Us,w,i,le),w.data&&w.processData&&typeof w.data!="string"&&(w.data=l.param(w.data,w.traditional)),y)return le;T=l.event&&w.global,T&&l.active++===0&&l.event.trigger("ajaxStart"),w.type=w.type.toUpperCase(),w.hasContent=!Dc.test(w.type),a=w.url.replace(xc,""),w.hasContent?w.data&&w.processData&&(w.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(w.data=w.data.replace(Ac,"+")):(L=w.url.slice(a.length),w.data&&(w.processData||typeof w.data=="string")&&(a+=(Xi.test(a)?"&":"?")+w.data,delete w.data),w.cache===!1&&(a=a.replace(Cc,"$1"),L=(Xi.test(a)?"&":"?")+"_="+Bs.guid+++L),w.url=a+L),w.ifModified&&(l.lastModified[a]&&le.setRequestHeader("If-Modified-Since",l.lastModified[a]),l.etag[a]&&le.setRequestHeader("If-None-Match",l.etag[a])),(w.data&&w.hasContent&&w.contentType!==!1||i.contentType)&&le.setRequestHeader("Content-Type",w.contentType),le.setRequestHeader("Accept",w.dataTypes[0]&&w.accepts[w.dataTypes[0]]?w.accepts[w.dataTypes[0]]+(w.dataTypes[0]!=="*"?", "+Ws+"; q=0.01":""):w.accepts["*"]);for(A in w.headers)le.setRequestHeader(A,w.headers[A]);if(w.beforeSend&&(w.beforeSend.call(D,le,w)===!1||y))return le.abort();if(be="abort",G.a
Line truncated
|
||||
@@ -0,0 +1,9 @@
|
||||
function sa(n,t){return function(){return n.apply(t,arguments)}}const{toString:Hc}=Object.prototype,{getPrototypeOf:Fr}=Object,{iterator:Ti,toStringTag:oa}=Symbol,wi=(n=>t=>{const r=Hc.call(t);return n[r]||(n[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Ve=n=>(n=n.toLowerCase(),t=>wi(t)===n),Si=n=>t=>typeof t===n,{isArray:on}=Array,Qt=Si("undefined");function Cn(n){return n!==null&&!Qt(n)&&n.constructor!==null&&!Qt(n.constructor)&&Oe(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const aa=Ve("ArrayBuffer");function $c(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&aa(n.buffer),t}const Fc=Si("string"),Oe=Si("function"),la=Si("number"),On=n=>n!==null&&typeof n=="object",Bc=n=>n===!0||n===!1,li=n=>{if(wi(n)!=="object")return!1;const t=Fr(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(oa in n)&&!(Ti in n)},qc=n=>{if(!On(n)||Cn(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},Uc=Ve("Date"),Wc=Ve("File"),Vc=Ve("Blob"),zc=Ve("FileList"),Kc=n=>On(n)&&Oe(n.pipe),Yc=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||Oe(n.append)&&((t=wi(n))==="formdata"||t==="object"&&Oe(n.toString)&&n.toString()==="[object FormData]"))},Gc=Ve("URLSearchParams"),[Xc,Qc,Jc,Zc]=["ReadableStream","Request","Response","Headers"].map(Ve),eu=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Nn(n,t,{allOwnKeys:r=!1}={}){if(n===null||typeof n>"u")return;let o,c;if(typeof n!="object"&&(n=[n]),on(n))for(o=0,c=n.length;o<c;o++)t.call(null,n[o],o,n);else{if(Cn(n))return;const d=r?Object.getOwnPropertyNames(n):Object.keys(n),h=d.length;let p;for(o=0;o<h;o++)p=d[o],t.call(null,n[p],p,n)}}function ca(n,t){if(Cn(n))return null;t=t.toLowerCase();const r=Object.keys(n);let o=r.length,c;for(;o-- >0;)if(c=r[o],t===c.toLowerCase())return c;return null}const Tt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ua=n=>!Qt(n)&&n!==Tt;function Nr(){const{caseless:n,skipUndefined:t}=ua(this)&&this||{},r={},o=(c,d)=>{const h=n&&ca(r,d)||d;li(r[h])&&li(c)?r[h]=Nr(r[h],c):li(c)?r[h]=Nr({},c):on(c)?r[h]=c.slice():(!t||!Qt(c))&&(r[h]=c)};for(let c=0,d=arguments.length;c<d;c++)arguments[c]&&Nn(arguments[c],o);return r}const tu=(n,t,r,{allOwnKeys:o}={})=>(Nn(t,(c,d)=>{r&&Oe(c)?n[d]=sa(c,r):n[d]=c},{allOwnKeys:o}),n),nu=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),iu=(n,t,r,o)=>{n.prototype=Object.create(t.prototype,o),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),r&&Object.assign(n.prototype,r)},ru=(n,t,r,o)=>{let c,d,h;const p={};if(t=t||{},n==null)return t;do{for(c=Object.getOwnPropertyNames(n),d=c.length;d-- >0;)h=c[d],(!o||o(h,n,t))&&!p[h]&&(t[h]=n[h],p[h]=!0);n=r!==!1&&Fr(n)}while(n&&(!r||r(n,t))&&n!==Object.prototype);return t},su=(n,t,r)=>{n=String(n),(r===void 0||r>n.length)&&(r=n.length),r-=t.length;const o=n.indexOf(t,r);return o!==-1&&o===r},ou=n=>{if(!n)return null;if(on(n))return n;let t=n.length;if(!la(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=n[t];return r},au=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Fr(Uint8Array)),lu=(n,t)=>{const o=(n&&n[Ti]).call(n);let c;for(;(c=o.next())&&!c.done;){const d=c.value;t.call(n,d[0],d[1])}},cu=(n,t)=>{let r;const o=[];for(;(r=n.exec(t))!==null;)o.push(r);return o},uu=Ve("HTMLFormElement"),fu=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,o,c){return o.toUpperCase()+c}),Xs=(({hasOwnProperty:n})=>(t,r)=>n.call(t,r))(Object.prototype),du=Ve("RegExp"),fa=(n,t)=>{const r=Object.getOwnPropertyDescriptors(n),o={};Nn(r,(c,d)=>{let h;(h=t(c,d,n))!==!1&&(o[d]=h||c)}),Object.defineProperties(n,o)},hu=n=>{fa(n,(t,r)=>{if(Oe(n)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const o=n[r];if(Oe(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},pu=(n,t)=>{const r={},o=c=>{c.forEach(d=>{r[d]=!0})};return on(n)?o(n):o(String(n).split(t)),r},gu=()=>{},mu=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function yu(n){return!!(n&&Oe(n.append)&&n[oa]==="FormData"&&n[Ti])}const vu=n=>{const t=new Array(10),r=(o,c)=>{if(On(o)){if(t.indexOf(o)>=0)return;if(Cn(o))return o;if(!("toJSON"in o)){t[c]=o;const d=on(o)?[]:{};return Nn(o,(h,p)=>{const m=r(h,c+1);!Qt(m)&&(d[p]=m)}),t[c]=void 0,d}}return o};return r(n,0)},_u=Ve("AsyncFunction"),bu=n=>n&&(On(n)||Oe(n))&&Oe(n.then)&&Oe(n.catch),da=((n,t)=>n?setImmediate:t?((r,o)=>(Tt.addEventListener("message",({source:c,data:d})=>{c===Tt&&d===r&&o.length&&o.shift()()},!1),c=>{o.push(c),Tt.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Oe(Tt.postMessage)),Eu=typeof queueMicrotask<"u"?queueMicrotask.bind(Tt):typeof process<"u"&&process.nextTick||da,Tu=n=>n!=null&&Oe(n[Ti]),O={isArray:on,isArrayBuffer:aa,isBuffer:Cn,isFormData:Yc,isArrayBufferView:$cLine truncated
|
||||
`).forEach(function(h){c=h.indexOf(":"),r=h.substring(0,c).trim().toLowerCase(),o=h.substring(c+1).trim(),!(!r||t[r]&&$u[r])&&(r==="set-cookie"?t[r]?t[r].push(o):t[r]=[o]:t[r]=t[r]?t[r]+", "+o:o)}),t},eo=Symbol("internals");function En(n){return n&&String(n).trim().toLowerCase()}function ci(n){return n===!1||n==null?n:O.isArray(n)?n.map(ci):String(n)}function Bu(n){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=r.exec(n);)t[o[1]]=o[2];return t}const qu=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function ir(n,t,r,o,c){if(O.isFunction(o))return o.call(this,t,r);if(c&&(t=r),!!O.isString(t)){if(O.isString(o))return t.indexOf(o)!==-1;if(O.isRegExp(o))return o.test(t)}}function Uu(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,o)=>r.toUpperCase()+o)}function Wu(n,t){const r=O.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(n,o+r,{value:function(c,d,h){return this[o].call(this,t,c,d,h)},configurable:!0})})}let Ne=class{constructor(t){t&&this.set(t)}set(t,r,o){const c=this;function d(p,m,_){const v=En(m);if(!v)throw new Error("header name must be a non-empty string");const C=O.findKey(c,v);(!C||c[C]===void 0||_===!0||_===void 0&&c[C]!==!1)&&(c[C||m]=ci(p))}const h=(p,m)=>O.forEach(p,(_,v)=>d(_,v,m));if(O.isPlainObject(t)||t instanceof this.constructor)h(t,r);else if(O.isString(t)&&(t=t.trim())&&!qu(t))h(Fu(t),r);else if(O.isObject(t)&&O.isIterable(t)){let p={},m,_;for(const v of t){if(!O.isArray(v))throw TypeError("Object iterator must return a key-value pair");p[_=v[0]]=(m=p[_])?O.isArray(m)?[...m,v[1]]:[m,v[1]]:v[1]}h(p,r)}else t!=null&&d(r,t,o);return this}get(t,r){if(t=En(t),t){const o=O.findKey(this,t);if(o){const c=this[o];if(!r)return c;if(r===!0)return Bu(c);if(O.isFunction(r))return r.call(this,c,o);if(O.isRegExp(r))return r.exec(c);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=En(t),t){const o=O.findKey(this,t);return!!(o&&this[o]!==void 0&&(!r||ir(this,this[o],o,r)))}return!1}delete(t,r){const o=this;let c=!1;function d(h){if(h=En(h),h){const p=O.findKey(o,h);p&&(!r||ir(o,o[p],p,r))&&(delete o[p],c=!0)}}return O.isArray(t)?t.forEach(d):d(t),c}clear(t){const r=Object.keys(this);let o=r.length,c=!1;for(;o--;){const d=r[o];(!t||ir(this,this[d],d,t,!0))&&(delete this[d],c=!0)}return c}normalize(t){const r=this,o={};return O.forEach(this,(c,d)=>{const h=O.findKey(o,d);if(h){r[h]=ci(c),delete r[d];return}const p=t?Uu(d):String(d).trim();p!==d&&delete r[d],r[p]=ci(c),o[p]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return O.forEach(this,(o,c)=>{o!=null&&o!==!1&&(r[c]=t&&O.isArray(o)?o.join(", "):o)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
||||
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const o=new this(t);return r.forEach(c=>o.set(c)),o}static accessor(t){const o=(this[eo]=this[eo]={accessors:{}}).accessors,c=this.prototype;function d(h){const p=En(h);o[p]||(Wu(c,h),o[p]=!0)}return O.isArray(t)?t.forEach(d):d(t),this}};Ne.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);O.reduceDescriptors(Ne.prototype,({value:n},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(o){this[r]=o}}});O.freezeMethods(Ne);function rr(n,t){const r=this||Dn,o=t||r,c=Ne.from(o.headers);let d=o.data;return O.forEach(n,function(p){d=p.call(r,d,c.normalize(),t?t.status:void 0)}),c.normalize(),d}function ba(n){return!!(n&&n.__CANCEL__)}function an(n,t,r){ie.call(this,n??"canceled",ie.ERR_CANCELED,t,r),this.name="CanceledError"}O.inherits(an,ie,{__CANCEL__:!0});function Ea(n,t,r){const o=r.config.validateStatus;!r.status||!o||o(r.status)?n(r):t(new ie("Request failed with status code "+r.status,[ie.ERR_BAD_REQUEST,ie.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Vu(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function zu(n,t){n=n||10;const r=new Array(n),o=new Array(n);let c=0,d=0,h;return t=t!==void 0?t:1e3,function(m){const _=Date.now(),v=o[d];h||(h=_),r[c]=m,o[c]=_;let C=d,R=0;for(;C!==c;)R+=r[C++],C=C%n;if(c=(c+1)%n,c===d&&(d=(d+1)%n),_-h<t)return;const I=v&&_-v;return I?Math.round(R*1e3/I):void 0}}function Ku(n,t){let r=0,o=1e3/t,c,d;const h=(_,v=Date.now())=>{r=v,c=null,d&&(clearTimeout(d),d=null),n(..._)};return[(..._)=>{const v=Date.now(),C=v-r;C>=o?h(_,v):(c=_,d||(d=setTimeout(()=>{d=null,h(c)},o-C)))},()=>c&&h(c)]}const yi=(n,t,r=3)=>{let o=0;const c=zu(50,250);return Ku(d=>{const h=d.loaded,p=d.lengthComputable?d.total:void 0,m=h-o,_=c(m),v=h<=p;o=h;const C={loaded:h,total:p,progress:p?h/p:void 0,bytes:m,rate:_||void 0,estimated:_&&p&&v?(p-h)/_:void 0,event:d,lengthComputable:p!=null,[t?"download":"upload"]:!0};n(C)},r)},to=(n,t)=>{const r=n!=null;return[o=>t[0]({lengthComputable:r,total:n,loaded:o}),t[1]]},no=n=>(...t)=>O.asap(()=>n(...t)),Yu=Ee.hasStandardBrowserEnv?((n,t)=>r=>(r=new URL(r,Ee.origin),n.protocol===r.protocol&&n.host===r.host&&(t||n.port===r.port)))(new URL(Ee.origin),Ee.navigator&&/(msie|trident)/i.test(Ee.navigator.userAgent)):()=>!0,Gu=Ee.hasStandardBrowserEnv?{write(n,t,r,o,c,d,h){if(typeof document>"u")return;const p=[`${n}=${encodeURIComponent(t)}`];O.isNumber(r)&&p.push(`expires=${new Date(r).toUTCString()}`),O.isString(o)&&p.push(`path=${o}`),O.isString(c)&&p.push(`domain=${c}`),d===!0&&p.push("secure"),O.isString(h)&&p.push(`SameSite=${h}`),document.cookie=p.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+n+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Xu(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Qu(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function Ta(n,t,r){let o=!Xu(t);return n&&(o||r==!1)?Qu(n,t):t}const io=n=>n instanceof Ne?{...n}:n;function Ot(n,t){t=t||{};const r={};function o(_,v,C,R){return O.isPlainObject(_)&&O.isPlainObject(v)?O.merge.call({caseless:R},_,v):O.isPlainObject(v)?O.merge({},v):O.isArray(v)?v.slice():v}function c(_,v,C,R){if(O.isUndefined(v)){if(!O.isUndefined(_))return o(void 0,_,C,R)}else return o(_,v,C,R)}function d(_,v){if(!O.isUndefined(v))return o(void 0,v)}function h(_,v){if(O.isUndefined(v)){if(!O.isUndefined(_))return o(void 0,_)}else return o(void 0,v)}function p(_,v,C){if(C in t)return o(_,v);if(C in n)return o(void 0,_)}const m={url:d,method:d,data:d,baseURL:h,transformRequest:h,transformResponse:h,paramsSerializer:h,timeout:h,timeoutMessage:h,withCredentials:h,withXSRFToken:h,adapter:h,responseType:h,xsrfCookieName:h,xsrfHeaderName:h,onUploadProgress:h,onDownloadProgress:h,decompress:h,maxContentLength:h,maxBodyLength:h,beforeRedirect:h,transport:h,httpAgent:h,httpsAgent:h,cancelToken:h,socketPath:h,responseEncoding:h,validateStatus:p,headers:(_,v,C)=>c(io(_),io(v),C,!0)};return O.forEach(Object.keys({...n,...t}),function(v){const C=m[v]||c,R=C(n[v],t[v],v);O.isUndefined(R)&&C!==p||(r[v]=R)}),r}const wa=n=>{const t=Ot({},n);let{data:r,withXSRFToken:o,xsrfHeaderName:c,xsrfCookieName:d,headers:h,auth:p}=t;if(t.headers=h=Ne.from(h),t.url=ya(Ta(t.baseURL,t.url,t.allowAbsoluteUrls),n.params,n.paramsSerializer),p&&h.set("Authorization","Basic "+btoa((p.username||"")+":"+(p.password?unescape(encodeURIComponent(p.password)):""))),O.isFormData(r)){if(Ee.hasStandardBrowserEnv||Ee.hasStandardBrowserWebWorkerEnv)h.setContentType(void 0);else if(O.isFunction(r.getHeaders)){const m=r.getHeaders(),_=["content-type","content-length"];Object.entries(m).forEach(([v,C])=>{_.inclu
Line truncated
|
||||
`+h.map(co).join(`
|
||||
`):" "+co(h[0]):"as no adapter specified";throw new ie("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return c}const Aa={getAdapter:cf,adapters:Ur};function sr(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new an(null,n)}function uo(n){return sr(n),n.headers=Ne.from(n.headers),n.data=rr.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Aa.getAdapter(n.adapter||Dn.adapter,n)(n).then(function(o){return sr(n),o.data=rr.call(n,n.transformResponse,o),o.headers=Ne.from(o.headers),o},function(o){return ba(o)||(sr(n),o&&o.response&&(o.response.data=rr.call(n,n.transformResponse,o.response),o.response.headers=Ne.from(o.response.headers))),Promise.reject(o)})}const xa="1.13.2",xi={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{xi[n]=function(o){return typeof o===n||"a"+(t<1?"n ":" ")+n}});const fo={};xi.transitional=function(t,r,o){function c(d,h){return"[Axios v"+xa+"] Transitional option '"+d+"'"+h+(o?". "+o:"")}return(d,h,p)=>{if(t===!1)throw new ie(c(h," has been removed"+(r?" in "+r:"")),ie.ERR_DEPRECATED);return r&&!fo[h]&&(fo[h]=!0,console.warn(c(h," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(d,h,p):!0}};xi.spelling=function(t){return(r,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function uf(n,t,r){if(typeof n!="object")throw new ie("options must be an object",ie.ERR_BAD_OPTION_VALUE);const o=Object.keys(n);let c=o.length;for(;c-- >0;){const d=o[c],h=t[d];if(h){const p=n[d],m=p===void 0||h(p,d,n);if(m!==!0)throw new ie("option "+d+" must be "+m,ie.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ie("Unknown option "+d,ie.ERR_BAD_OPTION)}}const ui={assertOptions:uf,validators:xi},Xe=ui.validators;let At=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Zs,response:new Zs}}async request(t,r){try{return await this._request(t,r)}catch(o){if(o instanceof Error){let c={};Error.captureStackTrace?Error.captureStackTrace(c):c=new Error;const d=c.stack?c.stack.replace(/^.+\n/,""):"";try{o.stack?d&&!String(o.stack).endsWith(d.replace(/^.+\n.+\n/,""))&&(o.stack+=`
|
||||
`+d):o.stack=d}catch{}}throw o}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Ot(this.defaults,r);const{transitional:o,paramsSerializer:c,headers:d}=r;o!==void 0&&ui.assertOptions(o,{silentJSONParsing:Xe.transitional(Xe.boolean),forcedJSONParsing:Xe.transitional(Xe.boolean),clarifyTimeoutError:Xe.transitional(Xe.boolean)},!1),c!=null&&(O.isFunction(c)?r.paramsSerializer={serialize:c}:ui.assertOptions(c,{encode:Xe.function,serialize:Xe.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),ui.assertOptions(r,{baseUrl:Xe.spelling("baseURL"),withXsrfToken:Xe.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let h=d&&O.merge(d.common,d[r.method]);d&&O.forEach(["delete","get","head","post","put","patch","common"],E=>{delete d[E]}),r.headers=Ne.concat(h,d);const p=[];let m=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(r)===!1||(m=m&&S.synchronous,p.unshift(S.fulfilled,S.rejected))});const _=[];this.interceptors.response.forEach(function(S){_.push(S.fulfilled,S.rejected)});let v,C=0,R;if(!m){const E=[uo.bind(this),void 0];for(E.unshift(...p),E.push(..._),R=E.length,v=Promise.resolve(r);C<R;)v=v.then(E[C++],E[C++]);return v}R=p.length;let I=r;for(;C<R;){const E=p[C++],S=p[C++];try{I=E(I)}catch(x){S.call(this,x);break}}try{v=uo.call(this,I)}catch(E){return Promise.reject(E)}for(C=0,R=_.length;C<R;)v=v.then(_[C++],_[C++]);return v}getUri(t){t=Ot(this.defaults,t);const r=Ta(t.baseURL,t.url,t.allowAbsoluteUrls);return ya(r,t.params,t.paramsSerializer)}};O.forEach(["delete","get","head","options"],function(t){At.prototype[t]=function(r,o){return this.request(Ot(o||{},{method:t,url:r,data:(o||{}).data}))}});O.forEach(["post","put","patch"],function(t){function r(o){return function(d,h,p){return this.request(Ot(p||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:d,data:h}))}}At.prototype[t]=r(),At.prototype[t+"Form"]=r(!0)});let ff=class Ca{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(d){r=d});const o=this;this.promise.then(c=>{if(!o._listeners)return;let d=o._listeners.length;for(;d-- >0;)o._listeners[d](c);o._listeners=null}),this.promise.then=c=>{let d;const h=new Promise(p=>{o.subscribe(p),d=p}).then(c);return h.cancel=function(){o.unsubscribe(d)},h},t(function(d,h,p){o.reason||(o.reason=new an(d,h,p),r(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=o=>{t.abort(o)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Ca(function(c){t=c}),cancel:t}}};function df(n){return function(r){return n.apply(null,r)}}function hf(n){return O.isObject(n)&&n.isAxiosError===!0}const Pr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Pr).forEach(([n,t])=>{Pr[t]=n});function Oa(n){const t=new At(n),r=sa(At.prototype.request,t);return O.extend(r,At.prototype,t,{allOwnKeys:!0}),O.extend(r,t,null,{allOwnKeys:!0}),r.create=function(c){return Oa(Ot(n,c))},r}const ye=Oa(Dn);ye.Axios=At;ye.CanceledError=an;ye.CancelToken=ff;ye.isCancel=ba;ye.VERSION=xa;ye.toFormData=Ai;ye.AxiosError=ie;ye.Cancel=ye.CanceledError;ye.all=function(t){return Promise.all(t)};ye.spread=df;ye.isAxiosError=hf;ye.mergeConfig=Ot;ye.AxiosH
Line truncated
|
||||
`):e)),i};var Tc=/\[\]$/,qs=/\r?\n/g,wc=/^(?:submit|button|image|reset|file)$/i,Sc=/^(?:input|select|textarea|keygen)/i;function Qi(e,i,s,a){var u;if(Array.isArray(i))l.each(i,function(f,g){s||Tc.test(e)?a(e,g):Qi(e+"["+(typeof g=="object"&&g!=null?f:"")+"]",g,s,a)});else if(!s&&E(i)==="object")for(u in i)Qi(e+"["+u+"]",i[u],s,a);else a(e,i)}l.param=function(e,i){var s,a=[],u=function(f,g){var b=typeof g=="function"?g():g;a[a.length]=encodeURIComponent(f)+"="+encodeURIComponent(b??"")};if(e==null)return"";if(Array.isArray(e)||e.jquery&&!l.isPlainObject(e))l.each(e,function(){u(this.name,this.value)});else for(s in e)Qi(s,e[s],i,u);return a.join("&")},l.fn.extend({serialize:function(){return l.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=l.prop(this,"elements");return e?l.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!l(this).is(":disabled")&&Sc.test(this.nodeName)&&!wc.test(e)&&(this.checked||!Yn.test(e))}).map(function(e,i){var s=l(this).val();return s==null?null:Array.isArray(s)?l.map(s,function(a){return{name:i.name,value:a.replace(qs,`\r
|
||||
`)}}):{name:i.name,value:s.replace(qs,`\r
|
||||
`)}}).get()}});var Ac=/%20/g,xc=/#.*$/,Cc=/([?&])_=[^&]*/,Oc=/^(.*?):[ \t]*([^\r\n]*)$/mg,Nc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Dc=/^(?:GET|HEAD)$/,Lc=/^\/\//,Us={},Ji={},Ws="*/".concat("*"),Zi=P.createElement("a");Zi.href=_n.href;function Vs(e){return function(i,s){typeof i!="string"&&(s=i,i="*");var a,u=0,f=i.toLowerCase().match(Re)||[];if(typeof s=="function")for(;a=f[u++];)a[0]==="+"?(a=a.slice(1)||"*",(e[a]=e[a]||[]).unshift(s)):(e[a]=e[a]||[]).push(s)}}function zs(e,i,s,a){var u={},f=e===Ji;function g(b){var y;return u[b]=!0,l.each(e[b]||[],function(T,A){var L=A(i,s,a);if(typeof L=="string"&&!f&&!u[L])return i.dataTypes.unshift(L),g(L),!1;if(f)return!(y=L)}),y}return g(i.dataTypes[0])||!u["*"]&&g("*")}function er(e,i){var s,a,u=l.ajaxSettings.flatOptions||{};for(s in i)i[s]!==void 0&&((u[s]?e:a||(a={}))[s]=i[s]);return a&&l.extend(!0,e,a),e}function Pc(e,i,s){for(var a,u,f,g,b=e.contents,y=e.dataTypes;y[0]==="*";)y.shift(),a===void 0&&(a=e.mimeType||i.getResponseHeader("Content-Type"));if(a){for(u in b)if(b[u]&&b[u].test(a)){y.unshift(u);break}}if(y[0]in s)f=y[0];else{for(u in s){if(!y[0]||e.converters[u+" "+y[0]]){f=u;break}g||(g=u)}f=f||g}if(f)return f!==y[0]&&y.unshift(f),s[f]}function Rc(e,i,s,a){var u,f,g,b,y,T={},A=e.dataTypes.slice();if(A[1])for(g in e.converters)T[g.toLowerCase()]=e.converters[g];for(f=A.shift();f;)if(e.responseFields[f]&&(s[e.responseFields[f]]=i),!y&&a&&e.dataFilter&&(i=e.dataFilter(i,e.dataType)),y=f,f=A.shift(),f){if(f==="*")f=y;else if(y!=="*"&&y!==f){if(g=T[y+" "+f]||T["* "+f],!g){for(u in T)if(b=u.split(" "),b[1]===f&&(g=T[y+" "+b[0]]||T["* "+b[0]],g)){g===!0?g=T[u]:T[u]!==!0&&(f=b[0],A.unshift(b[1]));break}}if(g!==!0)if(g&&e.throws)i=g(i);else try{i=g(i)}catch(L){return{state:"parsererror",error:g?L:"No conversion from "+y+" to "+f}}}}return{state:"success",data:i}}l.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:_n.href,type:"GET",isLocal:Nc.test(_n.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ws,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":l.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,i){return i?er(er(e,l.ajaxSettings),i):er(l.ajaxSettings,e)},ajaxPrefilter:Vs(Us),ajaxTransport:Vs(Ji),ajax:function(e,i){typeof e=="object"&&(i=e,e=void 0),i=i||{};var s,a,u,f,g,b,y,T,A,L,w=l.ajaxSetup({},i),D=w.context||w,$=w.context&&(D.nodeType||D.jquery)?l(D):l.event,ee=l.Deferred(),G=l.Callbacks("once memory"),ge=w.statusCode||{},pe={},xe={},be="canceled",le={readyState:0,getResponseHeader:function(ue){var ve;if(y){if(!f)for(f={};ve=Oc.exec(u);)f[ve[1].toLowerCase()+" "]=(f[ve[1].toLowerCase()+" "]||[]).concat(ve[2]);ve=f[ue.toLowerCase()+" "]}return ve==null?null:ve.join(", ")},getAllResponseHeaders:function(){return y?u:null},setRequestHeader:function(ue,ve){return y==null&&(ue=xe[ue.toLowerCase()]=xe[ue.toLowerCase()]||ue,pe[ue]=ve),this},overrideMimeType:function(ue){return y==null&&(w.mimeType=ue),this},statusCode:function(ue){var ve;if(ue)if(y)le.always(ue[le.status]);else for(ve in ue)ge[ve]=[ge[ve],ue[ve]];return this},abort:function(ue){var ve=ue||be;return s&&s.abort(ve),Zn(0,ve),this}};if(ee.promise(le),w.url=((e||w.url||_n.href)+"").replace(Lc,_n.protocol+"//"),w.type=i.method||i.type||w.method||w.type,w.dataTypes=(w.dataType||"*").toLowerCase().match(Re)||[""],w.crossDomain==null){b=P.createElement("a");try{b.href=w.url,b.href=b.href,w.crossDomain=Zi.protocol+"//"+Zi.host!=b.protocol+"//"+b.host}catch{w.crossDomain=!0}}if(zs(Us,w,i,le),w.data&&w.processData&&typeof w.data!="string"&&(w.data=l.param(w.data,w.traditional)),y)return le;T=l.event&&w.global,T&&l.active++===0&&l.event.trigger("ajaxStart"),w.type=w.type.toUpperCase(),w.hasContent=!Dc.test(w.type),a=w.url.replace(xc,""),w.hasContent?w.data&&w.processData&&(w.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(w.data=w.data.replace(Ac,"+")):(L=w.url.slice(a.length),w.data&&(w.processData||typeof w.data=="string")&&(a+=(Xi.test(a)?"&":"?")+w.data,delete w.data),w.cache===!1&&(a=a.replace(Cc,"$1"),L=(Xi.test(a)?"&":"?")+"_="+Bs.guid+++L),w.url=a+L),w.ifModified&&(l.lastModified[a]&&le.setRequestHeader("If-Modified-Since",l.lastModified[a]),l.etag[a]&&le.setRequestHeader("If-None-Match",l.etag[a])),(w.data&&w.hasContent&&w.contentType!==!1||i.contentType)&&le.setRequestHeader("Content-Type",w.contentType),le.setRequestHeader("Accept",w.dataTypes[0]&&w.accepts[w.dataTypes[0]]?w.accepts[w.dataTypes[0]]+(w.dataTypes[0]!=="*"?", "+Ws+"; q=0.01":""):w.accepts["*"]);for(A in w.headers)le.setRequestHeader(A,w.headers[A]);if(w.beforeSend&&(w.beforeSend.call(D,le,w)===!1||y))return le.abort();if(be="abort",G.a
Line truncated
|
||||
@@ -1,19 +1,19 @@
|
||||
{
|
||||
"node_modules/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2": {
|
||||
"../../../node_modules/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2": {
|
||||
"file": "assets/fa-brands-400-BfBXV7Mm.woff2",
|
||||
"src": "node_modules/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2"
|
||||
"src": "../../../node_modules/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2"
|
||||
},
|
||||
"node_modules/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2": {
|
||||
"../../../node_modules/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2": {
|
||||
"file": "assets/fa-regular-400-BVHPE7da.woff2",
|
||||
"src": "node_modules/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2"
|
||||
"src": "../../../node_modules/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2"
|
||||
},
|
||||
"node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2": {
|
||||
"../../../node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2": {
|
||||
"file": "assets/fa-solid-900-8GirhLYJ.woff2",
|
||||
"src": "node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2"
|
||||
"src": "../../../node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2"
|
||||
},
|
||||
"node_modules/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.woff2": {
|
||||
"../../../node_modules/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.woff2": {
|
||||
"file": "assets/fa-v4compatibility-DnhYSyY-.woff2",
|
||||
"src": "node_modules/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.woff2"
|
||||
"src": "../../../node_modules/@fortawesome/fontawesome-free/webfonts/fa-v4compatibility.woff2"
|
||||
},
|
||||
"resources/css/app.css": {
|
||||
"file": "assets/app-BCx10ygF.css",
|
||||
@@ -28,7 +28,7 @@
|
||||
"src": "resources/fonts/iconfont/iconfont.woff"
|
||||
},
|
||||
"resources/js/app.js": {
|
||||
"file": "assets/app-DDSp2ths.js",
|
||||
"file": "assets/app-BJweg-u1.js",
|
||||
"name": "app",
|
||||
"src": "resources/js/app.js",
|
||||
"isEntry": true
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
.airport-recommendations{margin:28px 0 24px;scroll-margin-top:100px;color:#424852;clear:both;font-size:14px;line-height:1.65}
|
||||
.airport-recommendations__heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}
|
||||
.post-content .airport-recommendations__heading h2{font-size:21px;line-height:1.4;margin:0;padding:0;border:0;color:#29323d;font-weight:700}
|
||||
.airport-recommendations__heading>span{font-size:11px;color:#8e98a5;letter-spacing:.06em}
|
||||
.airport-recommendations__table-wrap{border:1px solid #e8edf2;border-radius:10px;overflow:hidden;background:#fff}
|
||||
.post-content .airport-recommendations__table{width:100%;table-layout:fixed;border:0;border-collapse:collapse;margin:0;font-size:13px;line-height:1.65}
|
||||
.post-content .airport-recommendations__table thead th{background:#f7f9fc;color:#7b8795;font-weight:500;font-size:12px;border:0;border-bottom:1px solid #e8edf2;padding:12px 11px;text-align:left}
|
||||
.post-content .airport-recommendations__table thead th:nth-child(1){width:19%}.post-content .airport-recommendations__table thead th:nth-child(2){width:15%}.post-content .airport-recommendations__table thead th:nth-child(3){width:18%}.post-content .airport-recommendations__table thead th:nth-child(4){width:25%}.post-content .airport-recommendations__table thead th:nth-child(5){width:23%}
|
||||
.post-content .airport-recommendations__table tbody th,.post-content .airport-recommendations__table tbody td{padding:18px 11px;border:0;border-bottom:1px solid #edf0f5;vertical-align:middle;background:transparent;text-align:left;overflow-wrap:anywhere}
|
||||
.post-content .airport-recommendations__table tbody tr:last-child>*{border-bottom:0}
|
||||
.post-content .airport-provider a{font-size:14px;font-weight:700;text-decoration:none;color:#2f4057;display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
|
||||
.post-content .airport-provider a:hover{color:#238dce}.airport-provider a>span{font-weight:400;color:#96a4b5;font-size:12px}.airport-provider__label{display:block;font-size:10px;color:#9ba6b3;font-weight:400;margin-top:4px}
|
||||
.airport-price strong{font-size:22px;font-weight:650;color:#35465d;letter-spacing:-.6px;display:block;line-height:1.15}.airport-price>span{font-size:10px;color:#8b96a6;white-space:nowrap}
|
||||
.airport-features{display:grid;gap:5px;font-size:12px;white-space:nowrap}.airport-features i{font-style:normal;color:#27a781;margin-right:4px}.airport-description{color:#76818e;font-size:12px}
|
||||
.airport-coupon__discount{font-size:10px;color:#248cca;background:#edf7fd;border-radius:4px;padding:2px 6px;display:inline-block;margin-bottom:5px}
|
||||
.airport-coupon__copy{display:flex;align-items:center;gap:4px;background:none;border:0;border-bottom:1px dashed #c9d5e1;padding:0 0 2px;font:inherit;font-size:11px;color:#53667f;text-align:left;cursor:pointer;max-width:100%;white-space:nowrap}.airport-coupon__copy svg{flex:none;color:#9aaabd}.airport-coupon__copy.is-copied{color:#19856a;border-color:#19856a}.airport-coupon__copy:focus-visible,.airport-provider a:focus-visible{outline:2px solid #319bc9;outline-offset:4px}.airport-coupon__none{font-size:12px;color:#a3aab5}
|
||||
.post-content p.airport-recommendations__note{font-size:10px;color:#a0a8b4;margin:10px 0 0;line-height:1.6}.post-content p.airport-recommendation-jump{font-size:14px;color:#6f7d8c;margin:14px 0 20px}.airport-recommendation-jump a{color:#238dce;text-underline-offset:3px}
|
||||
@media(max-width:767.98px){
|
||||
.airport-recommendations{margin:25px 0}.post-content .airport-recommendations__heading h2{font-size:20px}.airport-recommendations__heading>span{font-size:10px}
|
||||
.airport-recommendations__table-wrap{border:0;border-radius:0;overflow:visible;background:transparent}.post-content .airport-recommendations__table,.post-content .airport-recommendations__table tbody{display:block;width:100%}.airport-recommendations__table thead{display:none}
|
||||
.post-content .airport-recommendations__table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:13px 12px;border:1px solid #e8edf2;border-radius:10px;padding:18px;margin-bottom:12px;background:#fff}
|
||||
.post-content .airport-recommendations__table tbody th,.post-content .airport-recommendations__table tbody td{display:block;border:0;padding:0;min-width:0}.post-content .airport-provider a{font-size:16px}.airport-provider__label{font-size:11px}.airport-price{grid-column:2;grid-row:1;text-align:right!important}.airport-price strong{display:inline;font-size:25px}.airport-price>span{display:inline;margin-left:5px;font-size:10px}
|
||||
.post-content .airport-recommendations__table tbody td.airport-description{grid-column:1/-1;grid-row:2;font-size:12px;line-height:1.75}.airport-features{display:flex;gap:12px;font-size:11px;flex-wrap:wrap}
|
||||
.post-content .airport-recommendations__table tbody td.airport-coupon{grid-column:1/-1;border-top:1px solid #edf0f5;padding-top:11px;display:flex;align-items:center;gap:8px}.airport-coupon:before{content:attr(data-label);font-size:11px;color:#9aa4b0;margin-right:auto}.airport-coupon__discount{margin:0}.airport-coupon__copy{font-size:11px}.post-content p.airport-recommendations__note{font-size:10px}
|
||||
}
|
||||
|
||||
.airport-copy-status{display:block;color:#24846f;font-size:11px;margin-top:8px}.airport-copy-status:empty{display:none}
|
||||
@@ -0,0 +1,16 @@
|
||||
.header .navbar-brand.cfn-brand{display:inline-flex;align-items:center;gap:10px;max-width:none;padding:0;line-height:1;text-decoration:none}
|
||||
.header .navbar-brand.cfn-brand .cfn-brand__cat{display:block;width:44px;height:44px;max-height:none;flex:none;border-radius:0}
|
||||
.cfn-brand__copy{display:flex;flex-direction:column;gap:5px;white-space:nowrap}
|
||||
.cfn-brand__name{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:23px;font-weight:700;letter-spacing:-.65px;color:#555555;line-height:1.08}
|
||||
.cfn-brand__accent{color:inherit;font-weight:650}
|
||||
.cfn-brand__tagline{font-size:11px;font-weight:400;letter-spacing:1.25px;color:#938798;line-height:1.25}
|
||||
body.dark .cfn-brand__tagline{color:#b7acbc}body.dark .cfn-brand__name{color:#eeeaf1}
|
||||
.mobile-sidebar-social-links{display:flex;align-items:center;gap:12px;margin:20px 24px 0;padding-top:16px;border-top:1px solid rgba(127,127,127,.16)}
|
||||
@media(max-width:1199.98px){
|
||||
.header #header>.container{position:relative;flex-wrap:nowrap;min-height:44px}
|
||||
.header .navbar-brand.cfn-brand{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);gap:8px;margin:0;flex-shrink:0}
|
||||
.header .navbar-brand.cfn-brand .cfn-brand__cat{width:38px;height:38px}
|
||||
.cfn-brand__name{font-size:21px;letter-spacing:-.5px}
|
||||
.cfn-brand__tagline{font-size:10px;letter-spacing:1px}
|
||||
.header .navbar-toggler{flex-shrink:0}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
.free-node-page{--fn-purple:#86608e;--fn-text:#303641;--fn-muted:#9299a5;--fn-line:#ececf1}.free-node-page .post.card{overflow:hidden}.free-node-page .post>.card-body{padding:28px}.free-node-page .breadcrumbs .current{max-width:540px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
|
||||
.fn-header{display:flex;gap:24px;align-items:flex-start;margin-bottom:20px}.fn-header__main{flex:1;min-width:0}.free-node-page .fn-header h1{font-size:32px;line-height:1.3;letter-spacing:-.45px;color:#30333c;margin:0;font-weight:700}.fn-header__lead{font-size:14px;color:#7c7a87;margin:8px 0 0;line-height:1.6}.fn-header__art{width:112px;height:80px;object-fit:cover;border-radius:10px;flex:none}
|
||||
.fn-overview{border:1px solid var(--fn-line);border-radius:10px;display:flex;padding:14px 18px;gap:20px;background:#fbfafc;margin-bottom:20px}.fn-metric{flex:none;padding-right:22px;border-right:1px solid #e9e5ed}.fn-metric>span,.fn-overview__regions>span{display:block;font-size:14px;color:#756e7c;margin-bottom:7px}.fn-metric>div{display:flex;gap:5px;align-items:baseline}.fn-metric strong{font-size:23px;font-weight:650;color:#6d4e76;letter-spacing:-.5px;line-height:1.25}.fn-metric>div>span{font-size:13px;color:#a19aa6}.fn-overview__regions{min-width:0}.fn-overview__regions>div{display:flex;flex-wrap:wrap;gap:4px 10px;font-size:14px;color:#767181;line-height:1.8}
|
||||
.fn-article-nav{display:flex;gap:8px;padding-bottom:18px;border-bottom:1px solid var(--fn-line);margin-bottom:22px}.fn-article-nav a{font-size:14px;color:#8c8794;background:#f7f6f9;padding:7px 14px;border-radius:6px;line-height:1.5;text-decoration:none}.fn-article-nav a:first-child{background:#ede6f1;color:#785282}.fn-article-nav a span{margin-left:20px}.fn-article-nav a:hover{color:#6e4d78;background:#eee7f2}
|
||||
.free-node-page .post-content{font-size:16px;line-height:1.95}.fn-subscriptions,.fn-usage{scroll-margin-top:92px}.fn-section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin-bottom:14px}.free-node-page .post-content .fn-section-heading h2{font-size:22.72px;line-height:1.55;margin:0;padding:0;border:0;color:#38343e}.fn-subscription-list{display:grid;grid-template-columns:minmax(0,1fr);gap:11px}.fn-subscription{min-width:0;border:1px solid #e8e9ee;border-radius:10px;padding:17px 17px 14px;background:white}.fn-subscription__top{display:flex;gap:11px;align-items:center;margin-bottom:9px}.fn-subscription__name{flex:1;min-width:0}.free-node-page .post-content .fn-subscription__name h3{font-size:18.08px;line-height:1.5;color:#40404a;margin:0;font-weight:600}
|
||||
.fn-subscription__address{display:flex;align-items:center;gap:12px;background:#f7f7fa;border:1px solid #f0eff4;padding:8px 9px 8px 11px;border-radius:6px}.free-node-page .post-content .fn-subscription__address code{color:#777180;background:none;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px;padding:0;display:block;min-width:0;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fn-copy{border:0;border-radius:5px;background:#86618f;color:white;padding:8px 12px;display:inline-flex;align-items:center;justify-content:center;gap:5px;font-size:14px;line-height:1.5;white-space:nowrap;flex:none;cursor:pointer;min-height:40px}.fn-copy:hover{background:#765280}.fn-copy:focus-visible,.fn-article-nav a:focus-visible{outline:2px solid #9572b0;outline-offset:3px}
|
||||
.free-node-page .post-content .fn-subscription-note{font-size:14px;line-height:1.8;color:#7d7686;margin-top:13px}.free-node-page .post-content .fn-subscription-note p{margin:0!important}.fn-subscription-note span{color:inherit!important}.fn-subscription-note br{display:none}/* One quiet panel groups the steps and their tutorial links. */
|
||||
.fn-usage{margin-top:28px;padding-top:24px;border-top:1px solid var(--fn-line)}
|
||||
.fn-usage__body{background:#faf9fc;border:1px solid #ece9f0;border-radius:4px;padding:20px}
|
||||
.fn-steps{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));list-style:none!important;padding:0!important;margin:0!important;gap:20px}
|
||||
.fn-steps>li{display:flex;align-items:flex-start;gap:10px;min-width:0;padding:0!important;margin:0!important}
|
||||
.fn-steps__number{display:flex;align-items:center;justify-content:center;flex:none;width:26px;height:26px;background:#eee7f2;color:#795884;border-radius:50%;font-size:12px;font-weight:600;line-height:1}
|
||||
.fn-steps>li>div{min-width:0;padding-top:1px}
|
||||
.fn-steps strong{display:block;font-size:16px;font-weight:600;line-height:24px;color:#4d4655}
|
||||
.free-node-page .post-content .fn-steps p{font-size:14px;line-height:1.8;color:#82798c;margin:5px 0 0!important}
|
||||
.fn-tutorial-links{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:18px;padding-top:14px;border-top:1px solid #eae6ee;font-size:14px;line-height:1.8}
|
||||
.fn-tutorial-links__label{color:#8b8294}
|
||||
.fn-tutorial-links__items{display:flex;align-items:center;flex-wrap:wrap;gap:8px 20px}
|
||||
.fn-tutorial-links a{color:#795884;text-decoration:none!important;white-space:nowrap}
|
||||
.fn-tutorial-links a:hover{text-decoration:underline!important;text-underline-offset:3px}
|
||||
.fn-tutorial-links a:focus-visible{outline:2px solid #9572b0;outline-offset:4px;border-radius:2px}
|
||||
.fn-community{margin:24px 0 0;border-top:1px solid var(--fn-line);padding-top:18px;font-size:14px;color:#7f7386;display:flex;align-items:center;justify-content:space-between;gap:10px}.fn-community>div{display:flex;gap:14px}.fn-community a{color:#8c7996;text-decoration:none!important}.fn-empty-note{font-size:14px!important;color:#a58a62!important;padding:9px 12px;background:#fdf9f1;border-radius:6px;margin:0 0 13px!important}.fn-empty-note a{color:inherit;text-decoration:underline}.fn-extra-intro{font-size:16px}.free-node-page .post-content>.airport-recommendations{border-top:1px solid var(--fn-line);padding-top:25px;margin-top:28px}.free-node-page .post-tags{border-top:1px solid var(--fn-line);padding-top:18px}.free-node-page .post-actions{margin-bottom:0!important}
|
||||
@media(min-width:992px){.free-node-page .sidebar{top:0}}
|
||||
@media(max-width:767.98px){.free-node-page .post>.card-body{padding:22px}.fn-header{gap:12px;align-items:flex-start;margin-bottom:16px}.fn-header__art{width:68px;height:76px;object-fit:cover;border-radius:8px}.free-node-page .fn-header h1{font-size:26px;line-height:1.35;letter-spacing:-.3px}.fn-header__lead{font-size:14px;line-height:1.7;margin-top:6px}.fn-overview{flex-wrap:wrap;padding:15px;gap:15px}.fn-metric{padding-right:17px}.fn-metric strong{font-size:22px}.fn-overview__regions{flex-basis:100%;border-top:1px solid #ebe6ef;padding-top:10px}.fn-overview__regions>span{margin-bottom:4px}.fn-article-nav{gap:6px;padding-bottom:20px;margin-bottom:23px}.fn-article-nav a{padding:8px 12px;font-size:14px}.fn-article-nav a span{margin-left:7px}.free-node-page .post-content .fn-section-heading h2{font-size:19.5px}.fn-subscription{padding:15px 13px 12px}.fn-subscription__top{gap:9px}.free-node-page .post-content .fn-subscription__name h3{font-size:17px}.fn-subscription__address{gap:8px;padding:7px}.fn-copy{font-size:14px;padding:8px 10px}.fn-copy svg{display:none}.fn-steps{grid-template-columns:1fr;gap:18px}.fn-usage__body{padding:18px}.fn-tutorial-links{align-items:flex-start;flex-direction:column;gap:7px}.fn-tutorial-links__items{display:grid;grid-template-columns:auto auto auto;gap:8px 20px;font-size:13px}.fn-community{align-items:flex-start;flex-direction:column;gap:7px}.fn-usage{margin-top:26px;padding-top:22px}}
|
||||
@media(prefers-reduced-motion:no-preference){html:has(.free-node-page){scroll-behavior:smooth}}
|
||||
|
||||
.free-node-page .post-content .fn-subscription h3::before{display:none}
|
||||
|
||||
/* Match the existing tutorial type scale; shared recommendation overrides stay local to this page. */
|
||||
.free-node-page .post-content .airport-recommendations__heading h2{font-size:22.72px}
|
||||
.free-node-page .post-content .airport-recommendations__table{font-size:14px}
|
||||
.free-node-page .post-content .airport-recommendations__table thead th{font-size:13px}
|
||||
.free-node-page .post-content .airport-provider a{font-size:14px}
|
||||
.free-node-page .airport-provider__label,.free-node-page .airport-coupon__discount{font-size:12px}
|
||||
.free-node-page .airport-features,.free-node-page .airport-description{font-size:14px}
|
||||
.free-node-page .airport-coupon__copy,.free-node-page .airport-price>span{font-size:12px}
|
||||
.free-node-page .post-content p.airport-recommendations__note{font-size:12px}
|
||||
@media(max-width:600px){
|
||||
.free-node-page .post-content{font-size:15px;line-height:1.95}
|
||||
.free-node-page .fn-extra-intro{font-size:15px;line-height:1.95}
|
||||
.free-node-page .post-content .fn-subscription__address code{font-size:11px}
|
||||
.free-node-page .post-content .airport-recommendations__heading h2{font-size:19.5px}
|
||||
.fn-steps{grid-template-columns:1fr}
|
||||
}
|
||||
|
||||
.fn-header h1>span{display:inline-block}
|
||||
.fn-article-nav,.fn-community>div{flex-wrap:wrap}
|
||||
.free-node-page .post-content .airport-recommendations__table tbody td.airport-description{font-size:14px}
|
||||
|
||||
@media(max-width:360px){.fn-article-nav a{padding-left:8px;padding-right:8px}}
|
||||
@@ -0,0 +1,11 @@
|
||||
.random-article-ad { position: relative; min-width: 0; aspect-ratio: 3.675; margin: 20px 0; overflow: hidden; border-radius: 12px; background: #181b1e; }
|
||||
.random-article-ad[hidden] { display: none !important; }
|
||||
.random-article-ad > a { display: block; position: absolute; inset: 0; }
|
||||
.random-article-ad img { display: block; width: 100%; height: 100%; object-fit: cover; }
|
||||
.random-article-ad > a:focus-visible { outline: 3px solid #8ab4ff; outline-offset: -4px; }
|
||||
|
||||
.random-article-ad[data-ad-selected="dpl"] { background: #0a0f1a; }
|
||||
.random-article-ad[data-ad-selected="fuc"] { background: #f8f8fc; }
|
||||
|
||||
.random-article-ad__disclosure { position: absolute; z-index: 1; top: 8px; right: 12px; font-size: 9px; line-height: 1; color: #a9acb8; pointer-events: none; }
|
||||
.random-article-ad[data-ad-selected="fuc"] img { object-position: center 40%; }
|
||||
|
After Width: | Height: | Size: 1.7 MiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 1.4 MiB |
@@ -0,0 +1,34 @@
|
||||
document.addEventListener('click', async (event) => {
|
||||
const button = event.target.closest('[data-airport-coupon]');
|
||||
if (!button) return;
|
||||
const status = button.closest('.airport-recommendations').querySelector('.airport-copy-status');
|
||||
try {
|
||||
let copied = false;
|
||||
if (navigator.clipboard?.writeText) {
|
||||
try { await navigator.clipboard.writeText(button.dataset.airportCoupon); copied = true; } catch { /* Try the user-activated fallback below. */ }
|
||||
}
|
||||
if (!copied) {
|
||||
const field = document.createElement('textarea');
|
||||
field.value = button.dataset.airportCoupon;
|
||||
field.setAttribute('readonly', '');
|
||||
field.style.cssText = 'position:fixed;left:-9999px;top:0';
|
||||
document.body.append(field);
|
||||
try { field.select(); copied = document.execCommand('copy'); }
|
||||
finally { field.remove(); button.focus({preventScroll:true}); }
|
||||
}
|
||||
if (!copied) throw new Error('Copy unavailable');
|
||||
status.textContent = '优惠码已复制';
|
||||
button.classList.add('is-copied');
|
||||
button.setAttribute('aria-label', '优惠码已复制');
|
||||
window.setTimeout(() => {
|
||||
button.classList.remove('is-copied');
|
||||
button.setAttribute('aria-label', `复制优惠码 ${button.dataset.airportCoupon}`);
|
||||
}, 2000);
|
||||
} catch {
|
||||
const selection = window.getSelection();
|
||||
const range = document.createRange();
|
||||
range.selectNodeContents(button.querySelector('span'));
|
||||
selection.removeAllRanges(); selection.addRange(range);
|
||||
status.textContent = '已选中优惠码,请长按或使用复制快捷键';
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,18 @@
|
||||
(() => {
|
||||
const slots = [];
|
||||
function choose(slot, choices) {
|
||||
const selected = choices[Math.floor(Math.random() * choices.length)];
|
||||
slot.replaceChildren(selected.content.cloneNode(true));
|
||||
slot.dataset.adSelected = selected.dataset.adChoice;
|
||||
slot.hidden = false;
|
||||
}
|
||||
document.querySelectorAll('[data-random-article-ad]').forEach(slot => {
|
||||
const choices = Array.from(slot.querySelectorAll('template[data-ad-choice]'));
|
||||
if (!choices.length) return;
|
||||
slots.push({ slot, choices });
|
||||
choose(slot, choices);
|
||||
});
|
||||
window.addEventListener('pageshow', event => {
|
||||
if (event.persisted) slots.forEach(({ slot, choices }) => choose(slot, choices));
|
||||
});
|
||||
})();
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 220 220" fill="#764679"><path fill-rule="evenodd" d="M46 3.5 Q46 3 51.5 3 Q57 3 57 3.5 Q57 4 60 4 Q63 4 63 4.5 Q63 5 65 5 Q67 5 67 5.5 Q67 6 68 6 Q69 6 69 6.5 Q69 7 70.5 7 Q72 7 72 7.5 Q72 8 74 8.5 Q76 9 76.5 10 Q77 11 78 11 Q79 11 80.5 13 Q82 15 83 15 Q84 15 84.5 16.5 Q85 18 85.5 18 Q86 18 86 18.5 Q86 19 87.5 20 Q89 21 89 22 Q89 23 89.5 23 Q90 23 90 26 Q90 29 89.5 29 Q89 29 89 30 Q89 31 88.5 31 Q88 31 87.5 32 Q87 33 85.5 33 Q84 33 84 33.5 Q84 34 82.5 34 Q81 34 81 33.5 Q81 33 78.5 32.5 Q76 32 74 29.5 Q72 27 71 27 Q70 27 69.5 26 Q69 25 68 25 Q67 25 67 24.5 Q67 24 66 24 Q65 24 65 23.5 Q65 23 64 23 Q63 23 63 22.5 Q63 22 62 22 Q61 22 61 21.5 Q61 21 57.5 21 Q54 21 54 20.5 Q54 20 47 21 Q40 22 40 22.5 Q40 23 37 24 Q34 25 34 25.5 Q34 26 33.5 26 Q33 26 33 26.5 Q33 27 30 29.5 Q27 32 27 33 Q27 34 26.5 34 Q26 34 26 35 Q26 36 25.5 36 Q25 36 25 37 Q25 38 24.5 38 Q24 38 24 40 Q24 42 23.5 42 Q23 42 23 49 Q23 56 23.5 56 Q24 56 24.5 59 Q25 62 26 62.5 Q27 63 27.5 65 Q28 67 28.5 67 Q29 67 31.5 70 Q34 73 35 73 Q36 73 36.5 74 Q37 75 38 75 Q39 75 39 75.5 Q39 76 40 76 Q41 76 41 76.5 Q41 77 42.5 77 Q44 77 44 77.5 Q44 78 45.5 78 Q47 78 47 78.5 Q47 79 50.5 79 Q54 79 54 79.5 Q54 80 97 80 Q140 80 140 79.5 Q140 79 140.5 79 Q141 79 141 51.5 Q141 24 142.5 24 Q144 24 144 24.5 Q144 25 147 27.5 Q150 30 150 31 Q150 32 150.5 32 Q151 32 151 32.5 Q151 33 151.5 33 Q152 33 152 33.5 Q152 34 152.5 34 Q153 34 153 34.5 Q153 35 156 37.5 Q159 40 159 41 Q159 42 159.5 42 Q160 42 161 43.5 Q162 45 162.5 45 Q163 45 163 44.5 Q163 44 165 44 Q167 44 167 43.5 Q167 43 172 43 Q177 43 177 42.5 Q177 42 178 42 Q179 42 179 42.5 Q179 43 184 43 Q189 43 189 43.5 Q189 44 191.5 44 Q194 44 194 44.5 Q194 45 195 45 Q196 45 196.5 43.5 Q197 42 197.5 42 Q198 42 198 41.5 Q198 41 201 38.5 Q204 36 204 35 Q204 34 207 31.5 Q210 29 210 28 Q210 27 210.5 27 Q211 27 212 25.5 Q213 24 214.5 24 Q216 24 216 24.5 Q216 25 216.5 25 Q217 25 217 43 Q217 61 216.5 61 Q216 61 216 65.5 Q216 70 215.5 70 Q215 70 215 72.5 Q215 75 214.5 75 Q214 75 213.5 79 Q213 83 212.5 83 Q212 83 212 84 Q212 85 211.5 85 Q211 85 211 86.5 Q211 88 210.5 88 Q210 88 209.5 90.5 Q209 93 208.5 93 Q208 93 208 94 Q208 95 207 95.5 Q206 96 205.5 98 Q205 100 204 100.5 Q203 101 203 102 Q203 103 202 103.5 Q201 104 201 105 Q201 106 199.5 107 Q198 108 198 109 Q198 110 196 111.5 Q194 113 194 114 Q194 115 192.5 116 Q191 117 191 118 Q191 119 190.5 119 Q190 119 190 120 Q190 121 189.5 121 Q189 121 189 122 Q189 123 188.5 123 Q188 123 188 169.5 Q188 216 187.5 216 Q187 216 187 216.5 Q187 217 181 217 Q175 217 175 216.5 Q175 216 174 215.5 Q173 215 173 214 Q173 213 172.5 213 Q172 213 171.5 208 Q171 203 170.5 203 Q170 203 170 200 Q170 197 169.5 197 Q169 197 169 194 Q169 191 168.5 191 Q168 191 168 188 Q168 185 167.5 185 Q167 185 166.5 178.5 Q166 172 165.5 172 Q165 172 165 169 Q165 166 164.5 166 Q164 166 164 163 Q164 160 163.5 160 Q163 160 163 157 Q163 154 162.5 154 Q162 154 162 150.5 Q162 147 161.5 147 Q161 147 161 146 Q161 145 160.5 145 Q160 145 160 145.5 Q160 146 154.5 146 Q149 146 149 146.5 Q149 147 131 147 Q113 147 113 146.5 Q113 146 105.5 146 Q98 146 98 145.5 Q98 145 97 145 Q96 145 96 145.5 Q96 146 94.5 146.5 Q93 147 91.5 149 Q90 151 89 151 Q88 151 87 152.5 Q86 154 84 154.5 Q82 155 82 155.5 Q82 156 80.5 156.5 Q79 157 78.5 158 Q78 159 77 159 Q76 159 76 159.5 Q76 160 75 160 Q74 160 74 160.5 Q74 161 73 161 Q72 161 72 161.5 Q72 162 71 162 Q70 162 70 162.5 Q70 163 69 163 Q68 163 68 163.5 Q68 164 67 164 Q66 164 66 164.5 Q66 165 65 165 Q64 165 64 165.5 Q64 166 63 166 Q62 166 62 166.5 Q62 167 60.5 167 Q59 167 59 167.5 Q59 168 58 168 Q57 168 57 168.5 Q57 169 55.5 169 Q54 169 54 169.5 Q54 170 53 170 Q52 170 52 170.5 Q52 171 49.5 171.5 Q47 172 47 172.5 Q47 173 46 173.5 Q45 174 45 176 Q45 178 44.5 178 Q44 178 44 180 Q44 182 43.5 182 Q43 182 43 183.5 Q43 185 42.5 185 Q42 185 42 187 Q42 189 41.5 189 Q41 189 41 191 Q41 193 40.5 193 Q40 193 40 194.5 Q40 196 39.5 196 Q39 196 39 198 Q39 200 38.5 200 Q38 200 38 201.5 Q38 203 37.5 203 Q37 203 37 205 Q37 207 36.5 207 Q36 207 35.5 211 Q35 215 34.5 215 Q34 215 33.5 216 Q33 217 27 217 Q21 217 21 216.5 Q21 216 20.5 216 Q20 216 20 205.5 Q20 195 20.5 195 Q21 195 21 187 Q21 179 21.5 179 Q22 179 22 171 Q22 163 22.5 163 Q23 163 23 160.5 Q23 158 23.5 158 Q24 158 24 156.5 Q24 155 25 154.5 Q26 154 26.5 152 Q27 150 28 149.5 Q29 149 29 148 Q29 147 29.5 147 Q30 147 30 146.5 Q30 146 31 145.5 Q32 145 32 144 Q32 143 33 142.5 Q34 142 34 141 Q34 140 34.5 140 Q35 140 35 139 Q35 138 36 137.5 Q37 137 37.5 134.5 Q38 132 38.5 132 Q39 132 39 131 Q39 130 39.5 130 Q40 130 40 128.5 Q40 127 40.5 127 Q41 127 41 125.5 Q41 124 41.5 124 Q42 124 42 121.5 Q42 119 42.5 119 Q43 119 43.5 111 Q44 103 43.5 103 Q43 103 43 102.5 Q43 102 41.5 102 Q40 102 40 101.5 Q40 101 38.5 101 Q37 101 37 100.5 Q37 100 36 100 Q35 100 35 99.5 Q35 99 32 98 Q29 97 28.5 96 Q28 95 27 95 Q26 95 25.5 94 Q25 93 24 93 Q23 93 23 92.5 Q23 92 22.5 92 Q22 92 22 91.5 Q22 91 21.5 91 Q21 91 21 90.5 Q21 90 20.5 90 Q20 90 20 89.5 Q20 89 Line truncated
|
||||
|
After Width: | Height: | Size: 7.5 KiB |
@@ -7,7 +7,6 @@ import ClipboardJS from 'clipboard';
|
||||
|
||||
|
||||
const initHeaderScroll = (sHeaderSelector) => {
|
||||
console.log('检查点1:函数跑起来了,选择器是:');
|
||||
const $oHeader = $(sHeaderSelector);
|
||||
const iHeaderHeight = $oHeader.outerHeight();
|
||||
const oRoot = document.documentElement;
|
||||
@@ -17,7 +16,6 @@ const initHeaderScroll = (sHeaderSelector) => {
|
||||
const iThreshold = 5; // 加上一个细微的阈值,防止手抖产生的位移
|
||||
|
||||
$(window).on('scroll', () => {
|
||||
console.log('检查点3:你在滚,我也在动'); // 看看控制台刷不刷屏
|
||||
let iCurrentScroll = $(window).scrollTop();
|
||||
|
||||
// 1. 忽略极小的滚动(防止灵敏度过高)
|
||||
@@ -47,26 +45,11 @@ const initHeaderScroll = (sHeaderSelector) => {
|
||||
const initArticleLoader = (sContainerSelector) => {
|
||||
const $oContainer = $(sContainerSelector);
|
||||
|
||||
if ($oContainer.length === 0) return;
|
||||
if ($oContainer.length === 0 || !document.querySelector('.pagination-next')) return;
|
||||
|
||||
const oInfScroll = new InfiniteScroll($oContainer[0], {
|
||||
// 使用函数式 path,灵活得飞起
|
||||
path: function() {
|
||||
let sUrl = window.location.origin + window.location.pathname; // 当前基础路径
|
||||
let sSearch = window.location.search; // 当前已有的参数(比如 ?s=关键字)
|
||||
let iNextPage = this.loadCount + 2; // InfiniteScroll 内部计数从0开始,第二页就是2
|
||||
|
||||
// 原则:判断当前 URL 是否已经有了其他参数
|
||||
if (sSearch) {
|
||||
// 如果已有参数,判断是否带 page,没有就拼 &page=,有就替换(正则处理最稳)
|
||||
if (sSearch.indexOf('page=') > -1) {
|
||||
return sSearch.replace(/page=\d+/, 'page=' + iNextPage);
|
||||
}
|
||||
return sSearch + '&page=' + iNextPage;
|
||||
} else {
|
||||
return '?page=' + iNextPage;
|
||||
}
|
||||
},
|
||||
path: '.pagination-next',
|
||||
checkLastPage: true,
|
||||
append: '.ajax-item',
|
||||
history: false,
|
||||
// prefill: true,
|
||||
@@ -75,7 +58,18 @@ const initArticleLoader = (sContainerSelector) => {
|
||||
responseBody: 'text',
|
||||
});
|
||||
|
||||
$oContainer.on('append.infiniteScroll', (oEvent, xResponse, sPath, aItems) => {
|
||||
oInfScroll.on('append', (xResponse, sPath, aItems) => {
|
||||
const seen = new Set();
|
||||
document.querySelectorAll('.ajax-item[data-article-id]').forEach(item => {
|
||||
if (seen.has(item.dataset.articleId)) item.remove(); else seen.add(item.dataset.articleId);
|
||||
});
|
||||
const nextDoc = typeof xResponse === 'string' ? new DOMParser().parseFromString(xResponse, 'text/html') : xResponse;
|
||||
// Pagination remains metadata; the existing infinite-scroll interface stays unchanged.
|
||||
for (const rel of ['next', 'prev']) {
|
||||
document.querySelector(`link.pagination-${rel}`)?.remove();
|
||||
const link = nextDoc?.querySelector(`link.pagination-${rel}`);
|
||||
if (link) document.head.appendChild(link.cloneNode(true));
|
||||
}
|
||||
const $aNewItems = $(aItems);
|
||||
|
||||
$aNewItems.addClass('ajax-item-fade-in');
|
||||
@@ -84,7 +78,6 @@ const initArticleLoader = (sContainerSelector) => {
|
||||
$aNewItems.addClass('is-visible');
|
||||
}, 50);
|
||||
|
||||
console.log(`[ArticleLoader] s-Hungarian 风格追加成功: ${sPath}`);
|
||||
});
|
||||
|
||||
window.oMainInfScroll = oInfScroll;
|
||||
@@ -117,7 +110,8 @@ $(() => {
|
||||
$this.addClass("requesting");
|
||||
$.ajax({
|
||||
url: "/like/"+id,
|
||||
type: "GET",
|
||||
type: "POST",
|
||||
headers: {"X-CSRF-TOKEN": document.querySelector('meta[name="csrf-token"]').content},
|
||||
dataType: "json",
|
||||
}).done(function(data) {
|
||||
ncPopupTips(1, data.msg);
|
||||
@@ -135,9 +129,12 @@ $(() => {
|
||||
return false;
|
||||
});
|
||||
|
||||
$(document).on('keydown', function(event) {
|
||||
if (event.key === 'Escape' && $('.mobile-sidebar').hasClass('active')) $('.sidebar-close').trigger('click');
|
||||
});
|
||||
initHeaderScroll('#header');
|
||||
|
||||
document.getElementById('searchform').addEventListener('submit', function(e) {
|
||||
document.getElementById('searchform')?.addEventListener('submit', function(e) {
|
||||
e.preventDefault(); // 拦截默认提交
|
||||
let sKeywords = document.getElementById('s').value;
|
||||
if (sKeywords.trim() !== '') {
|
||||
@@ -285,7 +282,6 @@ $(() => {
|
||||
const bIsInitialized = fnTryInit(oSettings, oObjects);
|
||||
|
||||
if (!bIsInitialized) {
|
||||
console.log("TSS: Body width smaller than options.minWidth. Init delayed.");
|
||||
|
||||
$(document).on("scroll." + oSettings.sNamespace, function (e) {
|
||||
if (fnTryInit(oSettings, oObjects)) {
|
||||
@@ -484,12 +480,15 @@ $(() => {
|
||||
function toggleSidebar() {
|
||||
$(".sidebar-close, .mobile-overlay").on("click", function() {
|
||||
$("body").removeClass("modal-open");
|
||||
$(".mobile-sidebar").removeClass("active");
|
||||
$(".mobile-sidebar").removeClass("active").attr("aria-hidden", "true");
|
||||
$("#sidebarCollapse").attr("aria-expanded", "false").trigger("focus");
|
||||
$(".mobile-overlay").removeClass("active")
|
||||
});
|
||||
$("#sidebarCollapse").on("click", function() {
|
||||
$("body").addClass("modal-open");
|
||||
$(".mobile-sidebar").addClass("active");
|
||||
$(".mobile-sidebar").addClass("active").attr("aria-hidden", "false");
|
||||
$("#sidebarCollapse").attr("aria-expanded", "true");
|
||||
$(".sidebar-close").trigger("focus");
|
||||
$(".mobile-overlay").addClass("active");
|
||||
$(".collapse.in").toggleClass("in");
|
||||
$("a[aria-expanded=true]").attr("aria-expanded", "false")
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
@php($providers = \App\Services\ArticleRecommendations::providers())
|
||||
@if($providers)
|
||||
@once
|
||||
@push('styles')
|
||||
<link rel="stylesheet" href="/css/airport-recommendations.css?v={{ filemtime(public_path('css/airport-recommendations.css')) }}">
|
||||
@endpush
|
||||
@push('scripts')
|
||||
<script defer src="/js/airport-recommendations.js?v={{ filemtime(public_path('js/airport-recommendations.js')) }}"></script>
|
||||
@endpush
|
||||
@endonce
|
||||
<section id="{{ config('airport_recommendations.anchor') }}" class="airport-recommendations" aria-labelledby="airport-recommendations-title">
|
||||
<div class="airport-recommendations__heading">
|
||||
<h2 id="airport-recommendations-title">机场推荐</h2>
|
||||
</div>
|
||||
<div class="airport-recommendations__table-wrap">
|
||||
<table class="airport-recommendations__table">
|
||||
<caption class="visually-hidden">机场套餐、解锁情况与优惠码对比</caption>
|
||||
<thead><tr><th scope="col">机场名</th><th scope="col">套餐起售价</th><th scope="col">解锁情况</th><th scope="col">适合使用场景</th><th scope="col">优惠码</th></tr></thead>
|
||||
<tbody>
|
||||
@foreach($providers as $key => $provider)
|
||||
<tr>
|
||||
<th scope="row" class="airport-provider"><a href="{{ $provider['url'] }}" target="_blank" rel="sponsored nofollow noopener noreferrer">{{ $provider['name'] }}<span aria-hidden="true">↗</span></a><span class="airport-provider__label">{{ $provider['tagline'] ?? '' }}</span></th>
|
||||
<td data-label="套餐起售价" class="airport-price"><strong>{{ $provider['price'] }}</strong><span>{{ $provider['period'] }}起</span></td>
|
||||
<td data-label="解锁情况"><div class="airport-features">@foreach($provider['features'] as $feature)<span><i aria-hidden="true">✓</i>{{ $feature }}</span>@endforeach</div></td>
|
||||
<td data-label="适合使用场景" class="airport-description">{{ $provider['description'] }}</td>
|
||||
<td data-label="优惠码" class="airport-coupon">
|
||||
@if($provider['coupon'])
|
||||
<span class="airport-coupon__discount">{{ $provider['discount'] }}</span>
|
||||
<button type="button" class="airport-coupon__copy" data-airport-coupon="{{ $provider['coupon'] }}" aria-label="复制{{ $provider['name'] }}优惠码 {{ $provider['coupon'] }}"><span>{{ $provider['coupon'] }}</span><svg width="13" height="13" viewBox="0 0 16 16" fill="none" aria-hidden="true"><rect x="5" y="5" width="8" height="9" rx="1" stroke="currentColor"/><path d="M3 11H2V2h8v1" stroke="currentColor"/></svg></button>
|
||||
@else
|
||||
<span class="airport-coupon__none">无</span>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p class="airport-recommendations__note">价格、套餐及优惠以服务商官网为准。</p>
|
||||
<span class="airport-copy-status" role="status" aria-live="polite"></span>
|
||||
</section>
|
||||
@endif
|
||||
@@ -7,8 +7,18 @@
|
||||
'sOgImg' => '/sites/'.config("app.site_code_short").'/siteimg.jpg',
|
||||
'sRobots' => 'index, follow',
|
||||
'bEditorialPreview' => false,
|
||||
'seo' => [],
|
||||
'pagination' => null,
|
||||
])
|
||||
|
||||
@php
|
||||
$sTitle = $seo['title'] ?? $sTitle;
|
||||
$sDesc = \App\Services\Seo::text($seo['description'] ?? $sDesc);
|
||||
$sCanonical = $seo['canonical'] ?? \App\Services\Seo::url(request()->path());
|
||||
$sRobots = $bEditorialPreview ? 'noindex, nofollow' : ($seo['robots'] ?? $sRobots);
|
||||
$sOgType = $seo['type'] ?? $sOgType;
|
||||
$sOgImg = str_starts_with($sOgImg ?? '', '/') ? \App\Services\Seo::url($sOgImg) : $sOgImg;
|
||||
@endphp
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
@@ -17,25 +27,37 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<meta name="slug" content="{{ $sSlug }}">
|
||||
<meta name="robots" content="{{ app()->environment('staging') ? 'noindex, nofollow' : $sRobots }}">
|
||||
<meta name="robots" content="{{ !app()->environment(['production','testing']) ? 'noindex, nofollow' : $sRobots }}">
|
||||
|
||||
|
||||
@php
|
||||
$sTodayDate = now()->format('Y年m月d日'); //有问题?
|
||||
@endphp
|
||||
|
||||
{{-- SEO 三杰 --}}
|
||||
<title>{{ $sTitle }}</title>
|
||||
<meta name="description" content="{{ $sTodayDate.$sDesc }}">
|
||||
<meta name="description" content="{{ $sDesc }}">
|
||||
<meta name="keywords" content="{{ $sKeywords }}">
|
||||
<link rel="canonical" href="{{ url()->current() }}">
|
||||
<link rel="canonical" href="{{ $sCanonical }}">
|
||||
|
||||
{{-- 社交媒体 Meta (Open Graph) - 现在的标准配置 --}}
|
||||
<meta property="og:title" content="{{ $sTitle }}">
|
||||
<meta property="og:description" content="{{ $sDesc }}">
|
||||
<meta property="og:type" content="{{ $sOgType }}">
|
||||
<meta property="og:url" content="{{ url()->current() }}">
|
||||
<meta property="og:url" content="{{ $sCanonical }}">
|
||||
<meta property="og:image" content="{{ str_starts_with($sOgImg ?? '', '/') ? url($sOgImg) : $sOgImg }}">
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="{{ $sTitle }}">
|
||||
<meta name="twitter:description" content="{{ $sDesc }}">
|
||||
<meta name="twitter:image" content="{{ $sOgImg }}">
|
||||
@unless($bEditorialPreview)
|
||||
@foreach($seo['schema'] ?? [] as $schema)
|
||||
<script type="application/ld+json">{!! json_encode($schema, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT) !!}</script>
|
||||
@endforeach
|
||||
@endunless
|
||||
@if($pagination)
|
||||
@if($pagination->previousPageUrl())<link class="pagination-prev" rel="prev" href="{{ $pagination->currentPage() === 2 ? $pagination->path() : $pagination->previousPageUrl() }}">@endif
|
||||
@if($pagination->nextPageUrl())<link class="pagination-next" rel="next" href="{{ $pagination->nextPageUrl() }}">@endif
|
||||
@endif
|
||||
|
||||
{{-- 声明它是 PNG,并告诉浏览器它的实际尺寸 --}}
|
||||
<link rel="icon" type="image/png" href="/sites/{{ config('app.site_code_short') }}/icon.png" sizes="166x166">
|
||||
|
||||
@@ -47,9 +69,13 @@
|
||||
|
||||
@vite(['resources/css/app.css', "resources/sites/".config("app.site_code_short")."/css/app.css",'resources/js/app.js'])
|
||||
|
||||
@if(config('app.site_code_short') === 'cfn')
|
||||
<link rel="stylesheet" href="/css/cfn-brand.css?v={{ filemtime(public_path('css/cfn-brand.css')) }}">
|
||||
@endif
|
||||
|
||||
@stack('styles')
|
||||
|
||||
@if(! app()->environment('staging') && ! $bEditorialPreview && config('app.site_code_short') == 'cfn')
|
||||
@if(app()->environment('production') && ! $bEditorialPreview && config('app.site_code_short') == 'cfn')
|
||||
<script defer src="https://umami.gemcook.net/script.js" data-website-id="c553e118-942e-4d6b-9e6d-9d7e696ab5fd"></script>
|
||||
@endif
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
@php
|
||||
$adChoices = collect([
|
||||
['key' => 'dpl', 'file' => 'dpl-ad-compact-wordmark-20261031.png', 'width' => 2169, 'height' => 725, 'alt' => 'DP-LINK.NET:畅连全球网络。日常访问、远程办公、在线娱乐,查看套餐。'],
|
||||
['key' => 'hn', 'file' => 'hn-ad-compact-lowercase-20261031.png', 'width' => 2021, 'height' => 778, 'alt' => 'hardnerd:硬核架构,品质专线,全球网络畅通无阻。'],
|
||||
['key' => 'fuc', 'file' => 'fuc-ad-compact-five-years-20261031.png', 'width' => 2141, 'height' => 734, 'alt' => '福云:全球网络加速。五年稳定运营。开始使用。'],
|
||||
])->filter(fn ($ad) => config('advertising.'.$ad['key'].'.enabled')
|
||||
&& config('advertising.'.$ad['key'].'.url')
|
||||
&& is_file(public_path('images/ads/'.$ad['file'])))->values();
|
||||
@endphp
|
||||
@if ($adChoices->isNotEmpty())
|
||||
@once
|
||||
@push('styles')
|
||||
<link rel="stylesheet" href="/css/random-article-ad.css?v={{ filemtime(public_path('css/random-article-ad.css')) }}">
|
||||
@endpush
|
||||
@endonce
|
||||
<aside class="random-article-ad" data-random-article-ad aria-label="网络服务广告" hidden>
|
||||
@foreach ($adChoices as $ad)
|
||||
<template data-ad-choice="{{ $ad['key'] }}">
|
||||
<a href="{{ config('advertising.'.$ad['key'].'.url') }}" target="_blank" rel="sponsored noopener noreferrer" aria-label="广告:{{ $ad['alt'] }}(新窗口打开)">
|
||||
<span class="random-article-ad__disclosure" aria-hidden="true">广告</span>
|
||||
<img src="/images/ads/{{ $ad['file'] }}?v={{ filemtime(public_path('images/ads/'.$ad['file'])) }}" alt="{{ $ad['alt'] }}" width="{{ $ad['width'] }}" height="{{ $ad['height'] }}" decoding="async">
|
||||
</a>
|
||||
</template>
|
||||
@endforeach
|
||||
</aside>
|
||||
<noscript>
|
||||
@php($ad = $adChoices->first())
|
||||
<aside class="random-article-ad" aria-label="网络服务广告">
|
||||
<a href="{{ config('advertising.'.$ad['key'].'.url') }}" target="_blank" rel="sponsored noopener noreferrer">
|
||||
<span class="random-article-ad__disclosure" aria-hidden="true">广告</span>
|
||||
<img src="/images/ads/{{ $ad['file'] }}?v={{ filemtime(public_path('images/ads/'.$ad['file'])) }}" alt="{{ $ad['alt'] }}" width="{{ $ad['width'] }}" height="{{ $ad['height'] }}">
|
||||
</a>
|
||||
</aside>
|
||||
</noscript>
|
||||
@once
|
||||
<script>{!! file_get_contents(public_path('js/random-article-ad.js')) !!}</script>
|
||||
@endonce
|
||||
@endif
|
||||
@@ -1,12 +1,12 @@
|
||||
@props(['oArticle'])
|
||||
<div class="list-item default block ajax-item">
|
||||
<div class="list-item default block ajax-item" data-article-id="{{ $oArticle->id }}">
|
||||
<div class="media media-3x2 col-4 col-md-3 col-xl-4">
|
||||
<a class="media-content" href="{{ url('/a/'.$oArticle->sSlug).'.html' }}" title="{{ $oArticle->sTitle }}" style="background-image:url('{{ $oArticle->sThumb }}')"></a>
|
||||
</div>
|
||||
<div class="list-content">
|
||||
<div class="list-body">
|
||||
<a href=" {{ url('/a/'.$oArticle->sSlug.'.html') }} " title="{{$oArticle->sTitle}}" class="list-title h5 h-2x">
|
||||
{!! $oArticle->sTitle !!}
|
||||
{{ $oArticle->sTitle }}
|
||||
</a>
|
||||
<div class="list-desc d-none d-xl-block text-secondary text-sm mt-2">
|
||||
<div class="h-2x">
|
||||
@@ -16,13 +16,13 @@
|
||||
</div>
|
||||
<div class="list-footer">
|
||||
<div class="d-flex flex-fill align-items-center text-xs text-muted">
|
||||
<a href="{{ url($oArticle->oCategory->sSlug) }}" class="me-2 me-md-3"><i class="text-sm iconfont icon-dots-circle me-1"></i>{!! $oArticle->oCategory->sName !!}</a>
|
||||
<a href="{{ \App\Services\Seo::url(\App\Services\Seo::categoryPath($oArticle->oCategory)) }}" class="me-2 me-md-3"><i class="text-sm iconfont icon-dots-circle me-1"></i>{!! $oArticle->oCategory->sName !!}</a>
|
||||
<div class="flex-fill"></div>
|
||||
@if ($oArticle->iIsTop)
|
||||
<span class="d-none d-md-inline-block ms-2 ms-md-3" style="color: var(--color-primary);">置顶</span>
|
||||
<!-- <i class="text-sm iconfont icon-pushpin me-1" style="color: var(--color-primary);"></i> -->
|
||||
@endif
|
||||
<time class="d-none d-md-inline-block ms-2 ms-md-3">{{ $oArticle->sCreatedAtDiff }}</time>
|
||||
<time datetime="{{ $oArticle->created_at?->toAtomString() }}" class="d-none d-md-inline-block ms-2 ms-md-3">{{ $oArticle->sCreatedAtDiff }}</time>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,13 +1 @@
|
||||
<div class="widget card widget_nice_tag_cloud">
|
||||
<div class="widget-header h6">
|
||||
广告
|
||||
<div class="widget-border"></div>
|
||||
</div>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="https://{{ env('url_ad_fu') }}">
|
||||
<img src="/upload/images/ad_fu.png" style="border-radius: 10px;">
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{{-- Legacy sidebar advertisement removed at user request, 2026-10-31. --}}
|
||||
@@ -0,0 +1,2 @@
|
||||
<img class="cfn-brand__cat" src="/sites/cfn/images/logo/cat.svg" width="44" height="44" alt="" aria-hidden="true">
|
||||
<span class="cfn-brand__copy"><span class="cfn-brand__name"><span>Clash</span><span class="cfn-brand__accent">FreeNode</span></span><span class="cfn-brand__tagline">每天分享免费节点</span></span>
|
||||