Carbon Ads

Run ads at the bottom of the TOC section.

shadcn-docs-nuxt has built-in support for Carbon Ads. Add your Carbon Ads credentials to app.config.ts and ads will be displayed at the bottom of the toc section.

app.config.ts
export default defineAppConfig({
  shadcnDocs: {
    toc: {
      enable: true,
      carbonAds: {
        enable: true,
        code: 'your-carbon-code',
        placement: 'your-carbon-placement',
        format: 'your-carbon-format', // defaults to 'cover'
      },
    }
  },
});

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

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

Parameters

enableboolean
false
Whether to turn on Carbon Ads.
codestring
Carbon Ads code.
placementstring
Carbon Ads placement.
format'cover' | 'responsive'
cover
Carbon Ads format.