-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: show carbon ads when toc is empty
Signed-off-by: ZTL-UwU <[email protected]>
- Loading branch information
Showing
3 changed files
with
104 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: Carbon Ads | ||
icon: lucide:chart-line | ||
description: Run ads at the bottom of the TOC section. | ||
--- | ||
|
||
**shadcn-docs-nuxt** has built-in support for [Carbon Ads](https://www.carbonads.net/). Add your Carbon Ads credentials to `app.config.ts` and ads will be displayed at the bottom of the toc section. | ||
|
||
```ts [app.config.ts] | ||
export default defineAppConfig({ | ||
shadcnDocs: { | ||
toc: { | ||
enable: true, | ||
carbonAds: { | ||
enabled: true, | ||
code: 'your-carbon-code', | ||
placement: 'your-carbon-placement' | ||
}, | ||
} | ||
}, | ||
}); | ||
``` | ||
|
||
These values are used to call carbon CDN script as shown below. | ||
|
||
```ts | ||
`//cdn.carbonads.com/carbon.js?serve=${code}&placement=${placement}`; | ||
``` | ||
|
||
:read-more{title="Carbon Ads website" to="https://www.carbonads.net/"} |