Compare commits

...
Author SHA1 Message Date
Codex 456ed195bb Record editorial source archive commit 2026-11-03 15:58:19 +08:00
Codex 840bace83a Publish node performance tutorial sources and verified editorial receipt 2026-11-03 15:54:06 +08:00
Codex aa772e3766 Document six-item FNA release and enabled quiet mode 2026-11-03 14:08:46 +08:00
Codex d6a7d073ed Publish FNA resource entrances, tutorials and quiet mode 2026-11-03 13:58:11 +08:00
Codex c2539f380d Align free Shadowrocket ID category and article names 2026-11-02 15:28:45 +08:00
Codex ad849f54ad Align free Shadowrocket ID category and article names 2026-11-02 15:23:43 +08:00
Codex 6909e32740 Align free Shadowrocket ID category and article names 2026-11-02 15:09:14 +08:00
Codex a35789ec4c Align free Shadowrocket ID category and article names 2026-11-02 15:05:01 +08:00
Codex 345f5fcd9d Include final read-only SEO audit maintenance note 2026-11-02 13:26:37 +08:00
Codex ae556208be Document complete FNA pending release and content receipts 2026-11-02 13:23:22 +08:00
Codex e6256f68fd Publish pending FNA themes, article layouts, tutorials and branding 2026-11-02 12:32:40 +08:00
Codex ec5b5f2ae5 Document stacked sidebar community link release 2026-10-31 19:50:26 +08:00
Codex 67340f09ed Label mobile sidebar community links in two stacked rows 2026-10-31 19:49:30 +08:00
Codex 3efc135f00 Document subscription usage panel release and recovery 2026-10-31 18:57:52 +08:00
Codex 888358a6b6 Group subscription usage steps and tutorial navigation in one responsive panel 2026-10-31 18:57:04 +08:00
Codex 08ee2275fb Document completed related source and compact advertisement release 2026-10-31 18:44:31 +08:00
Codex add9ed489e Publish approved compact advertisements and synchronize related project sources 2026-10-31 18:41:40 +08:00
Codex bd8b58a6cf Add Hardnerd nine-percent-discount coupon to recommendations 2026-10-31 18:35:33 +08:00
Codex 121acb0344 Record CFN UI release, acceptance and recovery boundaries 2026-10-31 18:31:29 +08:00
Codex 7d564df7e9 Redesign free-node articles and recommendations; refine CFN navigation and lists 2026-10-31 18:28:14 +08:00
Codex a7adfac041 Document cache-safe random single-image advertisements 2026-10-31 16:44:27 +08:00
Codex cb8cd8467a Show one randomly selected article advertisement per page visit 2026-10-31 16:42:29 +08:00
Codex 8afe09fc04 Document resource prompt cleanup and Telegram header entry 2026-10-31 16:31:40 +08:00
Codex de6b931823 Move resource follow prompts to header Telegram icon 2026-10-31 16:30:06 +08:00
Codex 2480865532 Record verified restoration of original FNA interface 2026-10-31 16:21:40 +08:00
Codex bc48be39e6 Restore original FNA interface while retaining internal SEO 2026-10-31 16:19:55 +08:00
Codex fa2bc2dafe Record verified FNA SEO release and repair health smoke test 2026-10-31 15:59:07 +08:00
Codex 7c11ca77bc Unify FNA homepage, archives, canonical URLs and durable SEO publishing 2026-10-31 15:41:14 +08:00
Codex a820755e7e Record Hardnerd advertisement copy update 2026-10-31 15:34:24 +08:00
Codex 6c94ecbd0b Refine Hardnerd banner and remove legacy sidebar advertisement 2026-10-31 15:31:58 +08:00
Codex 77f9b09c58 Record tutorial sitemap deployment and server verification 2026-10-31 14:30:41 +08:00
Codex b0d61806dc Record tutorial sitemap deployment and server verification 2026-10-31 14:29:50 +08:00
Codex 252e0c38cb Include tutorial landing pages in sitemap and verify notification receipts 2026-10-31 14:27:59 +08:00
Codex ace6d74a18 Record successful production IndexNow submission 2026-10-31 14:22:14 +08:00
Codex 5748124383 Notify IndexNow after editorial publication with durable retry 2026-10-31 14:18:14 +08:00
291 changed files with 6495 additions and 535 deletions

No files matched your search

