侧栏已独立出来并上线了。现在它是自成一路的第三个广告单元,和正文广告完全解耦。
后台多了什么
/theme-settings → 「资讯与文章」里新增一项 「侧栏广告位」,四选一:
| 选项 | 效果 |
|---|---|
| 自动(默认) | 沿用组合配置里的 sidebar.variant,且只在正文选「组合」时显示 = 升级前的行为 |
| 关闭 | 侧栏不显示广告 |
| 矩形卡片 300×250 | 强制矩形版式,与正文方案完全无关 —— 正文选「关闭」侧栏照样显示 |
| 原生信息流卡片 | 强制原生版式,同上 |
同时把原来那个下拉改名为 「正文广告方案」,combo 选项收窄成「正文广告位组合(横幅 + 底部横条)」——它现在只管正文那三个位置。
两种版式的内容仍在「组合广告位内容」的 sidebar.rect / sidebar.native 里,两份都还在(上面两张图就是同一篇文章切换的前后)。
一个字段都没删:sticky 键名、sidebar.variant 全部保留,你已保存的 article_ad_combo 原样继续工作。默认值特意用 auto 而不是 off —— 后台保存会把默认值一并写库,若默认给 off,你下次在后台改任何设置都会把线上侧栏广告顺手关掉。
验证(反向对照是关键)
| 项 | 结果 |
|---|---|
| 本地新镜像 | combo 37/37、topcard 6/6、off 6/6、sidebar-only 11/11、sidebar-off 8/8、sidebar-native 8/8 |
| 旧镜像跑同款新判据 | sidebar-only 3 FAIL(正文一关侧栏就跟着没)、sidebar-off 1 FAIL(关不掉)、sidebar-native 3 FAIL(切不了原生) |
线上(临时写一行 article_ad_sidebar) | off → 正文横幅+底部条照常渲染、侧栏两版式都不出现;native → 正文不动、侧栏切原生;删行后复验 37/37 |
| 单测 | 22 套件 / 185 用例全绿(新增 1 例) |
探针新增三档:--mode=sidebar-only|sidebar-off|sidebar-native,正好对应你的三条要求(独立开关 / 公文箱互不影响 / 二选一)。
发布
镜像 20261004-ad-sidebar-r1(web + api),.env.production 已写回(备份 bak-20261004175158,二次 up 幂等 Running)。三容器 healthy,/ /news /login /store /shows/19/49.html /content/111111 /news/category/zixun 全 200。两端 Created 逐字相同、RootFS web 9/9 / api 7/7。
服务器回收 web:…article-ad-combo-r2 与 api:…article-top-ad-r1 → 10 个标签、磁盘 89%(剩 8.0G)。探针容器、反代进程、headless Chrome、6 个临时 profile 全部清掉;手册(第 1 节版本表 + 第一百零一次记录 + 98 节口径补注 + 第 12 节探针登记 + 回收清单)、项目 memory 与今日日志已回填。
当前回滚点:web → 20261004-article-cover-slot-r1、api → 20261004-article-ad-bottom-r1(回滚即恢复「侧栏只在组合方案下出现」)。
一个提醒:线上现在没有这行配置(我探针用的临时行已删),所以下拉显示的是「自动」,观感和你之前一模一样。想切矩形/原生或单独特关侧栏,现在直接在后台选就行,不用再动 JSON。
<svg viewBox="0 0 680 500" width="100%" role="img" xmlns="http://www.w3.org/2000/svg">
<title>文章页结构:你红框的位置 vs 底部广告位的实际位置</title>
<desc>文章页从上到下依次是站头、正文横幅广告、正文、你红框的 34 像素空隙、分享按钮、评论区、上一篇下一篇、底部广告位、页脚。底部广告位实际渲染在评论区与上一篇下一篇之后。</desc>
<g>
<rect x="40" y="40" width="600" height="40" rx="8" fill="var(--color-background-secondary)" stroke="var(--color-border-tertiary)" stroke-width="0.5"/>
<text x="56" y="60" font-family="var(--font-sans)" font-size="13" fill="var(--color-text-primary)" dominant-baseline="central">站头 + 面包屑</text>
<text x="624" y="60" font-family="var(--font-mono)" font-size="12" fill="var(--color-text-tertiary)" text-anchor="end" dominant-baseline="central">0 – 291</text>
</g>
<g>
<rect x="40" y="88" width="600" height="40" rx="8" fill="var(--color-background-secondary)" stroke="#1D9E75" stroke-width="1" stroke-dasharray="4 3"/>
<text x="56" y="108" font-family="var(--font-sans)" font-size="13" fill="#1D9E75" dominant-baseline="central">正文横幅广告 · 正常显示(你截图 1 看到的)</text>
<text x="624" y="108" font-family="var(--font-mono)" font-size="12" fill="var(--color-text-tertiary)" text-anchor="end" dominant-baseline="central">291 – 399</text>
</g>
<g>
<rect x="40" y="136" width="600" height="40" rx="8" fill="var(--color-background-secondary)" stroke="var(--color-border-tertiary)" stroke-width="0.5"/>
<text x="56" y="156" font-family="var(--font-sans)" font-size="13" fill="var(--color-text-primary)" dominant-baseline="central">文章正文</text>
<text x="624" y="156" font-family="var(--font-mono)" font-size="12" fill="var(--color-text-tertiary)" text-anchor="end" dominant-baseline="central">399 – 2440</text>
</g>
<g>
<rect x="40" y="184" width="600" height="40" rx="8" fill="var(--color-background-secondary)" stroke="#E24B4A" stroke-width="1.5" stroke-dasharray="5 3"/>
<text x="56" y="204" font-family="var(--font-sans)" font-size="13" fill="#E24B4A" dominant-baseline="central">你红框的位置 · 正文与按钮之间的 34px 自然间距</text>
<text x="624" y="204" font-family="var(--font-mono)" font-size="12" fill="var(--color-text-tertiary)" text-anchor="end" dominant-baseline="central">2440 – 2474</text>
</g>
<g>
<rect x="40" y="232" width="600" height="40" rx="8" fill="var(--color-background-secondary)" stroke="var(--color-border-tertiary)" stroke-width="0.5"/>
<text x="56" y="252" font-family="var(--font-sans)" font-size="13" fill="var(--color-text-primary)" dominant-baseline="central">分享 / 收藏 / 点赞 / 复制链接</text>
<text x="624" y="252" font-family="var(--font-mono)" font-size="12" fill="var(--color-text-tertiary)" text-anchor="end" dominant-baseline="central">2474 – 2543</text>
</g>
<g>
<rect x="40" y="280" width="600" height="40" rx="8" fill="var(--color-background-secondary)" stroke="var(--color-border-tertiary)" stroke-width="0.5"/>
<text x="56" y="300" font-family="var(--font-sans)" font-size="13" fill="var(--color-text-primary)" dominant-baseline="central">评论区(434px 高)</text>
<text x="624" y="300" font-family="var(--font-mono)" font-size="12" fill="var(--color-text-tertiary)" text-anchor="end" dominant-baseline="central">2565 – 2999</text>
</g>
<g>
<rect x="40" y="328" width="600" height="40" rx="8" fill="var(--color-background-secondary)" stroke="var(--color-border-tertiary)" stroke-width="0.5"/>
<text x="56" y="348" font-family="var(--font-sans)" font-size="13" fill="var(--color-text-primary)" dominant-baseline="central">上一篇 / 下一篇</text>
<text x="624" y="348" font-family="var(--font-mono)" font-size="12" fill="var(--color-text-tertiary)" text-anchor="end" dominant-baseline="central">2999 – 3186</text>
</g>
<g>
<rect x="40" y="376" width="600" height="40" rx="8" fill="#E1F5EE" stroke="#0F6E56" stroke-width="1.5"/>
<text x="56" y="396" font-family="var(--font-sans)" font-size="13" fill="#04342C" dominant-baseline="central">底部广告位 · 实际渲染在这里(82px 高,通栏)</text>
<text x="624" y="396" font-family="var(--font-mono)" font-size="12" fill="#0F6E56" text-anchor="end" dominant-baseline="central">3226 – 3308</text>
</g>
<g>
<rect x="40" y="424" width="600" height="40" rx="8" fill="var(--color-background-secondary)" stroke="var(--color-border-tertiary)" stroke-width="0.5"/>
<text x="56" y="444" font-family="var(--font-sans)" font-size="13" fill="var(--color-text-primary)" dominant-baseline="central">页脚</text>
<text x="624" y="444" font-family="var(--font-mono)" font-size="12" fill="var(--color-text-tertiary)" text-anchor="end" dominant-baseline="central">3348 – 4070</text>
</g>
<line x1="24" y1="40" x2="24" y2="464" stroke="var(--color-border-tertiary)" stroke-width="0.5"/>
</svg>


