Carbon Ads

Run ads at the bottom of the TOC section.

shadcn-docs-nuxt uses Nuxt Scripts under the hood 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,
        disableInDev: false,
        disableInMobile: false,
        fallback: false, // whether to show fallback message when blocked by ad blockers
        code: 'your-carbon-code', // aka the 'serve' code
        placement: 'your-carbon-placement',
        format: 'your-carbon-format', // defaults to 'cover'
      },
    }
  },
});

Disabling on certain pages

---
title: Page Title
toc:
  carbonAds:
    enable: false
---

<!-- Page Content -->

Parameters

enableboolean
false
Whether to turn on Carbon Ads.
disableInDevboolean
false
Whether to disable Carbon Ads in dev environment.
disableInMobileboolean
false
Whether to disable Carbon Ads on mobile.
fallbackboolean
false
Whether to show fallback message when blocked by ad blockers
fallbackMessagestring
'Please support us by disabling your ad blocker.'
Fallback message.
codestring
Carbon Ads serve code.
placementstring
Carbon Ads placement.
format'cover' | 'responsive'
cover
Carbon Ads format.