+3
View File
@@ -66,3 +66,6 @@ VITE_APP_NAME="${APP_NAME}"
# Approved illustration delivery (independent per environment)
ILLUSTRATION_DELIVERY_ENABLED=false
# Runtime override: php artisan site:quiet on|off|status
SITE_QUIET_MODE=false
+65 -3
View File
@@ -1,13 +1,75 @@
# 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 本地副本维护
本地开发服务与Vite掉线自动恢复见[本地开发维护](docs/maintenance/LOCAL_DEV.md)。仅本用户127.0.0.1:5187,避免重复启动同端口进程。
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)。
2026-11-01本地新增八篇新手教程、置顶指引并将原七篇平台文章移入综合教程;免费节点页已接入指引。每篇新文独立设计主题封面并加网址水印。范围、回执与未上线边界见[新手教程调整](docs/maintenance/NEWCOMER_TUTORIALS_2026-11-01.md)。当前分类、文章与关系以写作索引为准,上述旧批次描述保留为历史。
## AI 文章写作(必读)
文章写作和发布先读docs/content/WRITING.md及docs/maintenance/EDITORIAL_API.md。项目身份和访问边界先读GemDocs AI版项目总览、维护协议及10-项目/fna_v3.md。
后续为 FNA_V3 选题、写作、重写、调整分类或撤下文章时,必须先读[AI写作与文章关联索引](docs/content/WRITING.md)。它是文章用途、稳定地址和正文关系的唯一登记入口。公开文章禁止出现“核对范围”“未实测”等内部核验/验收说明,具体禁止项与发布前检查按该写作规范执行;相关事实只留项目维护记录。写作时复用相关的下载、入门、进阶和排错内容,自然设置内链,并检查相关旧文是否需要补入口;完成后同步正文源、运行数据库和该索引,验收真实目标与锚点。未创建的文章不能编造链接,本地生效不能写成已上线;不自动开展全站重写或发布。
教程配图必须按[写作规范](docs/content/WRITING.md#教程双比例配图正式规则2026-11-01)交付3:2列表图和约2.4:1详情横幅:分别构图、统一纸艺质感、每篇不同场景、两图加网址水印;`cover`用于列表,`show_cover=false`,正文开头使用唯一`guide-figure tutorial-hero`。后续聊天及周期写作同样适用,发布前检查桌面和手机。
2026-11-02起客户端下载文章优先使用本站 Resource 软件安装包,官方来源作为补充;平台/架构与不可用回退规则统一见 [写作规范](docs/content/WRITING.md#客户端下载优先级2026-11-02)。本地下载总览已与新手指引共同置顶,此次下载/置顶更新未上线,回执见 [新手教程维护](docs/maintenance/NEWCOMER_TUTORIALS_2026-11-01.md)。
免费节点与小火箭 ID 的零基础说明和每日资源页自动关联见 [资源基础说明维护](docs/maintenance/RESOURCE_BASICS_2026-11-02.md);2026-11-02仅本地新增,文章关系继续维护在写作索引,未部署生产。
## 独立文章发布 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`不代表搜索引擎已收到通知或已收录。
2026-11-01免费苹果ID详情页本地重设计:地区筛选、账号复制卡片、原始载荷保护、空记录与夜间模式见[苹果ID内容页维护](docs/maintenance/APPLE_ID_ARTICLE_LAYOUT.md)。仅本地,未部署;2026-11-02已补全82篇原始载荷复核,密码默认打码及显示/隐藏的维护和验收也见该文。
2026-11-01本地页头新增日间/夜间切换,默认跟随系统、手动选择持久化及窄屏验收见[主题切换维护](docs/maintenance/COLOR_SCHEME.md),未发布。
2026-11-02本地新增独立“看看资讯”栏目 `/news`,无文章、未发布;创建命令、分类备份及验收见[资讯栏目维护](docs/maintenance/NEWS.md)。
2026-11-02本地将“综合教程”改为“进阶教程”,地址仍 `/advanced`,并统一桌面/手机顶级栏目图标对齐,尚未发布。当前名称、命令和验收见[栏目导航维护](docs/maintenance/NAVIGATION.md)。
2026-11-03本地新增“暂避风头模式”:暂停免费节点发布更新并隐藏机场广告/推荐,保留旧资源和其他文章。命令 `php artisan site:quiet on|off|status`,当前本地关闭、未发布;唯一实现、权限和验收见[暂避风头模式](docs/maintenance/QUIET_MODE.md)。
## 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)。
2026-11-02用户授权全部待发布变更上线:暗色主题、苹果ID卡片与密码隐藏、新手教程与双比例图、七篇旧文归类、资讯栏目、点赞配置、品牌和最终HardNerd广告均已发布。当前正式范围、Git恢复点与服务器侧验收见[整批发布记录](docs/maintenance/FULL_RELEASE_2026-11-02.md),文章关系继续以写作索引为准;未做线上页面验收。
2026-11-02用户明确往期noindex,并授权本地入口/往期栏目调整:两个导航显示最新可展示资源,新增 `/history` 及两个子栏目,正文加入往期链接,日期网址保留自指canonical;仅本地,未发布。唯一合同、测试和回退见[SEO实施维护](docs/maintenance/SEO_IMPLEMENTATION_2026-10-31.md#稳定入口与往期内容2026-11-02已本地实施未发布)。
2026-11-03用户授权六项待发布改动及关联文章/图片全部上线,并明确开启暂避风头模式:正式cfn已完成Git发布、四篇文章API及四图交付、进阶教程改名和四篇置顶;生产模式开启,本地仍关闭。414项服务器检查和31个下载HEAD通过。此状态替代上文相应“仅本地/未发布”,但不恢复已撤下news;当前Git、回执、权限、验收和回退唯一见[六项发布记录](docs/maintenance/SIX_RELEASE_2026-11-03.md)。已完成服务器侧验收,未做线上页面验收。
@@ -0,0 +1,37 @@
<?php
namespace App\Console\Commands;
use App\Services\ShadowrocketNaming;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Str;
final class AlignShadowrocketNaming extends Command
{
protected $signature = 'shadowrocket:align-naming {--apply}';
protected $description = 'Align resource category and article metadata without changing account payloads';
public function handle(): int
{
$count = DB::transaction(function () {
$category = DB::table('categories')->where('sSlug', 'shadowrocketids')->lockForUpdate()->sole();
$rows = DB::table('articles')->where('iCategoryId', $category->id)->lockForUpdate()->get(['id', 'sTitle', 'sTitleSub']);
$changes = $rows->filter(fn ($r) => ShadowrocketNaming::align($r->sTitle) !== $r->sTitle || ShadowrocketNaming::align($r->sTitleSub ?? '') !== ($r->sTitleSub ?? ''));
if (! $this->option('apply')) return $changes->count();
if ($changes->isEmpty() && $category->sName === '免费小火箭ID') return 0;
$directory = storage_path('app/private/category-backups');
if (! is_dir($directory)) mkdir($directory, 0700, true);
$backup = $directory.'/shadowrocket-naming-'.Str::uuid().'.json';
if (file_put_contents($backup, json_encode(['category' => $category, 'articles' => $rows], JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT)) === false) throw new \RuntimeException('Backup failed');
chmod($backup, 0600);
DB::table('categories')->where('id', $category->id)->update(['sName' => '免费小火箭ID', 'sDescription' => ShadowrocketNaming::align($category->sDescription ?? '')]);
foreach ($changes as $row) DB::table('articles')->where('id', $row->id)->update(['sTitle' => ShadowrocketNaming::align($row->sTitle), 'sTitleSub' => ShadowrocketNaming::align($row->sTitleSub ?? '')]);
return $changes->count();
});
if ($this->option('apply')) Cache::forget('global_nav_tree');
$this->info(json_encode(['apply' => (bool) $this->option('apply'), 'articles' => $count], JSON_UNESCAPED_UNICODE));
return self::SUCCESS;
}
}
Executable → Regular
+2 -13
View File
@@ -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,56 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
/** Category and pin metadata only; article bodies/categories are published through the editorial API. */
final class OrganizeTutorials extends Command
{
protected $signature = 'tutorials:organize {--apply : Save the category name and pin its configured articles}';
protected $description = 'Rename the beginner category and pin its verified entry articles, with a private metadata backup';
public function handle(): int
{
$category = DB::table('categories')->where('sSlug', config('tutorials.beginner_slug'))->where('iStatus', 1)->first();
$slugs = array_values(array_unique(config('tutorials.pinned_slugs', [config('tutorials.guide_slug')])));
$articles = DB::table('articles')->whereIn('sSlug', $slugs)->where('iStatus', 1)->get();
if (! $category || ! $slugs || $articles->count() !== count($slugs)
|| $articles->contains(fn ($article) => (int) $article->iCategoryId !== (int) $category->id)) {
$this->error('Publish every configured entry article in the beginner category before applying metadata.');
return self::FAILURE;
}
$this->line(json_encode(['category' => $category->sSlug, 'name' => config('tutorials.beginner_name'), 'articles' => $slugs, 'pinned' => true], JSON_UNESCAPED_UNICODE));
if (! $this->option('apply')) return self::SUCCESS;
$backup = storage_path('app/private/editorial/tutorial-metadata-'.Str::uuid().'.json');
$snapshot = ['category_id' => $category->id, 'sName' => $category->sName,
'articles' => $articles->map(fn ($article) => ['id' => $article->id, 'sSlug' => $article->sSlug, 'iIsTop' => $article->iIsTop])->all()];
$json = json_encode($snapshot, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR);
if (file_put_contents($backup, $json, LOCK_EX) !== strlen($json) || ! chmod($backup, 0600)) {
throw new \RuntimeException('Unable to save the private metadata backup.');
}
DB::transaction(function () use ($category, $articles) {
$currentCategory = DB::table('categories')->where('id', $category->id)->lockForUpdate()->first();
if (! $currentCategory || $currentCategory->sName !== $category->sName || ! $currentCategory->iStatus) {
throw new \RuntimeException('Tutorial category changed; inspect before retrying.');
}
foreach ($articles as $article) {
$current = DB::table('articles')->where('id', $article->id)->lockForUpdate()->first();
if (! $current || (int) $current->iCategoryId !== (int) $category->id || ! $current->iStatus
|| $current->sSlug !== $article->sSlug || (int) $current->iIsTop !== (int) $article->iIsTop) {
throw new \RuntimeException('Tutorial metadata changed; inspect before retrying.');
}
DB::table('articles')->where('id', $article->id)->update(['iIsTop' => 1]);
}
DB::table('categories')->where('id', $category->id)->update(['sName' => config('tutorials.beginner_name')]);
});
Cache::forget('global_nav_tree');
\Spatie\ResponseCache\Facades\ResponseCache::clear();
$this->info('Category name saved and configured entry articles pinned. Private backup: '.$backup);
return self::SUCCESS;
}
}
+42
View File
@@ -0,0 +1,42 @@
<?php
namespace App\Console\Commands;
use App\Services\SiteMode;
use Illuminate\Console\Command;
use Illuminate\Support\Str;
final class QuietMode extends Command
{
protected $signature = 'site:quiet {state=status : on, off, or status}';
protected $description = 'Pause free-node publishing and hide airport promotions without deleting data';
public function handle(): int
{
$state = $this->argument('state');
if (! in_array($state, ['on','off','status'], true)) {
$this->error('Use on, off, or status.');
return self::FAILURE;
}
if ($state !== 'status') {
$path = config('site_mode.state_path');
if (! is_dir(dirname($path))) mkdir(dirname($path), 0700, true);
$temporary = $path.'.'.Str::uuid().'.tmp';
try {
$handle = fopen($temporary, 'x');
if (! $handle) throw new \RuntimeException('Cannot create mode state.');
chmod($temporary, 0600);
$payload = json_encode(['quiet' => $state === 'on', 'changed_at' => now()->toIso8601String()]);
try {
if (fwrite($handle, $payload) !== strlen($payload) || ! fflush($handle)) {
throw new \RuntimeException('Cannot save mode state.');
}
} finally { fclose($handle); }
if (! rename($temporary, $path)) throw new \RuntimeException('Cannot activate mode state.');
} finally { if (is_file($temporary)) unlink($temporary); }
\Spatie\ResponseCache\Facades\ResponseCache::clear();
}
$this->info('暂避风头模式:'.(SiteMode::quiet() ? '开启(节点更新暂停,机场广告隐藏)' : '关闭(正常模式)'));
return self::SUCCESS;
}
}
@@ -0,0 +1,42 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
final class RenameAdvancedCategory extends Command
{
protected $signature = 'tutorials:rename-advanced {--apply : Save the category display name}';
protected $description = 'Rename 综合教程 to 进阶教程, preserving URLs and article membership';
public function handle(): int
{
$category = DB::table('categories')->where('sSlug', 'advanced')->where('iParentId', 0)->where('iStatus', 1)->first();
if (! $category || ! in_array($category->sName, ['综合教程', '进阶教程'], true)) {
$this->error('Unexpected category state; inspect before changing it.');
return self::FAILURE;
}
$this->line($category->sName.' → 进阶教程; URL remains /advanced.');
if (! $this->option('apply')) return self::SUCCESS;
if ($category->sName !== '进阶教程') {
$directory = storage_path('app/private/category-backups');
if (! is_dir($directory)) mkdir($directory, 0700, true);
$backup = $directory.'/advanced-name-'.Str::uuid().'.json';
if (file_put_contents($backup, json_encode($category, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)) === false) {
throw new \RuntimeException('Category backup failed.');
}
chmod($backup, 0600);
$updated = DB::table('categories')->where('id', $category->id)->where('sName', $category->sName)
->where('sSlug', 'advanced')->where('iParentId', 0)->where('iStatus', 1)->update(['sName' => '进阶教程']);
if ($updated !== 1) throw new \RuntimeException('Category changed; inspect before retrying.');
$this->info('Private backup: '.$backup);
}
Cache::forget('global_nav_tree');
\Spatie\ResponseCache\Facades\ResponseCache::clear();
$this->info('进阶教程 ready; article content and membership unchanged.');
return self::SUCCESS;
}
}
@@ -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;
}
}
@@ -0,0 +1,56 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
final class SetupNewsCategory extends Command
{
protected $signature = 'news:setup {--apply : Create the news category}';
protected $description = 'Create the 看看资讯 top-level category without changing existing content';
public function handle(): int
{
$existing = DB::table('categories')->where('sSlug', 'news')->orWhere('sName', '看看资讯')->get();
if ($existing->isNotEmpty()) {
if ($existing->count() !== 1 || $existing[0]->sSlug !== 'news'
|| $existing[0]->sName !== '看看资讯' || (int) $existing[0]->iParentId !== 0 || (int) $existing[0]->iStatus !== 1) {
$this->error('Conflicting news category; inspect before changing it.');
return self::FAILURE;
}
$this->info('看看资讯 already exists at /news (id '.$existing[0]->id.').');
return self::SUCCESS;
}
$this->line('Create 看看资讯 at /news, after existing top-level categories.');
if (! $this->option('apply')) return self::SUCCESS;
$directory = storage_path('app/private/category-backups');
if (! is_dir($directory)) mkdir($directory, 0700, true);
$backup = $directory.'/news-'.Str::uuid().'.json';
$before = DB::table('categories')->orderBy('id')->get();
if (file_put_contents($backup, json_encode($before, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)) === false) {
throw new \RuntimeException('Category backup failed.');
}
chmod($backup, 0600);
$id = DB::transaction(function () {
$rows = DB::table('categories')->lockForUpdate()->get();
if ($rows->contains(fn ($row) => $row->sSlug === 'news' || $row->sName === '看看资讯')) {
throw new \RuntimeException('Category state changed; rerun after inspection.');
}
return DB::table('categories')->insertGetId([
'iParentId' => 0, 'sName' => '看看资讯', 'sSlug' => 'news',
'sDescription' => '最新资讯与动态。',
'iSort' => $rows->where('iParentId', 0)->max('iSort') + 1,
'iStatus' => 1, 'sHtmlClass' => 'fas fa-newspaper',
'iShowChildren' => 0, 'aBanner' => null, 'aOpt' => null,
]);
});
Cache::forget('global_nav_tree');
\Spatie\ResponseCache\Facades\ResponseCache::clear();
$this->info('Created 看看资讯 at /news (id '.$id.'). Backup: '.$backup);
return self::SUCCESS;
}
}
+25 -12
View File
@@ -48,6 +48,7 @@ public function receive(Request $oRequest)
$aOptTag = explode(",", $sOptTag);
$oCategory = Categories::where("sName", $sOptCategoryName)->first();
\App\Services\SiteMode::assertUpdatesAllowed($oCategory?->sSlug);
if (!$oCategory) {
$sMsg = "不存在的文章分类:{$sOptCategoryName}";
@@ -58,17 +59,26 @@ public function receive(Request $oRequest)
$aPutField = [
"iCategoryId" => $oCategory->id,
"iLikeCount" => $aOpt["iLikeCount"] ?? "skip",
"i7like" => $aOpt["i7like"] ?? "skip",
"i365like" => $aOpt["i365like"] ?? "skip",
"iIsTop" => $aOpt["iIsTop"] ?? "skip",
"sThumb" => $aOpt["sThumb"] ?? "skip",
];
$oArticle = Articles::where("sSlug", $sSlug)->first();
if ($oArticle) \App\Services\SiteMode::assertUpdatesAllowed($oArticle->oCategory?->sSlug);
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;
$overrides = [];
foreach (['i7like' => 'seven_day', 'i365like' => 'yearly'] as $field => $key) {
if (isset($aOpt[$field]) && $aOpt[$field] !== 'skip') $overrides[$key] = $aOpt[$field];
}
foreach (app(\App\Services\ArticleLikeDefaults::class)->newArticleFields('legacy_other', $overrides) as $field => $value) {
$oArticle->{$field} = $value;
}
}
foreach ($aPutField as $k => $v) {
@@ -106,11 +116,12 @@ public function receiveShadowrocketids(Request $oRequest)
$sArticle = $aData["content"] ?? '';
$sTitle = $aData["title"] ?? '';
$sTitleSub = $aData["title_sub"] ?? '';
$sTitle = \App\Services\ShadowrocketNaming::align($sTitle);
$sTitleSub = \App\Services\ShadowrocketNaming::align($sTitleSub);
$aArticleTags = $aData["tags"] ?? [];
$sSlug = 'ssi'.date("Ymd");
// $sImgAuthor = "tg_xiuren_a";
$sSubKey = $_ENV['site_code_short'].'::ssi';
$i7like = $aData["7like"] ?? 0;
$oThumbNum = ArticleThumbNum::firstOrCreate(["author_code" => $sSubKey, "type" => "shadowrocketids"]);
$iThumbNum = $oThumbNum->num;
@@ -153,7 +164,8 @@ public function receiveShadowrocketids(Request $oRequest)
// 只有新创建时才写入初始点赞数
if (!$oArticle) {
$aAttributes['i7like'] = $i7like;
$overrides = isset($aData['7like']) ? ['seven_day' => $aData['7like']] : [];
$aAttributes += app(\App\Services\ArticleLikeDefaults::class)->newArticleFields('shadowrocketids', $overrides);
}
$oArticle = Articles::updateOrCreate(
@@ -167,8 +179,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);
@@ -177,11 +188,13 @@ public function receiveShadowrocketids(Request $oRequest)
public function receiveFreenode(Request $oRequest)
{
\App\Services\SiteMode::assertUpdatesAllowed('freenode');
$sObjName = "nodehub:article_receive_freenodeV2";
$oFlow = Flow::make($sObjName);
$aData = $oRequest->all();
$aArticle = $aData["article"];
$resourceState = \App\Services\ResourcePublication::validate($aArticle);
$sArticleTitle = $aArticle["title"];
$sArticleTitleSub = $aArticle["title_sub"];
$sArticleContent = $aArticle["content"];
@@ -189,7 +202,6 @@ public function receiveFreenode(Request $oRequest)
$sSlug = 'fn'.date("Ymd");
// $sImgAuthor = "tg_xiuren_a";
$sSubKey = $_ENV['site_code_short'].'::fn';
$i7like = $aArticle["7like"];
$oThumbNum = ArticleFreenodeThumbNum::firstOrCreate(["author_code" => $sSubKey]);
$iThumbNum = $oThumbNum->num;
@@ -232,12 +244,13 @@ public function receiveFreenode(Request $oRequest)
// 只有新创建时才写入初始点赞数
if (!$oArticle) {
$aAttributes['i7like'] = $i7like;
$overrides = isset($aArticle['7like']) ? ['seven_day' => $aArticle['7like']] : [];
$aAttributes += app(\App\Services\ArticleLikeDefaults::class)->newArticleFields('freenode', $overrides);
}
$oArticle = Articles::updateOrCreate(
['sSlug' => $sSlug],
$aAttributes
$aAttributes + $resourceState
);
(new TagService())->syncArticleTagsByName($oArticle, $aArticleTags);
@@ -246,8 +259,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什么都没有?
@@ -256,6 +268,7 @@ public function receiveFreenode(Request $oRequest)
public function receiveFreenode_laji(Request $oRequest)
{
\App\Services\SiteMode::assertUpdatesAllowed('freenode');
$sObjName = "nodehub:article_receive_freenode";
$oFlow = Flow::make($sObjName);
@@ -267,7 +280,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;
+2 -2
View File
@@ -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 响应头
+20 -23
View File
@@ -1,33 +1,30 @@
<?php
namespace App\Http\Controllers;
use App\Models\Articles;
use App\Models\Categories;
use App\Services\Seo;
use App\Services\ArticlesService;
use App\Services\ResourcePages;
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)]] : [];
$latestId = app(ArticlesService::class)->getLatestResourceSlug('shadowrocketids');
if ($latestId && ($idArticle = $articles->firstWhere('sSlug', $latestId))) {
$entries[] = ['url'=>Seo::url(ResourcePages::entryPath('shadowrocketids')), 'modified'=>Seo::modified($idArticle)];
}
foreach (Categories::where('iStatus',1)->with('oParent')->orderBy('id')->get() as $category) {
if (ResourcePages::supports($category->sSlug)) continue;
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');
}
}
+67 -33
View File
@@ -4,6 +4,8 @@
use App\Http\Controllers\Controller;
use App\Services\ArticlesService;
use App\Services\ResourcePages;
use App\Services\Seo;
use Illuminate\Http\Request;
use App\Models\Articles;
@@ -19,10 +21,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 +47,74 @@ 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(Seo::url($page>1?ResourcePages::historyPath('freenode'):'/', $page),301);
return $this->resourceEntry($oRequest, 'freenode');
}
public function list(Request $oRequest, string $sSlug1, string $sSlug2 = null)
public function resource(Request $request, string $type)
{
$sSlug = $sSlug2 ?? $sSlug1;
$xData = $this->oArticlesService->getCategoryArticles($sSlug, 'view');
return view('pages.articles.default.index', $xData);
$page = Seo::page($request);
if ($request->has('page')) return redirect(Seo::url($page > 1 ? ResourcePages::historyPath($type) : ResourcePages::entryPath($type), $page), 301);
if ($type === 'freenode') return redirect(Seo::url(), 301);
return $this->resourceEntry($request, $type);
}
private function resourceEntry(Request $oRequest, string $type)
{
$slug = $this->oArticlesService->getLatestResourceSlug($type);
if (!$slug) return response()->view('pages.articles.default.unavailable', ['resourceType'=>$type], 503)->header('Retry-After','3600');
$data = $this->articleData($slug, $oRequest);
$data['bIsHome'] = $type === 'freenode';
$data['bResourceEntry'] = true;
$data['seo'] = Seo::resourceEntryMeta($data['oArticle'], $type);
return view('pages.articles.default.show', $data);
}
public function history(Request $request, ?string $type = null)
{
$page = Seo::page($request);
$data = $this->oArticlesService->getResourceHistory($type);
$data['seo'] = Seo::listMeta($data['historyHeading'], '按发布时间查看往期资源记录。', ResourcePages::historyPath($type), $page, false);
return $this->listing($request, $data);
}
public function list(Request $oRequest, string $sSlug1, ?string $sSlug2 = null)
{
$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);
}
}
+13
View File
@@ -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;
}
}
Executable → Regular
+23 -22
View File
@@ -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,35 @@ 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) {
\App\Services\SiteMode::guardArticle($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 && \App\Services\ResourcePages::supports($article->oCategory?->sSlug)) $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('/'); // 要改成具体文章
});
}
+3 -1
View File
@@ -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))));
});
}
+79
View File
@@ -0,0 +1,79 @@
<?php
namespace App\Services;
use DOMDocument;
use DOMElement;
use DOMXPath;
/** Presentation-only adaptation: keep every original account/password pair intact. */
final class AppleIdArticleLayout
{
public static function prepare(string $html): ?array
{
if (!preg_match('/免费苹果(?:账号|ID)/u', $html)) return null;
$dom = new DOMDocument('1.0', 'UTF-8');
$before = libxml_use_internal_errors(true);
try {
$dom->loadHTML('<?xml encoding="UTF-8"><html><body><div id="aid-root">'.str_replace(ArticleRecommendations::SLOT, '', $html).'</div></body></html>', LIBXML_NONET);
$root = $dom->getElementById('aid-root');
if (!$root) return null;
$xpath = new DOMXPath($dom);
$copies = $xpath->query('.//*[@data-clipboard-text]', $root);
if (!$copies || $copies->length % 2) return null;
// Empty historical updates are valid, but plaintext account rows must not disappear.
if (!$copies->length && (preg_match('/账号[::]|密码[::]/u', $root->textContent)
|| !$xpath->query('.//*[self::h1 or self::h2 or self::h3 or self::h4 or self::h5 or self::h6][starts-with(normalize-space(.), "免费苹果")]', $root)->length)) return null;
$result = ['accounts' => [], 'regions' => [], 'warnings' => [], 'intro' => '', 'outro' => ''];
$containers = [];
for ($i = 0; $i < $copies->length; $i += 2) {
$account = $copies->item($i);
$password = $copies->item($i + 1);
$container = $account->parentNode;
while ($container && $container !== $root && $container->parentNode !== $root) $container = $container->parentNode;
// Unknown nesting, labels or additional copy controls retain the legacy rendering.
if (!$container instanceof DOMElement || $container->parentNode !== $root || $container->tagName !== 'p') return null;
$fields = $xpath->query('.//*[@data-clipboard-text]', $container);
if ($fields->length !== 2 || !$fields->item(0)->isSameNode($account) || !$fields->item(1)->isSameNode($password)) return null;
$text = self::text($container->textContent);
if (!preg_match('/^账号[::]\s*.+[,,]\s*密码[::]\s*.+[,,]\s*地区[::]\s*(.*?)[,,]\s*检测时间[::]\s*(.*?)\s*$/u', $text, $match)) return null;
$username = $account->getAttribute('data-clipboard-text');
$secret = $password->getAttribute('data-clipboard-text');
if ($username === '' || $secret === '') return null;
$region = trim($match[1]);
if ($region === '') $region = '未注明';
$result['accounts'][] = ['account' => $username, 'password' => $secret, 'region' => $region, 'checked_at' => trim($match[2])];
$result['regions'][$region] = ($result['regions'][$region] ?? 0) + 1;
$containers[] = $container;
}
$seenAccount = false;
foreach (iterator_to_array($root->childNodes) as $node) {
$isAccount = false;
foreach ($containers as $container) if ($node->isSameNode($container)) { $isAccount = true; break; }
if ($isAccount) { $seenAccount = true; continue; }
$text = self::text($node->textContent);
if ($text === '') continue;
if ($node instanceof DOMElement && preg_match('/^免费苹果(?:账号|ID)/u', $text) && preg_match('/^h[1-6]$/', $node->tagName)) continue;
if (str_contains($text, '必须从App Store登录') && str_contains($text, 'iCloud')) {
$warning = preg_replace('/^[\x{26A0}\x{FE0F}\s]+/u', '', $text);
if (!in_array($warning, $result['warnings'], true)) $result['warnings'][] = $warning;
continue;
}
$result[$seenAccount ? 'outro' : 'intro'] .= $dom->saveHTML($node);
}
return $result;
} catch (\Throwable) {
return null;
} finally {
libxml_clear_errors();
libxml_use_internal_errors($before);
}
}
private static function text(string $text): string
{
return trim(preg_replace('/\s+/u', ' ', $text));
}
}
+61
View File
@@ -0,0 +1,61 @@
<?php
namespace App\Services;
use InvalidArgumentException;
final class ArticleLikeDefaults
{
public function editorialCategory(string $slug): string
{
if ($slug === 'advanced') {
return 'comprehensive';
}
return in_array($slug, ['client', 'windows', 'andorid', 'ios', 'linux', 'mac'], true)
? 'beginner' : 'editorial_other';
}
/** @return array{seven_day:int, yearly:int, one_year:int} */
public function resolve(string $type, array $overrides = []): array
{
$limits = ['seven_day' => 1000000, 'yearly' => 365, 'one_year' => 1000000];
$settings = config('article_likes.'.$type);
if (! is_array($settings)) {
throw new InvalidArgumentException('Missing article like defaults: '.$type);
}
$result = [];
foreach ($limits as $key => $max) {
// Site settings are authoritative, including zero. Incoming values
// remain accepted for API compatibility but cannot change the policy.
$value = $settings[$key] ?? null;
if (is_array($value)) {
if (count($value) !== 2 || ! array_is_list($value) || ! is_int($value[0]) || ! is_int($value[1])
|| $value[0] < 0 || $value[1] > $max || $value[0] > $value[1]) {
throw new InvalidArgumentException('Invalid article like range: '.$type.'.'.$key);
}
$value = random_int($value[0], $value[1]);
}
// Legacy callers historically submit numeric strings.
if (is_string($value) && ctype_digit($value)) {
$value = (int) $value;
}
if (! is_int($value) || $value < 0 || $value > $max) {
throw new InvalidArgumentException('Invalid article like value: '.$type.'.'.$key);
}
$result[$key] = $value;
}
return $result;
}
public function newArticleFields(string $type, array $overrides = []): array
{
$values = $this->resolve($type, $overrides);
return ['i7like' => $values['seven_day'], 'i365like' => $values['yearly'],
'iYearLikeTarget' => $values['one_year'], 'iYearLikeAdded' => 0,
'sYearLikeStartedAt' => $values['one_year'] > 0 ? now() : null];
}
}
+72
View File
@@ -0,0 +1,72 @@
<?php
namespace App\Services;
use App\Models\Articles;
final class ArticleRecommendations
{
public const SLOT = '<!-- fna-airport-recommendations -->';
public static function providers(): array
{
if (SiteMode::quiet() || ! 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';
$quiet = SiteMode::quiet();
$enabled = $scope && self::providers() !== [];
if (! $enabled && ! $quiet) 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 ($quiet) {
$html = str_replace(self::SLOT, '', $html);
$html = preg_replace('~<p\b[^>]*class=["\'][^"\']*airport-recommendation-jump[^"\']*["\'][^>]*>.*?</p>~si', '', $html);
return ['body' => $html, 'enabled' => false, 'inline' => false];
}
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];
}
}
+1 -1
View File
@@ -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.
}
}
Executable → Regular
+57 -135
View File
@@ -143,151 +143,73 @@ 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');
return $this->getLatestResourceSlug('freenode');
}
public function getCategoryArticles(string $sSlug, string $sResultType)
public function getLatestResourceSlug(string $type): ?string
{
$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];
abort_unless(ResourcePages::supports($type), 404);
foreach (Articles::publicVisible()->whereHas('oCategory', fn($q)=>$q->where('sSlug',$type))
->orderByDesc('created_at')->orderByDesc('id')->cursor() as $article) {
$usable = $type === 'freenode'
? ResourcePublication::usable($article)
: ResourcePublication::usableAppleId($article);
if ($usable) 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 getResourceHistory(?string $type = null): array
{
$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
];
abort_if($type !== null && !ResourcePages::supports($type), 404);
$categories = Categories::whereIn('sSlug', ResourcePages::TYPES)->where('iStatus', 1)
->with('oParent')->get()->filter(fn($c) => !$c->iParentId || $c->oParent?->iStatus);
$category = $type ? $categories->firstWhere('sSlug', $type) : null;
abort_if($type && !$category, 404);
$latest = [];
foreach ($categories as $item) {
if ($slug = $this->getLatestResourceSlug($item->sSlug)) $latest[] = $slug;
}
$articles = Articles::publicVisible()->with('oCategory.oParent')
->whereIn('iCategoryId', $category ? [$category->id] : $categories->pluck('id'))
->whereNotIn('sSlug', $latest)->orderByDesc('created_at')->orderByDesc('id')
->paginate(config('seo.history_page_size', 10));
return ['oArticles' => $articles, 'oCategory' => $category, 'historyCategories' => $categories,
'historyType' => $type, 'bResourceHistory' => true,
'historyHeading' => $category ? $category->sName.' · 往期资源' : '往期资源'];
}
public function getCategoryArticles(string $slug, string $resultType = 'view')
{
$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];
}
}
Executable → Regular
+1 -1
View File
@@ -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()]);
});
+10 -6
View File
@@ -88,11 +88,8 @@ public function draft(array $input): array
if (! $article) {
// Freeze display offset and like defaults once; retries cannot redraw them.
$item['display_offset_seconds'] = ($row['display_time_randomize'] ?? true) ? random_int(0, 21600) : 0;
$item['like_settings'] = [
'seven_day' => $row['like_settings']['seven_day'] ?? random_int(5, 35),
'yearly' => $row['like_settings']['yearly'] ?? 50,
'one_year' => $row['like_settings']['one_year'] ?? random_int(100, 500),
];
$defaults = app(\App\Services\ArticleLikeDefaults::class);
$item['like_settings'] = $defaults->resolve($defaults->editorialCategory($category->sSlug), $row['like_settings'] ?? []);
}
$item['html'] = $this->renderer->render($item);
if ($item['cover']) {
@@ -203,13 +200,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'];
+2 -1
View File
@@ -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);
+93
View File
@@ -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);
}
}
+24
View File
@@ -0,0 +1,24 @@
<?php
namespace App\Services;
/** Stable resource entrances and read-only history views; no category/data migration. */
final class ResourcePages
{
public const TYPES = ['freenode', 'shadowrocketids'];
public static function supports(?string $type): bool
{
return in_array($type, self::TYPES, true);
}
public static function entryPath(string $type): string
{
return $type === 'freenode' ? '/' : '/shadowrocketids';
}
public static function historyPath(?string $type = null): string
{
return '/history'.($type ? '/'.$type : '');
}
}
+33
View File
@@ -0,0 +1,33 @@
<?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;
if ($article->iResourceCount !== null && (int)$article->iResourceCount === 0) return false;
if (array_key_exists('sContent', $article->getAttributes()) && trim(Seo::text($article->sContent)) === '') 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 usableAppleId(Articles $article): bool
{
if (in_array($article->sResourceStatus, ['failed','empty'], true)) return false;
$layout = AppleIdArticleLayout::prepare($article->sContent ?? '');
// Unknown/empty payloads remain accessible as records, never replace the latest entrance.
return $layout !== null && count($layout['accounts']) > 0;
}
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];
}
}
+120
View File
@@ -0,0 +1,120 @@
<?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
{
if (ResourcePages::supports($category->sSlug)) return ResourcePages::entryPath($category->sSlug);
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
{
// Resource date URLs are snapshots. Only their stable entrances participate in search.
if (ResourcePages::supports($a->oCategory?->sSlug)) return false;
if (!self::public($a) || in_array($a->sSeoPolicy, ['archive','noindex'], true)) return false;
return true;
}
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]]];
}
public static function resourceEntryMeta(Articles $article, string $type): array
{
if ($type === 'freenode') return self::articleMeta($article, true);
$title = self::categoryName($article->oCategory);
$url = self::url(ResourcePages::entryPath($type));
$schema = ['@context'=>'https://schema.org', '@type'=>'WebPage', 'name'=>$title, 'url'=>$url];
if ($modified = self::modified($article)) $schema['dateModified'] = $modified;
return ['title'=>$title.' - '.config('seo.brand'), 'heading'=>$title,
'description'=>'查看最近更新的免费小火箭ID,按地区选择共享账号,并查看使用说明和往期内容。',
'canonical'=>$url, 'robots'=>'index, follow', 'type'=>'website', 'schema'=>[$schema]];
}
}
+56
View File
@@ -0,0 +1,56 @@
<?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) $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 ($path === '/history' || str_starts_with($path, '/history/')) return false;
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;
if ($path === '/freenode') return false;
if ($path === '/shadowrocketids') return app(ArticlesService::class)->getLatestResourceSlug('shadowrocketids') !== 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
View File
@@ -0,0 +1,12 @@
<?php
namespace App\Services;
final class ShadowrocketNaming
{
public static function align(string $text): string
{
$text = str_replace(['免费苹果账号', '免费苹果ID', '免费苹果id', '(小火箭账号、shadowrocket id)'], ['免费小火箭ID', '免费小火箭ID', '免费小火箭ID', ''], $text);
return str_replace(['免费小火箭ID,可用于使用小火箭(shadowrocket)', 'Appale ID'], ['免费Apple ID,已购买小火箭(shadowrocket)', 'Apple ID'], $text);
}
}
+40
View File
@@ -0,0 +1,40 @@
<?php
namespace App\Services;
use App\Models\Articles;
use App\Models\Categories;
use Illuminate\Http\Exceptions\HttpResponseException;
final class SiteMode
{
public static function quiet(): bool
{
$path = config('site_mode.state_path');
if (! $path || ! is_file($path)) return (bool) config('site_mode.quiet', false);
$state = json_decode((string) file_get_contents($path), true);
// An unreadable/invalid operational flag must not silently resume publishing.
return ! is_array($state) || ! is_bool($state['quiet'] ?? null) || $state['quiet'];
}
public static function assertUpdatesAllowed(?string $type): void
{
if ($type !== 'freenode' || ! self::quiet()) return;
throw new HttpResponseException(response()->json([
'isDone' => false, 'status' => 'paused', 'code' => 'FREE_NODE_UPDATES_PAUSED',
'message' => 'Free node updates are temporarily paused; existing publications are retained.',
], 503, ['Retry-After' => '3600']));
}
public static function guardArticle(Articles $article): void
{
if (! self::quiet()) return;
$fields = ['sSlug','iCategoryId','sTitle','sTitleSub','sContent','sThumb',
'iStatus','created_at','sDisplayPublishedAt','sResourceStatus','iResourceCount'];
if ($article->exists && ! $article->isDirty($fields)) return;
$ids = array_filter([$article->iCategoryId, $article->getRawOriginal('iCategoryId')]);
if ($ids && Categories::whereIn('id', $ids)->where('sSlug', 'freenode')->exists()) {
self::assertUpdatesAllowed('freenode');
}
}
}
Executable → Regular
+1
View File
@@ -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,
+9 -1
View File
@@ -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/'),
],
];
+33
View File
@@ -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 折',
],
],
];
+25
View File
@@ -0,0 +1,25 @@
<?php
// 新文章自动点赞默认值。整数表示固定值,[最小值, 最大值]表示随机整数(含两端);0表示关闭。
// seven_day:前7天的增长额度;yearly:持续年度概率参数;one_year:一年内一次性额外额度。
// 修改只影响之后新建的文章;编辑旧文章、重试草稿不会重置。本文件覆盖上游/API传值,0也优先。
return [
'beginner' => [ // 新手教程及其平台子栏目
'seven_day' => [1, 18], 'yearly' => 50, 'one_year' => [50, 150],
],
'comprehensive' => [ // 综合教程
'seven_day' => [1, 15], 'yearly' => 30, 'one_year' => [20, 80],
],
'editorial_other' => [ // 文章API创建的其他栏目
'seven_day' => [1, 15], 'yearly' => 30, 'one_year' => [20, 80],
],
'freenode' => [ // 免费节点;忽略上游自动点赞值
'seven_day' => [3, 32], 'yearly' => 0, 'one_year' => 0,
],
'shadowrocketids' => [ // 小火箭ID;忽略上游自动点赞值
'seven_day' => [1, 12], 'yearly' => 0, 'one_year' => 0,
],
'legacy_other' => [ // 旧通用接收接口;同样由本站配置决定
'seven_day' => 0, 'yearly' => 0, 'one_year' => 0,
],
];
+5
View File
@@ -0,0 +1,5 @@
<?php
return [
'telegram_url' => env('COMMUNITY_TELEGRAM_URL', 'https://t.me/clashfreenode'),
];
+1
View File
@@ -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'),
];
+8
View File
@@ -0,0 +1,8 @@
<?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),
'history_page_size' => 10,
];
+6
View File
@@ -0,0 +1,6 @@
<?php
return [
'quiet' => env('SITE_QUIET_MODE', false),
'state_path' => storage_path('app/private/site-mode.json'),
];
+20
View File
@@ -0,0 +1,20 @@
<?php
return [
'guide_slug' => 'getting-started',
'pinned_slugs' => ['getting-started', 'proxy-clients', 'free-nodes-explained', 'shadowrocket-id-explained'],
'beginner_slug' => 'client',
'beginner_name' => '新手教程',
'resource_explainers' => [
'freenode' => ['slug' => 'free-nodes-explained', 'title' => '免费节点是什么?', 'description' => '从网页打不开的例子,认识软件、线路和订阅。'],
'shadowrocketids' => ['slug' => 'shadowrocket-id-explained', 'title' => '免费小火箭 ID 是什么?有什么用?', 'description' => '账号用于获取应用,节点用于连接网络;先看懂两者的区别。'],
],
// Dedicated platform mastheads; the /client overview intentionally has none.
'category_banners' => [
'windows' => ['image' => '/images/tutorial-categories/windows-paper-banner.jpg', 'title' => 'Windows'],
'mac' => ['image' => '/images/tutorial-categories/mac-paper-banner.jpg', 'title' => 'Mac'],
'andorid' => ['image' => '/images/tutorial-categories/android-paper-banner.jpg', 'title' => 'Android'],
'ios' => ['image' => '/images/tutorial-categories/ios-paper-banner.jpg', 'title' => 'iPhone / iPad'],
'linux' => ['image' => '/images/tutorial-categories/linux-paper-banner.jpg', 'title' => 'Linux'],
],
];
@@ -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-HardNerd-20261031.png",
"width": 2020,
"height": 778,
"sha256": "54372d16b924fa8e99dbae96e9f7fd8ef3d17f11879505024d897df8d57ffb7b"
},
"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. Edit the supplied existing HN advertisement. Replace ONLY lowercase brand wordmark "hardnerd" with EXACT case-sensitive "HardNerd": uppercase H, lowercase ard, uppercase N, lowercase erd. Spell H a r d N e r d. Keep the same gradient colors, clean bold font, approximate wordmark size, icon-to-wordmark gap, baseline, centered composition and generous brand-to-tagline spacing. Keep the H/lime-glasses icon EXACTLY unchanged. Keep white Chinese tagline EXACTLY "硬核架构,品质专线,全球网络畅通无阻", same small size and placement. Preserve background charcoal, teal/purple glow, wide dimensions, tiny 广告 and all other details. No additional changes.
@@ -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.
+121 -23
View File
@@ -8,11 +8,17 @@ # 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)上线。
2026-11-02用户将本地“综合教程”改为“进阶教程”,保留 `/advanced`、文章归属和URL;2026-11-03该改名已上线,后续写作沿新栏目名。导航图标对齐及元数据维护见[栏目导航](../maintenance/NAVIGATION.md)。此前发布记录中旧栏目名保留历史含义。
## 1 写作前先确定读者要完成的任务
- 入门教程:以第一次使用为前提,讲准备、下载、安装、配置、使用和基本排错。不要把客户端迁移作为普通入门教程的主线。
- 下载与选型:讲适用平台、版本/架构、官方来源和选哪个安装包;引用官方发布入口,不把未经验证的第三方包当官方下载。
- 综合教程(栏目原名“进阶教程”,URL仍为`/advanced`):讲具体机制、配置取舍、迁移或专项排错,并链接读者需要的基础操作。
- 新手教程(原“入门教程”,URL仍为`/client`):以第一次使用为前提,讲准备、下载、安装、配置、使用和基本排错。不要把客户端迁移作为普通入门教程的主线。
- 下载与选型:讲适用平台、架构、安装包选择和上游来源;下载优先使用本站 Resource 软件资源服务,官方发布页作补充,遵循下述客户端下载优先级。
- 进阶教程(2026-11-02本地由“综合教程”更名,URL仍为`/advanced`):讲具体机制、配置取舍、迁移或专项排错,并链接读者需要的基础操作。
- 看看资讯(`/news`):独立资讯栏目,2026-11-02建立后已按用户要求从本地及正式撤下,无文章;具体栏目维护见[资讯栏目](../maintenance/NEWS.md)。创建栏目不表示已授权自动采集或写作。
- 资源与时效内容:区分长期说明和当天资源状态。长期教程优先链接稳定说明/栏目,不依赖会过期的某一天资源页。
先查询下表和当前数据库,再决定重写已有文章还是新增。主题相同优先完善唯一正文;不同平台可以分别写,但需要实际的平台差异。标题、开头、步骤和关联链接都应服务于同一个任务。
@@ -27,49 +33,105 @@ ## 1 写作前先确定读者要完成的任务
自然、准确地表达;必要时用真实操作图、流程图、配置示例。软件版本、下载入口与兼容要求使用当次核对的官方来源;来源核验、页面检查和设备实测分别记录,未做实测不写“实测”。
### 客户端下载优先级(2026-11-02)
用户明确要求:客户端下载文章优先走我们的 **Resource**。本规则适用于后续新写和重写的下载/安装步骤,不仅限于当前聊天。
- 优先链接下载总览 `/a/proxy-clients.html` 的对应段落(`#verge`、`#flclash`、`#ios`、`#alternatives`、`#router`),把系统与架构选择集中维护;需要直接下载时使用 Resource 已核实的固定公开安装包链接。
- 软件服务为 `https://downloads.gemcook.net`,入口契约见 [Resource 软件模块](/Users/hellcat/Documents/GemCodes/resource.loc/v2/docs/SOFTWARE.md) 与 [软件部署](/Users/hellcat/Documents/GemCodes/resource.loc/v2/docs/SOFTWARE_DEPLOYMENT.md)。只使用实际目录中可用的 `download_url` / 固定公开路径,不猜文件名、不拼版本 URL、不向读者暴露目录 API 凭据。
- 核对软件、系统、架构、包格式与文件可用性;线上核对经白色机在服务器执行,不从本机请求生产下载源。固定链接会更新文件,但不要无依据称每个平台都是最新版本。
- 下载链接标作“本站下载”或“本站资源下载”;说明官方来源时区分 Resource 托管与官方站点,不把托管链接标成“官方下载”。官方项目、发布页和安装说明保留作补充。
- Resource 未收录或目标架构不可用时保留确切官方入口;iPhone / iPad 应用继续使用 App Store,不能用安卓或桌面安装包替代。当前 OpenClash 仍用官方入口。
### 文章封面与水印(2026-11-01)
每次新写的每篇文章都须独立设计并生成主题图片;不复用同一底图换标题,不沿用单调的标题横线卡片。根据文章的设备、操作或机制构思不同场景、构图和配色,为文章生成与具体主题相符的封面图,并加上本站网址 **clashfreenode.com** 水印。用户提供的参考图以画面表达主题,角落有低调的站点署名;借鉴这种主题视觉与水印的关系,不照搬其他网站的名称、标志或固定版式。封面应适合本站缩略图裁切,在小尺寸下仍能看清主体和水印;文字优先使用中文,应用名称及品牌名保留原名,水印不遮挡关键信息。生成后检查实际渲染的品牌拼写、可读性和裁切效果,必要时调整;按文章API的图片上传与发布流程交付。
**统一画风,不统一模板(2026-11-01用户确认)**:教程封面采用“纸艺拼贴+微缩立体场景”(tactile papercraft / miniature diorama editorial illustration),保留纸张纤维与折叠、层叠色块、可信的物件体积、柔和定向光和自然投影。认可参考为[客户端下载图](tutorials/assets/newcomer/clients-cover.png)的设备陈列,以及[新手指引图](tutorials/assets/newcomer/start-paper-cover.png)的路线与关卡;二者质感相通,但场景与构图明显不同。每篇按主题重新设计视觉比喻、主体、镜头角度、构图与配色,不固定为设备托盘,不反复使用笔记本、山景屏幕、盆栽或同样的台座布局,不只换设备/标题/颜色。可以使用地图、建筑、机械、航行、城市网络等不同表现;这是举例,不是每篇必须套用的固定清单。既要表达文章主题,也要确保成组浏览时不重复。此规则只适用于教程封面,不改免费节点插画池。
封面图与正文里的操作截图、流程图用途不同,正文需要解释操作或机制时仍应提供对应图解。此要求自后续新文起执行,不自动更换已发布文章的封面。文章专题封面通过文章资产流程处理,不因此改动免费节点插画图池;CFN系独立插画仍遵循项目既有画师分工及交付流程。
### 教程双比例配图(正式规则,2026-11-01)
用户已确认试样并要求其他文章遵循此方式。**后续每篇新手/综合教程必须同时交付两张同主题、分别构图的图片**,不是仅适用于当前聊天或新手指引的临时试验:
- **列表缩略图:3:2。** 上传后写入文章 `cover`,主体和标题在列表小图中清晰;不要把列表图误认为正方形。
- **详情头图:约2.4:1。** 为低矮宽画幅重新安排主体、文字和留白,完整展现主题;不可通过硬裁、拉伸或上下补空白把3:2图凑成横幅。两张图保持同一文章的主题与画风,不必复制物件位置。
- 两图均按上一节的纸艺拼贴+微缩场景风格独立设计,带准确的 `clashfreenode.com` 水印;不同文章的视觉比喻、场景、配色和视角应有变化。正文操作截图及图解另按解释需要提供。
**发布实现必须一致:** `cover` 指向3:2缩略图,`show_cover=false`,详情横幅放在正文 `.tutorial-body` 开头,以唯一的 `figure.guide-figure.tutorial-hero` 包住图片。上传两张图片后使用API返回的实际 `asset:SHA256`,并填写实际宽高和说明性alt;不要把示例占位符直接发布:
```html
<figure class="guide-figure tutorial-hero"><img src="asset:实际横幅SHA256" width="实际宽度" height="实际高度" alt="主题说明" decoding="async"></figure>
```
现有 `tutorials.css` 使横幅占满正文宽度并等比显示。不得再打开默认头图造成重复,也不得给横幅设置固定高度裁切。改旧文时保留原 `cover`、日期、正文和点赞进度,只更新已获授权的图片内容;同步Markdown源、HTML渲染稿和文章版本索引。原图、交付JPG及完整提示词保存在文章资产目录,不依赖聊天临时文件。
发布前逐篇检查:列表仍使用3:2图;详情仅一张约2.4:1头图;桌面和手机无横向溢出;标题、水印、主体完整可读;图片加载成功;实际正文与缩略图分别使用正确资源。缺少任一配图或未完成检查时不能把文章标成全部完成。普通改稿不自动批量重画历史文章;本次已获授权推广的是2026-11-01这批8篇新手教程,回执与回退见[新手教程维护记录](../maintenance/NEWCOMER_TUTORIALS_2026-11-01.md)。
栏目banner与文章配图是不同资产:`/client` 总列表不显示大图;五个平台子栏目显示各自主题banner及动态名称/文章数量。栏目图不替代文章的两张配图,修改入口见[新手教程维护记录](../maintenance/NEWCOMER_TUTORIALS_2026-11-01.md)。
### 周期文章的展示时间(2026-10-31)
用户要求每天北京时间15:00检查周期计划,新文章展示日期从实际发布时间随机向前偏移0~21600秒(含端点)。API在新文草稿中冻结`display_offset_seconds`,首次发布计算独立的`sDisplayPublishedAt`;列表和详情沿原有日期显示样式使用该字段,未设置时使用真实创建时间。实际`created_at`、发布回执及点赞起点不改;重试、旧文编辑和回退不重抽、不改旧文展示时间。`display_time_randomize`只允许新建时设置,默认true,显式false为零偏移。不要把随机时间或内部执行过程写进公开正文。
### AI 新文章的点赞参数(2026-10-29)
后续AI通过本站独立文章API**新建文章**时使用以下默认设置,由API在保存草稿时为每篇独立取值并冻结;相同请求重试、查询预览及发布不重新抽取。重写、接管、回退已有文章不重置原参数、点赞数或已完成进度,不自动给现有文章批量补额度。
后续AI通过本站独立文章API**新建文章**时由API在保存草稿时为每篇独立取默认值并冻结;相同请求重试、查询预览及发布不重新抽取。统一设置入口为[文章自动点赞配置](../../config/article_likes.php),配置文件覆盖上游/API传入的自动点赞数值,0也优先;分类与优先级见[自动点赞维护](../maintenance/ARTICLE_LIKES.md#新文章统一设置2026-11-01本地)。下表是现有默认值的说明,后续以配置文件的实际值为准;本次统一配置已于2026-11-02随Git发布上线。重写、接管、回退已有文章不重置原参数、点赞数或已完成进度,不自动给现有文章批量补额度。
| 设置 | 默认值 | 含义 |
| --- | --- | --- |
| `i7like`,API `like_settings.seven_day` | 随机整数5~35,含端点 | 原有短期待增加额度,随原任务逐次扣减 |
| `i365like`,API `like_settings.yearly` | 固定50 | 保留原持续年度随机机制:每天以50/365概率加1,长期平均每年约50赞,并非每年保证恰好50,不随一年结束停止 |
| `iYearLikeTarget`,API `like_settings.one_year` | 随机整数100~500,含端点 | 新增一次性年度额度;设200表示独立累计自动增加200赞,不是总点赞数封顶200 |
| `i7like`,API `like_settings.seven_day` | 新手1~18;综合/其他编辑1~15(含端点) | 原有短期待增加额度,随原任务逐次扣减 |
| `i365like`,API `like_settings.yearly` | 新手50;综合/其他编辑30 | 保留原持续年度随机机制:每天以50/365概率加1,长期平均每年约50赞,并非每年保证恰好50,不随一年结束停止 |
| `iYearLikeTarget`,API `like_settings.one_year` | 新手50~150;综合/其他编辑20~80(含端点) | 新增一次性年度额度;设200表示独立累计自动增加200赞,不是总点赞数封顶200 |
一次性年度额度从正式发布时开始,按实际经过时间在一个日历年内分散增加,`iYearLikeAdded`记录已增加数量,`sYearLikeStartedAt`记录开始时间;满额后该项停止,`i365like`持续增长和真实点赞继续独立计算。任务停机造成的欠额在恢复后补至应有进度;满一年后首次恢复会补完余额,不能在调度停机时凭空执行。
新文章可省略`like_settings`使用上述默认值,也可在创建草稿时显式提交`{"seven_day":12,"yearly":50,"one_year":200}`;0表示关闭对应机制。保存后检查草稿响应的`like_settings`,发布后从鉴权的`source-articles/{id}`响应`like_growth`回读确认。旧文章编辑不传此对象;API拒绝通过普通改稿重置额度。设置与进度只属于内部发布数据,不写进公开正文、摘要、图注或封面。
新文章省略`like_settings`,由配置文件决定三个值;为兼容旧调用,接口仍校验该对象,但传入值不会覆盖本地配置。要关闭某项,在配置文件中设为0。保存后检查草稿响应的`like_settings`,发布后从鉴权的`source-articles/{id}`响应`like_growth`回读确认。旧文章编辑不传此对象;API拒绝通过普通改稿重置额度。设置与进度只属于内部发布数据,不写进公开正文、摘要、图注或封面。
具体字段、迁移、任务、测试与回退见[文章自动点赞维护](../maintenance/ARTICLE_LIKES.md)。这些默认值已于2026-10-29部署正式cfn,原每5分钟点赞任务已接入新增年度额度;本机仍未启动调度。按用户本次明确授权,正式10篇教程已补齐缺项:3篇全0新文补全部默认值,另外7篇仅补一次性年度额度并保留原参数。后续不自动重置已有文章,补配结果见上述维护记录。
具体字段、迁移、任务、测试与回退见[文章自动点赞维护](../maintenance/ARTICLE_LIKES.md)。2026-10-29当时的默认值已部署正式cfn(不是2026-11-01本地的新范围和优先级),原每5分钟点赞任务已接入新增年度额度;本机仍未启动调度。按用户本次明确授权,正式10篇教程已补齐缺项:3篇全0新文补全部默认值,另外7篇仅补一次性年度额度并保留原参数。后续不自动重置已有文章,补配结果见上述维护记录。
## 2 当前文章登记
核对日期:2026-10-28;证据为本机 `fna_v3` 数据库及已有正文源。表中 `iStatus=1` 只代表本地应用可显示,**不代表已经发布到生产**。十篇长期教程均已新建或重写并在本地确认;原七篇旧教程已处理完毕,仍不据此判断生产站现状。
登记更新:2026-11-03。新手栏目10篇新文均已正式发布,两篇资源概念说明及本批旧文更新见[六项发布记录](../maintenance/SIX_RELEASE_2026-11-03.md);此前8篇新文,原7篇平台教程移至综合教程,URL、正文、日期和点赞进度保留。分类与新稿已于2026-11-02通过正式API发布;正式ID、版本及验收见[整批发布记录](../maintenance/FULL_RELEASE_2026-11-02.md)。具体批次与回退见[新手教程调整](../maintenance/NEWCOMER_TUTORIALS_2026-11-01.md)。
ID用于核对本地行,站内链接使用已确认路径。跨环境迁移后重新核对ID,不能假定生产ID相同。
| 内容键 | 本地ID / 栏目 | 标题 | 实际路径 | 正文源 / 编辑状态 | 用途与引用边界 |
| --- | --- | --- | --- | --- | --- |
| verge-windows-start | 362 / Windows(入门) | Clash Verge Rev 使用教程:从安装到第一次连接(Windows) | `/a/clash-verge-rev-windows.html` | [windows.md](tutorials/windows.md);本地API版本4 | Windows新用户操作入口;下载段落锚点为 `#install` |
| cfw-to-verge | 212 / 综合教程 | 从 Clash for Windows 迁移到 Clash Verge Rev | `/a/m167.html` | [migration.md](tutorials/migration.md);本地API版本5 | 保留旧配置并更换客户端;不作为纯入门入口 |
| mihomo-dns | 361 / 综合教程 | Clash 进阶:DNS 防泄漏配置与验证 | `/a/mihomo-dns-leak.html` | [dns.md](tutorials/dns.md);本地API版本6 | Mihomo桌面DNS专题,含配置片段与验证方法 |
| cfa-android-legacy | 206 / Android(数据库名Andorid) | Clash Meta for Android 使用教程:导入订阅、选择节点与连接 | `/a/m169.html` | [clash-meta-android.md](tutorials/clash-meta-android.md);本地API版本6 | Android Clash配置入门;`#install` 安装、`#import` 导入;按MetaCubeX v2.11.36核对,保留原键和URL |
| quantumult-ios-legacy | 207 / iOS(数据库名Ios) | Quantumult X 使用教程:iOS 安装、订阅导入与连接 | `/a/m170.html` | [quantumult-x-ios.md](tutorials/quantumult-x-ios.md);本地API版本5 | iPhone/iPad入门;区分原生资源与本站通用订阅,#parser 解释第三方资源解析器,#import 导入;无真机实测 |
| v2rayng-android-legacy | 208 / Android(数据库名Andorid) | v2rayNG 使用教程:Android 安装、导入订阅与连接 | `/a/m171.html` | [v2rayng-android.md](tutorials/v2rayng-android.md);本地API版本7 | Android入门;`#install` 下载、`#import` 订阅导入;保留既有内容键和URL |
| clashx-mac-legacy | 209 / Mac | Mac 代理客户端下载指南:ClashX 与 Clash Verge Rev 怎么选 | `/a/m172.html` | [mac-client-guide.md](tutorials/mac-client-guide.md);本地API版本5 | Mac选型与官方下载;#download 核对系统与芯片,链接实际安装教程;旧ClashX原入口不可核验不等于所有分支失效 |
| 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` 排错;三张流程图 |
| verge-windows-start | 362 / 进阶教程 | Clash Verge Rev 使用教程:从安装到第一次连接(Windows) | `/a/clash-verge-rev-windows.html` | [windows.md](tutorials/windows.md);本地API版本5 | Windows新用户操作入口;下载段落锚点为 `#install` |
| cfw-to-verge | 212 / 进阶教程 | 从 Clash for Windows 迁移到 Clash Verge Rev | `/a/m167.html` | [migration.md](tutorials/migration.md);本地API版本5 | 保留旧配置并更换客户端;不作为纯入门入口 |
| mihomo-dns | 361 / 进阶教程 | Clash 进阶:DNS 防泄漏配置与验证 | `/a/mihomo-dns-leak.html` | [dns.md](tutorials/dns.md);本地API版本6 | Mihomo桌面DNS专题,含配置片段与验证方法 |
| cfa-android-legacy | 206 / 进阶教程 | Clash Meta for Android 使用教程:导入订阅、选择节点与连接 | `/a/m169.html` | [clash-meta-android.md](tutorials/clash-meta-android.md);本地API版本7 | Android Clash配置入门;`#install` 安装、`#import` 导入;按MetaCubeX v2.11.36核对,保留原键和URL |
| quantumult-ios-legacy | 207 / 进阶教程 | Quantumult X 使用教程:iOS 安装、订阅导入与连接 | `/a/m170.html` | [quantumult-x-ios.md](tutorials/quantumult-x-ios.md);本地API版本6 | iPhone/iPad入门;区分原生资源与本站通用订阅,#parser 解释第三方资源解析器,#import 导入;无真机实测 |
| v2rayng-android-legacy | 208 / 进阶教程 | v2rayNG 使用教程:Android 安装、导入订阅与连接 | `/a/m171.html` | [v2rayng-android.md](tutorials/v2rayng-android.md);本地API版本8 | Android入门;`#install` 下载、`#import` 订阅导入;保留既有内容键和URL |
| clashx-mac-legacy | 209 / 进阶教程 | Mac 代理客户端下载指南:ClashX 与 Clash Verge Rev 怎么选 | `/a/m172.html` | [mac-client-guide.md](tutorials/mac-client-guide.md);本地API版本6 | Mac选型与官方下载;#download 核对系统与芯片,链接实际安装教程;旧ClashX原入口不可核验不等于所有分支失效 |
| cfw-mac-legacy | 210 / 进阶教程 | Clash Verge Rev 使用教程:Mac 安装、订阅与系统代理 | `/a/m173.html` | [verge-mac.md](tutorials/verge-mac.md);本地API版本3 | Mac操作入口;#install DMG安装,#import 订阅,系统代理与退出排错;无设备联网实测 |
| cfw-linux-legacy | 211 / 进阶教程 | Clash Verge Rev 使用教程:Linux 安装、订阅与代理设置 | `/a/m174.html` | [verge-linux.md](tutorials/verge-linux.md);本地API版本6 | 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-11-03本地ID366/版本2,正式ID382/版本2已发布(补测速入口) | 模式选择与代理组分流;`#groups` 组内选择、`#custom` 添加规则、`#verify` 验证新连接 |
| clash-node-performance | 377 / 进阶教程 | 节点延迟低,为什么还是慢?Clash 测速与选节点指南 | `/a/clash-node-speed-test.html` | [node-performance.md](tutorials/node-performance.md);2026-11-03本地ID377/版本1,正式ID399/版本1已发布 | 延迟、吞吐量与稳定性;`#compare` 控制条件比较、`#auto` 自动选择边界、`#timeout` 超时排查;双比例纸艺图与两组HTML图解 |
| free-nodes-explained | 375 / 新手教程(client) | 免费节点是什么?能用来做什么?给第一次接触的人看 | `/a/free-nodes-explained.html` | [free-nodes-explained.md](tutorials/newcomer/free-nodes-explained.md);本地API版本2(日常网页场景);2026-11-03正式ID397/版本1已发布并置顶 | 零基础概念说明;`#what` 中转机制、`#uses` 用途、`#three-things` 客户端/节点/订阅、`#start` 下一步。免费节点详情页自动关联。 |
| shadowrocket-id-explained | 376 / 新手教程(client) | 免费小火箭 ID 是什么?账号、客户端和节点有什么区别? | `/a/shadowrocket-id-explained.html` | [shadowrocket-id-explained.md](tutorials/newcomer/shadowrocket-id-explained.md);本地API版本1;2026-11-03正式ID398/版本1已发布并置顶 | 解释 App Store 账号用途;`#difference` 概念区分、`#where` 与 iCloud 区别、`#resource-page` 账号页字段、`#installed` 安装后需要节点。免费小火箭ID详情页自动关联。 |
| newcomer-start | 373 / 新手教程(client) | 新手指引:从免费订阅到第一次连接 | `/a/getting-started.html` | [start.md](tutorials/newcomer/start.md);本地API版本4(补基础说明入口);2026-11-03正式ID393/版本2已发布 | 先选设备,再下载安装、导入对应格式的免费订阅并连接。Windows、Mac、安卓、iPhone、Linux和路由器的入口都在这里。 |
| newcomer-windows | 374 / 新手教程(windows) | Windows 新手教程:用 Clash Verge Rev 连接免费节点 | `/a/windows-free-nodes.html` | [windows.md](tutorials/newcomer/windows.md);本地API版本3(双比例配图);2026-11-02正式ID394/版本1已发布 | 从选择 Windows 安装包开始,复制本站 Clash 订阅、选中配置与节点,再开启系统代理完成第一次连接。 |
| newcomer-mac | 371 / 新手教程(mac) | Mac 新手教程:安装 Clash Verge Rev 并导入免费订阅 | `/a/mac-free-nodes.html` | [mac.md](tutorials/newcomer/mac.md);本地API版本3(双比例配图);2026-11-02正式ID391/版本1已发布 | 区分 Apple 芯片和 Intel 安装包,将应用放入应用程序,导入 Clash 订阅并开启系统代理。 |
| newcomer-android | 367 / 新手教程(andorid) | Android 新手教程:用 FlClash 导入免费订阅 | `/a/android-flclash.html` | [android.md](tutorials/newcomer/android.md);本地API版本3(双比例配图);2026-11-02正式ID387/版本1已发布 | 在安卓手机安装 FlClash,导入 Clash 格式订阅、选择节点并允许 VPN 连接,附后台断连排查。 |
| newcomer-ios | 369 / 新手教程(ios) | iPhone / iPad 新手教程:用 Hiddify 连接免费节点 | `/a/ios-hiddify.html` | [ios.md](tutorials/newcomer/ios.md);本地API版本3(双比例配图);2026-11-02正式ID389/版本1已发布 | 从 App Store 安装 Hiddify,添加本站订阅、允许 VPN 配置并检查连接,说明订阅更新与节点切换。 |
| newcomer-linux | 370 / 新手教程(linux) | Linux 新手教程:在桌面环境使用 Clash Verge Rev | `/a/linux-free-nodes.html` | [linux.md](tutorials/newcomer/linux.md);本地API版本3(双比例配图);2026-11-02正式ID390/版本1已发布 | 按发行版和 CPU 架构选择安装包,导入免费订阅、开启系统代理,并区分浏览器与终端的连接方式。 |
| newcomer-router | 372 / 新手教程(client) | 路由器新手教程:用 OpenClash 导入免费订阅 | `/a/router-openclash.html` | [router.md](tutorials/newcomer/router.md);本地API版本3(双比例配图);2026-11-02正式ID392/版本1已发布 | 在兼容的 OpenWrt 路由器上安装插件与内核、添加 Clash 订阅、启用配置,再检查设备是否经过这台路由器。 |
| newcomer-clients | 368 / 新手教程(client) | 客户端下载与选择:按设备找到适合的软件 | `/a/proxy-clients.html` | [clients.md](tutorials/newcomer/clients.md);本地API版本3(Resource 优先下载);2026-11-03正式ID388/版本2已发布并置顶 | 按系统和架构选择客户端,优先提供本站资源下载入口,并连接到各平台的新手教程。 |
这里只登记长期编辑内容及值得复用的稳定资源说明,不逐条收录日更节点或账号文章。稳定入口为 `/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)。
2026-11-03周期首篇测速教程正式ID399/版本1已发布,规则模式旧文升至版本2。发布、配图、点赞与验收见[测速教程发布记录](../maintenance/NODE_PERFORMANCE_2026-11-03.md)。
这里只登记长期编辑内容及值得复用的稳定资源说明,不逐条收录日更节点或账号文章。当前本地/正式稳定入口为 `/`(免费节点)、`/shadowrocketids`(免费小火箭ID)、`/history/freenode` 与 `/history/shadowrocketids`(对应往期)、`/client`(新手教程)、`/advanced`(进阶教程)。2026-11-03入口/往期调整已上线,实施及部署边界见[SEO实施维护](../maintenance/SEO_IMPLEMENTATION_2026-10-31.md#稳定入口与往期内容2026-11-02已本地实施未发布);平台入口和名称修改另按项目路由核对,不从名称自行拼接。
2026-10-29部署边界更新:上表10篇已通过本站API迁移到独立test并经用户确认后切到正式cfn,旧URL保留;生产发布以预览实际正文冻结再发布,未用test整库覆盖。test和生产的临时编辑密钥均在迁移后删除,接口默认关闭;后续本地写作继续使用本地API,正式编辑按明确任务与生产绑定启用。实际部署及验收统一见[发布记录](../maintenance/RELEASE_PREFLIGHT_2026-10-28.md#正式切换2026-10-29),上表ID仍为本地ID。
2026-11-02本地入口调整后,新稿获取当前免费节点链接 `/`,当前小火箭ID链接 `/shadowrocketids`;往期使用相应history地址。`/freenode` 本地已改为301至首页,正式环境尚未随本次调整。下表保留旧文实际内链事实,不因路由变化虚报正文已改;发布含history链接的新稿前须先确认目标环境已部署对应路由。
## 3 已有文章关系
以下为2026-10-28从本地数据库正文提取并核对源文件的**实际内链**,不是建议列表。箭头表示正文中有从来源到目标的链接;入向关系从本表反查,不另存一份容易失步的反向清单。
@@ -105,9 +167,34 @@ ## 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本地与正式已发布 |
| clash-node-performance | newcomer-start `#devices` / newcomer-clients `#verge` | 尚未导入订阅或需要安装时回到实际操作和Resource优先下载入口 | 2026-11-03本地与正式已发布 |
| clash-node-performance | clash-routing-modes `#groups` | 比较节点前固定实际命中的代理组与出口 | 2026-11-03本地与正式已发布 |
| clash-node-performance | system-proxy-vs-tun `#troubleshoot` | 连接列表找不到目标应用时检查接管 | 2026-11-03本地与正式已发布 |
| clash-node-performance | free-nodes-explained `#free` | 解释免费节点可用性与负载变化 | 2026-11-03本地与正式已发布 |
| clash-routing-modes | clash-node-performance `#compare` | 自动选择说明之后补充延迟低但下载慢的对比方法 | 2026-11-03本地与正式已发布 |
两篇Android教程通过订阅格式段落互链;Mac下载指南与操作教程互链,Linux从下载指南和真实Linux栏目获得入口,iOS沿用真实iOS栏目入口。系统代理与TUN专题由Windows和DNS正文提供入口,并指向三平台的基础操作及DNS专题。目录、标签、导航和热门榜不算正文关联;正文内链及锚点已经本地HTTP验证。
### 新手教程新增关系(2026-11-01建立,2026-11-02正式发布)
| 来源内容键 | 实际目标 | 用途 / 位置 |
| --- | --- | --- |
| newcomer-start | `/a/windows-free-nodes.html`、`/a/mac-free-nodes.html`、`/a/android-flclash.html`、`/a/ios-hiddify.html`、`/a/linux-free-nodes.html`、`/a/router-openclash.html`、`/a/proxy-clients.html`、`/`、`/a/system-proxy-vs-tun.html#choose`、`/a/clash-rule-global-direct.html`、`/advanced` | 正文中的获取订阅、设备操作、下载、专题与返回指引入口 |
| newcomer-windows | `/a/proxy-clients.html#verge`、`/`、`/a/system-proxy-vs-tun.html#choose`、`/a/clash-verge-rev-windows.html`、`/a/getting-started.html#devices` | 正文中的获取订阅、设备操作、下载、专题与返回指引入口 |
| newcomer-mac | `/a/proxy-clients.html#verge`、`/`、`/a/clash-rule-global-direct.html#groups`、`/a/system-proxy-vs-tun.html#choose`、`/a/m173.html`、`/a/getting-started.html#devices` | 正文中的获取订阅、设备操作、下载、专题与返回指引入口 |
| newcomer-android | `/a/proxy-clients.html#flclash`、`/`、`/a/m171.html#import`、`/a/getting-started.html#devices`、`/a/clash-rule-global-direct.html` | 正文中的获取订阅、设备操作、下载、专题与返回指引入口 |
| newcomer-ios | `/a/proxy-clients.html#ios`、`/`、`/a/getting-started.html#devices`、`/a/m170.html` | 正文中的获取订阅、设备操作、下载、专题与返回指引入口 |
| newcomer-linux | `/a/proxy-clients.html#verge`、`/`、`/a/m174.html#terminal`、`/a/system-proxy-vs-tun.html#choose`、`/a/getting-started.html#devices` | 正文中的获取订阅、设备操作、下载、专题与返回指引入口 |
| newcomer-router | `/a/getting-started.html#devices`、`/`、`/a/getting-started.html`、`/a/clash-rule-global-direct.html` | 正文中的获取订阅、设备操作、下载、专题与返回指引入口 |
| newcomer-clients | `/a/windows-free-nodes.html`、`/a/mac-free-nodes.html`、`/a/android-flclash.html`、`/a/ios-hiddify.html`、`/a/linux-free-nodes.html`、`/a/router-openclash.html`、`/a/m167.html`、`/a/m170.html#import`、`/a/m171.html`、`/a/m169.html`、`/a/getting-started.html#subscription` | 正文中的获取订阅、设备操作、下载、专题与返回指引入口 |
| 免费节点页面展示层 | `/a/getting-started.html` | 获取免费订阅标题下;旧版正文回退页在正文前;仅目标公开可用时显示 |
新手指引置顶于`/client`;2026-11-02本地已将客户端下载总览、免费节点说明、免费小火箭ID说明也设为置顶,四篇共同排在普通文章前。按既有置顶/时间/ID顺序,两篇基础说明当前在列表最前;既有指引与下载置顶保留。2026-11-03四篇置顶已正式生效。六个设备入口与下载总览均为真实已保存页面;原七篇移栏不改正文内链。
## 4 怎样安排链接
| 关系 | 典型写法与放置位置 | 目标选择 |
@@ -121,7 +208,9 @@ ## 4 怎样安排链接
### 下载文章的具体例子
**Mac已建立独立选型与下载指南**,可链接 `/a/m172.html#download`,其中也提供Mac安装与导入教程的入口。Windows当前可用目标仍是入门教程中的下载段落:
**跨平台下载入口已建立**:`/a/proxy-clients.html`,汇总六类设备的下载和对应新手操作入口;安装包按本节规则优先使用 Resource,商店及未收录软件使用官方入口。新文章优先引用这一下载入口的对应锚点。
**Mac另有独立选型与下载指南**,可链接 `/a/m172.html#download`,其中也提供Mac安装与导入教程的入口。Windows当前可用目标仍是入门教程中的下载段落:
```html
<a href="/a/clash-verge-rev-windows.html#install">Clash Verge Rev Windows 下载与安装步骤</a>
@@ -157,7 +246,16 @@ ## 6 登记规则与待补内容
| 主题 | 当前可用替代入口 | 处理条件 |
| --- | --- | --- |
| 其他平台独立下载/选型文章 | Mac已有 `/a/m172.html#download`;Windows入门 `#install` | 下载信息确有独立维护需要时再建立;与入门教程互相提供自然入口 |
| 更细的客户端选型专题 | 已有 `/a/proxy-clients.html` 跨平台下载入口 | 存在独立读者任务时再拆分,避免重复总览 |
| 订阅导入失败排查 | Windows入门的导入与常见问题段落 | 积累明确错误场景后再拆专题,避免重复原文 |
本次建立的是AI协作约定和已核实的关联索引,不是自动推荐程序、链接注入脚本或定时任务。正文关系变动时由执行写作的AI同任务更新本文。
### 资源概念说明与每日文章入口(2026-11-03,已发布)
- 免费节点详情页 → `/a/free-nodes-explained.html`;已有“新手指引”保留为“查看使用教程”次入口。节点说明版本2按用户最新要求采用普通网页打不开的日常场景,不再使用油管例子;原6个锚点保留。
- 免费小火箭 ID 详情页 → `/a/shadowrocket-id-explained.html`;解释账号用途,不在每日文章重复维护长篇教程。
- 两篇基础说明互链;共同链接下载总览、免费节点入口及新手指引。小火箭 ID 文还链接 `/shadowrocketids` 和 iPhone/Hiddify 教程;节点文链接规则模式说明。
- 现有 `/a/getting-started.html` 开头补两篇说明入口。上述路径由文章 API 同批校验,不编造未创建文章。
- 两类资源页的统一入口按 `config/tutorials.php` 的 `resource_explainers` 映射渲染,覆盖既有及未来每日文章;只对真实公开且属于新手栏目的目标展示链接。教程未发布或撤下时不输出死链,节点页可回退原新手指引。
- 后续涉及免费节点或小火箭 ID 的基础概念时复用这两篇,按读者任务自然内链。日更正文与复制载荷不做批量改写。实现、验收与回退见 [资源基础说明维护](../maintenance/RESOURCE_BASICS_2026-11-02.md)。
Binary file not shown.

After

Width:  |  Height:  |  Size: 670 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 826 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 834 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 MiB

@@ -0,0 +1,29 @@
{
"tool": "built-in image_gen",
"prompts": [
[
"nodes-cover",
"Use case: stylized-concept editorial illustration. Create a finished Chinese tutorial cover, landscape EXACT 3:2 aspect ratio. Topic: what free proxy nodes do, for absolute beginners. Handcrafted tactile papercraft collage and miniature diorama, torn fibrous paper, layered matte cardstock, sculpted volumes, soft directional shadows. An inventive aerial miniature parcel-transfer harbor: a small phone-shaped dock sends glowing cream paper envelopes along a curving teal river through a distinctive central transfer station to tiny distant website buildings; traffic path visibly connects phone, relay station, destination. Rich petrol teal, butter yellow, terracotta and ivory. High quality editorial illustration, asymmetrical composition, cohesive but NOT a device tray, NOT a road through mountains, NOT computer UI. Clear large Chinese title on top left exactly '免费节点是什么?'. No other labels except subtle legible bottom right watermark exactly 'clashfreenode.com'. Keep title and subject inside generous safe margins. No borders, no cropped text. Full bleed 1536x1024."
],
[
"ids-cover",
"Use case: stylized-concept editorial illustration. Finished Chinese beginner article cover EXACT landscape 3:2 ratio, full bleed 1536x1024. Topic shared Apple accounts for obtaining Shadowrocket app, clearly about app acquisition not network connectivity. Tactile papercraft collage with miniature 3D craft objects, visible paper fibers, folded matte card, warm soft directional shadows. A whimsical elegant miniature library-style app pickup counter: a single small cream identity ticket with a simple person silhouette lies beside a lilac smartphone; a mechanical paper arm places a square app tile with a tiny generic rocket into the phone. Abstract shelves and tactile checkered floor, mint, mauve, warm ivory and coral color palette. No real account credentials, no Apple logo, no real app screenshot, no mountains, no harbor or devices in trays. Creative asymmetrical camera perspective and strong readable subject. Large correct Chinese title exactly '小火箭 ID 是什么?'. Subtle bottom right watermark exactly 'clashfreenode.com'. Only these texts. Wide safe margins and no cropped lettering."
],
[
"nodes-hero",
"Use case stylized-concept. Create original full bleed VERY WIDE 2.4:1 horizontal editorial banner, target 1920x800. Chinese tutorial topic free proxy nodes as connection relays. Tactile torn-paper collage plus miniature 3D handcrafted diorama, layered fibrous paper, matte teal/ochre/ivory/terracotta, soft directional light and believable shadows. Design specifically for a low panoramic canvas, no cropping from a taller picture. A paper harbor cross-section spanning the entire width: on left a cream phone on a short jetty; at center a warm terracotta oval transfer pavilion with two arch openings; on right a group of little paper website buildings. A broad teal ribbon river carries bright folded envelope boats from phone through pavilion toward websites. One visible continuous route, explanatory visual metaphor not a technical network diagram. Title exactly '免费节点是什么?' on large ivory paper strip at upper left, crisp readable dark teal Chinese. Small discreet but readable watermark exactly 'clashfreenode.com' lower right. Keep entire phone, pavilion and destination visible within the short canvas. Do not add other text, logos or repeated device trays. No outer border."
],
[
"ids-hero",
"Use case stylized-concept. New full-bleed panoramic tutorial header VERY WIDE 2.4:1 target 1920x800. Tactile paper collage and miniature physical craft diorama with fibrous paper and folded cardstock, softly lit warm ivory, dusky mauve, pale mint and coral. Explain the theme obtaining a proxy app via an Apple account, not obtaining a network service. Independently designed long horizontal miniature app pickup counter scene: at left elegant large Chinese lettering exactly '小火箭 ID 是什么?'; below it a small generic identity ticket with person icon; center an ivory paper counter and open app drawer with a few square app tiles; right a lilac upright smartphone receives one tile bearing a simple generic small rocket carried by a small articulated paper arm. Warm miniature library shelves recede subtly behind, avoid crowded details. Foreground horizontal counter guides eye across scene, no tray arrangement, no mountains, no rivers. Entire scene composed for this short-wide frame. Bottom right watermark exactly 'clashfreenode.com', legible and discreet. No other text, no real logos or credentials, no crop of title, no borders."
],
[
"nodes-hero-final",
"Recompose this illustration for an output canvas with aspect ratio exactly 12:5 (2.4:1), 1920 pixels wide and 800 pixels high. Current canvas is too wide at 3:1. Make the canvas proportionally TALLER and rearrange content to fill that taller 12:5 composition naturally. Preserve Chinese title and watermark exactly, the same paper collage material, subject and palette. Do not stretch, crop off text, add borders or letterboxing. The canvas itself must be 12:5, not 3:1. Keep all lettering and all the important objects fully inside the canvas."
],
[
"ids-hero-final",
"Recompose this illustration for an output canvas with aspect ratio exactly 12:5 (2.4:1), 1920 pixels wide and 800 pixels high. Current canvas is too wide at 3:1. Make the canvas proportionally TALLER and rearrange content to fill that taller 12:5 composition naturally. Preserve Chinese title and watermark exactly, the same paper collage material, subject and palette. Do not stretch, crop off text, add borders or letterboxing. The canvas itself must be 12:5, not 3:1. Keep all lettering and all the important objects fully inside the canvas."
]
]
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

@@ -0,0 +1 @@
Create a polished website category masthead illustration. EXTRA-WIDE 21:9 composition, ideally 2100x900. Tactile papercraft collage and miniature three-dimensional diorama, clearly visible thick paper fibers and cut edges, layered construction, natural directional light and gentle shadows, editorial quality, rich but harmonious color. A friendly green Android-shaped folded paper robot carrying a small download parcel through a lively layered botanical paper garden, oversized leaves, terracotta paths, moss green and warm cream, playful but sophisticated. Distinctive complete scene composed for wide banner. Main recognizable platform subject in center and right, bottom-left 22 percent kept quiet for website's live category title. No written headings, no English slogan, no fake interface text. Only exact small watermark 'clashfreenode.com' in upper-right with safe margin, readable and understated. No border, no stock watermark, no repeated template, no photography.
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

@@ -0,0 +1 @@
Create a polished website category masthead illustration. EXTRA-WIDE 21:9 composition, ideally 2100x900. Tactile papercraft collage and miniature three-dimensional diorama, clearly visible thick paper fibers and cut edges, layered construction, natural directional light and gentle shadows, editorial quality, rich but harmonious color. A paper-crafted phone and tablet standing like clean archways in a sculptural lavender and peach courtyard, translucent vellum panels and small folded data ribbons connecting the two, soft lilac deep plum cream, axonometric. Distinctive complete scene composed for wide banner. Main recognizable platform subject in center and right, bottom-left 22 percent kept quiet for website's live category title. No written headings, no English slogan, no fake interface text. Only exact small watermark 'clashfreenode.com' in upper-right with safe margin, readable and understated. No border, no stock watermark, no repeated template, no photography.
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

@@ -0,0 +1 @@
Create a polished website category masthead illustration. EXTRA-WIDE 21:9 composition, ideally 2100x900. Tactile papercraft collage and miniature three-dimensional diorama, clearly visible thick paper fibers and cut edges, layered construction, natural directional light and gentle shadows, editorial quality, rich but harmonious color. A distinctive black-white-yellow paper penguin in a tiny crafted open-source workshop, cream paper terminal scroll, brass card gears and green tool drawers, long orderly workbench, forest green mustard black cream, intimate oblique view. Distinctive complete scene composed for wide banner. Main recognizable platform subject in center and right, bottom-left 22 percent kept quiet for website's live category title. No written headings, no English slogan, no fake interface text. Only exact small watermark 'clashfreenode.com' in upper-right with safe margin, readable and understated. No border, no stock watermark, no repeated template, no photography.
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

@@ -0,0 +1 @@
Create a polished website category masthead illustration. EXTRA-WIDE 21:9 composition, ideally 2100x900. Tactile papercraft collage and miniature three-dimensional diorama, clearly visible thick paper fibers and cut edges, layered construction, natural directional light and gentle shadows, editorial quality, rich but harmonious color. An elegant silver paper laptop on an organic terraced teal island, a delicate cream bridge carrying a red download package, ivory folded sails behind, restrained teal coral cream palette, low side angle. Distinctive complete scene composed for wide banner. Main recognizable platform subject in center and right, bottom-left 22 percent kept quiet for website's live category title. No written headings, no English slogan, no fake interface text. Only exact small watermark 'clashfreenode.com' in upper-right with safe margin, readable and understated. No border, no stock watermark, no repeated template, no photography.
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

@@ -0,0 +1 @@
Create a polished website category masthead illustration. EXTRA-WIDE 21:9 composition, ideally 2100x900. Tactile papercraft collage and miniature three-dimensional diorama, clearly visible thick paper fibers and cut edges, layered construction, natural directional light and gentle shadows, editorial quality, rich but harmonious color. A blue four-pane window-shaped paper portal, an inviting tiny desk and desktop monitor, keyboard keys becoming stepping stones towards a configuration gear, blue cream and warm amber, architectural perspective. Distinctive complete scene composed for wide banner. Main recognizable platform subject in center and right, bottom-left 22 percent kept quiet for website's live category title. No written headings, no English slogan, no fake interface text. Only exact small watermark 'clashfreenode.com' in upper-right with safe margin, readable and understated. No border, no stock watermark, no repeated template, no photography.
@@ -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。
Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

@@ -0,0 +1,3 @@
安卓开始使用
A lime-green phone tilted diagonally against midnight indigo, three paper-like configuration cards slide into phone and become an orange flowing connection ribbon; playful but mature geometric editorial illustration, energetic diagonals and spacious composition, no robot mascot.
Watermark: clashfreenode.com; imagegen; 2026-11-01
Binary file not shown.

After

Width:  |  Height:  |  Size: 491 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

@@ -0,0 +1 @@
Generate a single 1536x1024 landscape editorial cover. Material/style reference only: the attached image illustrates convincing thick paper cutouts, paper fibers, miniature constructed volumes, soft directional light, mature premium papercraft mixed-media art. DO NOT reuse its composition, boxes, devices, landscape wallpaper, botanical corners, or same color scheme. We need a radically distinct idea, camera view and spatial arrangement for each article, not a family of identical product trays. Physically credible handcrafted diorama and cut-paper collage, sophisticated tactile materials, no flat clip-art, no neon/sci-fi glossy 3D. Let the described subject fill the canvas, preserve safe text margins. Exact large readable heading: "Android 开始使用". Exact small readable watermark lower-right: "clashfreenode.com". No other text. Scene: DYNAMIC DIAGONAL CUT-PAPER CONVEYOR SCULPTURE, playful but mature. An articulate lime-green folded paper courier figure inspired by an Android robot stands at the center operating a red lever. Ochre paper conveyor bands deliver three large ivory configuration cards into a cobalt arched gateway bearing a simple power pictogram. Pink and lime palette with dark navy contrasts, tightly cropped action, realistic cardstock folds and shadows. No real phone, laptop, trays, trees or landscape screens.
Binary file not shown.

After

Width:  |  Height:  |  Size: 519 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

@@ -0,0 +1 @@
Redesign this approved papercraft article cover into a separate EXTRA-WIDE hero banner, EXACTLY about 2.4:1 aspect ratio, ideally 2400x1000. Keep its characteristic tactile paper fibers, folded card volumes, soft natural shadows, mature miniature diorama quality and topic identity. Recompose the artwork for the low-height wide canvas, NOT cropping, squeezing or letterboxing the supplied 3:2 picture. This hero must be clearly related to its thumbnail but use its own complete horizontal composition. All text, subject and watermark must fit with safe margins. Exact readable heading: "Android 开始使用". Exact understated watermark bottom-right: "clashfreenode.com". No other text. Green paper Android courier at left operating a red lever; three configuration cards travel along a long ochre conveyor into a navy power-symbol gateway at right. Wide lateral workshop, lower machine profile, title above the conveyor. Preserve vibrant pink/lime accents.
Binary file not shown.

After

Width:  |  Height:  |  Size: 513 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

@@ -0,0 +1,3 @@
客户端下载与选择
A vibrant overhead flat lay of phone, tablet, laptop and miniature router arranged like curated objects in a museum cabinet, each has a distinct colored tray and a small blank download tag, raspberry teal and warm cream, geometric paper collage, varied silhouettes.
Watermark: clashfreenode.com; imagegen; 2026-11-01
Binary file not shown.

After

Width:  |  Height:  |  Size: 552 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

@@ -0,0 +1 @@
Redesign this approved papercraft article cover into a separate EXTRA-WIDE hero banner, EXACTLY about 2.4:1 aspect ratio, ideally 2400x1000. Keep its characteristic tactile paper fibers, folded card volumes, soft natural shadows, mature miniature diorama quality and topic identity. Recompose the artwork for the low-height wide canvas, NOT cropping, squeezing or letterboxing the supplied 3:2 picture. This hero must be clearly related to its thumbnail but use its own complete horizontal composition. All text, subject and watermark must fit with safe margins. Exact readable heading: "客户端下载与选择". Exact understated watermark bottom-right: "clashfreenode.com". No other text. Paper product exhibition with phone, tablet, laptop and router in distinct colored cardstock trays. Recompose the trays across a wide staggered horizontal band, not a tall stacked arrangement. Teal, burgundy, mustard and cream palette. Keep device faces visible and paper landscape art inside their screens. Heading across upper-left cream space.
Binary file not shown.

After

Width:  |  Height:  |  Size: 341 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

@@ -0,0 +1,3 @@
iPhone / iPad 开始使用
Two elegant generic silver devices, a phone and tablet, resting among frosted glass lavender arches; an illuminated circular connection control and fine coral signal paths connect them to a pearl globe. Calm premium product editorial, violet and coral, generous negative space.
Watermark: clashfreenode.com; imagegen; 2026-11-01
Binary file not shown.

After

Width:  |  Height:  |  Size: 483 KiB

Loaded 100 of 291 files, more files were not shown because too many files have changed in this diff. Show more