# Carbon Ads

VitePress has built in native support for [Carbon Ads](https://www.carbonads.net/). By defining the Carbon Ads credentials in config, VitePress will display ads on the page.

```js
export default {
  themeConfig: {
    carbonAds: {
      code: 'your-carbon-code',
      placement: 'your-carbon-placement',
      format: 'classic'
    }
  }
}
```

These values are used to call carbon CDN script as shown below.

The `format` option supports `classic`, `responsive`, and `cover`.

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

To learn more about Carbon Ads configuration, please visit [Carbon Ads website](https://www.carbonads.net/).

## Related pages

- [Default Theme Config](./reference-default-theme-config.md)
- [Nav](./reference-default-theme-nav.md)
- [Sidebar](./reference-default-theme-sidebar.md)
- [Home Page](./reference-default-theme-home-page.md)
- [Footer](./reference-default-theme-footer.md)
- [Layout](./reference-default-theme-layout.md)
- [Badge](./reference-default-theme-badge.md)
- [Team Page](./reference-default-theme-team-page.md)
- [Prev Next Links](./reference-default-theme-prev-next-links.md)
- [Edit Link](./reference-default-theme-edit-link.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
