Ads Demo V2 - JSON Driven

📋 关于此页面

这是新的广告演示系统,使用 AdRenderer 组件 和 JSON 数据驱动。

  • ✅ 模板统一: Astro 预览和 Edge Functions 使用相同的渲染函数
  • ✅ 数据驱动: 所有样式从 JSON 配置,无需手写 HTML
  • ✅ 支持 HTML: 标题、描述、特性都支持 HTML 样式
  • ✅ 深色模式: 支持独立的 dark logo

数据来源: docs/ads-kv-example-v2.json

中文广告 - 主样式 (Chinese Ads - Primary Style)

Variant ID: boltai-zh-v1 | Style: 1 | Version:
Sponsor Logo

Mac 原生 AI 客户端:聚合 GPT、Claude 及本地模型

Sponsor

BoltAI 将 GPT、Claude、Gemini 和 Ollama 本地模型集成到你的工作流中。支持屏幕感知与代码重构,真正属于开发者的原生神器。

🎉 优惠码: BFCM25 (51% OFF)
立即试用
Variant ID: boltai-zh-v2 | Style: 1 | Version:
Sponsor Logo

BoltAI - 开发者的 AI 神器

Sponsor

原生 macOS 应用,无缝整合多个 AI 模型。一键重构代码,智能理解屏幕内容,让 AI 真正成为你的编程助手。

🚀 限时优惠 51% OFF
免费下载
Variant ID: proxyman-zh-v1 | Style: 1 | Version:
Sponsor Logo

Proxyman - 原生 macOS 网络调试代理

Sponsor

告别手动证书配置。Proxyman 使用 Atlantis 框架自动捕获和解密 HTTPs 流量。原生应用,高性能,专为 Apple Silicon 打造。

🚀 功能: 零配置调试
免费下载
Variant ID: example-zh-v1 | Style: 1 | Version:
Sponsor Logo

示例产品 - 无促销活动

Sponsor

这是一个没有特殊促销信息的广告示例。依然保持简洁优雅的展示效果。

了解更多

中文广告 - 副样式 (Chinese Ads - Secondary Style)

暂无副样式广告

英文广告 - 主样式 (English Ads - Primary Style)

Variant ID: boltai-en-v1 | Style: 1 | Version:
Sponsor Logo

Native macOS AI Client: GPT, Claude, Gemini & Local Models

SPONSOR

BoltAI integrates GPT, Claude, Gemini, and Ollama local models directly into your workflow. Features screen context awareness and code refactoring — built for developers.

🎉 Code: BFCM25 (51% OFF)
Try it now
Variant ID: boltai-en-v2 | Style: 1 | Version:
Sponsor Logo

BoltAI - AI Assistant for Developers

SPONSOR

Native macOS app that brings multiple AI models to your fingertips. Refactor code with one click, understand screen context intelligently.

🚀 Limited Offer: 51% OFF
Free Download
Variant ID: proxyman-en-v1 | Style: 1 | Version:
Sponsor Logo

Native macOS Web Debugging Proxy

SPONSOR

Stop manual certificate configuration. Proxyman uses the Atlantis framework to capture and decrypt HTTPs traffic automatically. Native, high-performance, and built for Apple Silicon.

🚀 Feature: Zero-Config Debugging
Free Download
Variant ID: example-en-v1 | Style: 1 | Version:
Sponsor Logo

Example Product - No Promotion

SPONSOR

This is an example ad without special promotional features. Still maintains a clean and elegant display.

Learn More

英文广告 - 副样式 (English Ads - Secondary Style)

No secondary style ads available

默认广告 (Default Fallback Ads)

Default ZH: default-zh
Sponsor Logo

在此投放广告,触达 Swift 开发者

示例赞助商

在博客和周刊中推广您的框架、工具、服务或应用,精准触达高度专注的 iOS 和 Swift 开发者受众。

成为赞助商
Default EN: default-en
Sponsor Logo

Reach Swift Developers. Share Your Product.

Example Sponsor

Promote your framework, tool, service, or app to a highly targeted iOS & Swift developer audience across blog and newsletter placements.

Become a sponsor

🔧 技术架构

1. 共享模板函数 functions/_shared/ad-renderer.js → renderAd(adData, lang)
2. Astro 组件封装 src/components/widgets/AdRenderer.astro
3. Edge Function 测试页 http://localhost:8089/test-ad-render?variant=0&lang=zh
下一步:
  • 实现 /ads-v2 Edge Function (带日期调度逻辑)
  • 在 KV 中存储广告数据
  • 更新前端 AdsLoader 调用新 API