You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vitepress/docs/zh/reference/default-theme-carbon-ads.md

595 B

Carbon Ads

VitePress 内置了对 Carbon Ads 的原生支持。通过在配置中定义 Carbon Ads 凭据VitePress 将在页面上显示广告。

export default {
  themeConfig: {
    carbonAds: {
      code: 'your-carbon-code',
      placement: 'your-carbon-placement'
    }
  }
}

这些值用于调用 carbon CDN 脚本,如下所示。

`//cdn.carbonads.com/carbon.js?serve=${code}&placement=${placement}`

要了解有关 Carbon Ads 配置的更多信息,请访问 Carbon Ads 站点