@wordup-md/nuxt-layer-shadcn-unocss 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cursor/rules/active-context-rule.mdc +8 -0
- package/.cursor/rules/memory-bank-overview.mdc +17 -0
- package/.cursor/rules/product-context-rule.mdc +8 -0
- package/.cursor/rules/progress-rule.mdc +8 -0
- package/.cursor/rules/projectbrief-rule.mdc +8 -0
- package/.cursor/rules/system-patterns-rule.mdc +8 -0
- package/.cursor/rules/tech-context-rule.mdc +8 -0
- package/.cursorrules +52 -0
- package/.editorconfig +12 -0
- package/.nuxtrc +1 -0
- package/.playground/app.config.ts +189 -0
- package/.playground/assets/style.css +15 -0
- package/.playground/components/content/MdcExample.vue +81 -0
- package/.playground/components/content/MdcReplay.vue +319 -0
- package/.playground/content/1.getting-started/1.introduction.md +8 -0
- package/.playground/content/1.getting-started/2.writing/1.markdown.md +56 -0
- package/.playground/content/1.getting-started/2.writing/2.pages.md +177 -0
- package/.playground/content/1.getting-started/2.writing/3.folders.md +56 -0
- package/.playground/content/1.getting-started/2.writing/_dir.yml +3 -0
- package/.playground/content/1.getting-started/_dir.yml +3 -0
- package/.playground/content/2.content-elements/1.text-formatting.md +60 -0
- package/.playground/content/2.content-elements/10.horizontal-rule.md +25 -0
- package/.playground/content/2.content-elements/11.tables.md +25 -0
- package/.playground/content/2.content-elements/12.overview.md +93 -0
- package/.playground/content/2.content-elements/13.text-components.md +36 -0
- package/.playground/content/2.content-elements/2.headings.md +32 -0
- package/.playground/content/2.content-elements/3.paragraphs.md +39 -0
- package/.playground/content/2.content-elements/4.lists.md +37 -0
- package/.playground/content/2.content-elements/5.links.md +17 -0
- package/.playground/content/2.content-elements/6.images.md +17 -0
- package/.playground/content/2.content-elements/7.blockquotes.md +17 -0
- package/.playground/content/2.content-elements/8.code-blocks.md +141 -0
- package/.playground/content/2.content-elements/9.inline-code.md +21 -0
- package/.playground/content/2.content-elements/_dir.yml +3 -0
- package/.playground/content/2.content-elements/index.md +8 -0
- package/.playground/content/3.components/1.index.md +187 -0
- package/.playground/content/3.components/2.docs/_dir.yml +3 -0
- package/.playground/content/3.components/2.docs/alert.md +152 -0
- package/.playground/content/3.components/2.docs/badge.md +131 -0
- package/.playground/content/3.components/2.docs/button-link.md +53 -0
- package/.playground/content/3.components/2.docs/callout.md +16 -0
- package/.playground/content/3.components/2.docs/code-group.md +77 -0
- package/.playground/content/3.components/2.docs/code-snippet.md +129 -0
- package/.playground/content/3.components/2.docs/field-group.md +62 -0
- package/.playground/content/3.components/2.docs/field.md +39 -0
- package/.playground/content/3.components/2.docs/file-tree.md +144 -0
- package/.playground/content/3.components/2.docs/icon.md +94 -0
- package/.playground/content/3.components/2.docs/pm.md +67 -0
- package/.playground/content/3.components/2.docs/read-more.md +44 -0
- package/.playground/content/3.components/2.docs/shortcut.md +36 -0
- package/.playground/content/3.components/2.docs/stack.md +81 -0
- package/.playground/content/3.components/2.docs/steps.md +148 -0
- package/.playground/content/3.components/2.docs/tabs.md +375 -0
- package/.playground/content/3.components/3.page/_dir.yml +2 -0
- package/.playground/content/3.components/3.page/accordion.md +74 -0
- package/.playground/content/3.components/3.page/card-group.md +115 -0
- package/.playground/content/3.components/3.page/card.md +142 -0
- package/.playground/content/3.components/3.page/collapsible.md +61 -0
- package/.playground/content/3.components/3.page/hero-alt.md +118 -0
- package/.playground/content/3.components/3.page/hero.md +60 -0
- package/.playground/content/3.components/3.page/team-card.md +82 -0
- package/.playground/content/3.components/_dir.yml +2 -0
- package/.playground/content/4.development/1.configuration/1.overview.md +297 -0
- package/.playground/content/4.development/1.configuration/2.nuxt-content.md +105 -0
- package/.playground/content/4.development/1.configuration/3.og-image.md +86 -0
- package/.playground/content/4.development/1.configuration/4.edit-link.md +63 -0
- package/.playground/content/4.development/1.configuration/5.banner.md +52 -0
- package/.playground/content/4.development/1.configuration/6.carbon-ads.md +65 -0
- package/.playground/content/4.development/1.configuration/7.umami.md +41 -0
- package/.playground/content/4.development/1.configuration/_dir.yml +3 -0
- package/.playground/content/4.development/2.advanced/1.override.md +49 -0
- package/.playground/content/4.development/2.advanced/2.math.md +89 -0
- package/.playground/content/4.development/2.advanced/_dir.yml +3 -0
- package/.playground/content/4.development/3.themes.md +9 -0
- package/.playground/content/4.development/4.composables.md +38 -0
- package/.playground/content/4.development/5.installation.md +36 -0
- package/.playground/content/4.development/_dir.yml +3 -0
- package/.playground/content/_menu-footer.md +5 -0
- package/.playground/content/index.md +67 -0
- package/.playground/content/test-card.md +187 -0
- package/.playground/content/test.md +88 -0
- package/.playground/content/test2.md +12 -0
- package/.playground/content/test3.md +187 -0
- package/.playground/nuxt.config.ts +52 -0
- package/.playground/public/banner-preview.png +0 -0
- package/.playground/public/favicon.ico +0 -0
- package/.playground/public/front-matter-showcase/authors.png +0 -0
- package/.playground/public/front-matter-showcase/badges.png +0 -0
- package/.playground/public/front-matter-showcase/nav-badges.png +0 -0
- package/.playground/public/hero.png +0 -0
- package/.playground/public/logo-dark.svg +12 -0
- package/.playground/public/logo.svg +12 -0
- package/.playground/public/og-nuxt-seo.png +0 -0
- package/.playground/public/og-nuxt.png +0 -0
- package/.playground/public/og-shadcn-docs-dark.png +0 -0
- package/.playground/public/og-shadcn-docs.png +0 -0
- package/.playground/public/sidebar-default.png +0 -0
- package/.playground/public/sidebar-group.png +0 -0
- package/.playground/public/sidebar-tree.png +0 -0
- package/.playground/uno.config.ts +16 -0
- package/README.md +93 -0
- package/app.vue +59 -0
- package/assets/css/a11y.css +48 -0
- package/assets/css/mdc-editor.css +91 -0
- package/components/A11yModeToggle.vue +23 -0
- package/components/DarkModeToggle.vue +26 -0
- package/components/LinkIcon.vue +32 -0
- package/components/OgImage/ShadcnDocs.vue +55 -0
- package/components/ThemeCustomizer.vue +156 -0
- package/components/ThemePopover.vue +27 -0
- package/components/content/Accordion.vue +18 -0
- package/components/content/AccordionItem.vue +32 -0
- package/components/content/Alert.vue +100 -0
- package/components/content/Badge.vue +52 -0
- package/components/content/ButtonLink.vue +38 -0
- package/components/content/Callout.vue +17 -0
- package/components/content/Card.vue +173 -0
- package/components/content/CardGroup.vue +38 -0
- package/components/content/CodeCopy.vue +52 -0
- package/components/content/CodeGroup._vue +27 -0
- package/components/content/CodeSnippet._vue +78 -0
- package/components/content/Collapsible.vue +80 -0
- package/components/content/Field.vue +53 -0
- package/components/content/FieldGroup.vue +5 -0
- package/components/content/FileTree.vue +110 -0
- package/components/content/FileTreeItem.vue +64 -0
- package/components/content/FileTreeRoot.vue +27 -0
- package/components/content/Hero.vue +154 -0
- package/components/content/HeroAlt.vue +116 -0
- package/components/content/Icon.vue +69 -0
- package/components/content/Kbd.vue +20 -0
- package/components/content/PmInstall.vue +35 -0
- package/components/content/PmRun.vue +31 -0
- package/components/content/PmX.vue +31 -0
- package/components/content/ProseA.vue +21 -0
- package/components/content/ProseBlockquote.vue +5 -0
- package/components/content/ProseCode.vue +121 -0
- package/components/content/ProseCodeInline.vue +24 -0
- package/components/content/ProseEm.vue +5 -0
- package/components/content/ProseH1.vue +27 -0
- package/components/content/ProseH2.vue +22 -0
- package/components/content/ProseH3.vue +21 -0
- package/components/content/ProseH4.vue +21 -0
- package/components/content/ProseH5.vue +21 -0
- package/components/content/ProseH6.vue +21 -0
- package/components/content/ProseHr.vue +3 -0
- package/components/content/ProseImg.vue +42 -0
- package/components/content/ProseLi.vue +5 -0
- package/components/content/ProseOl.vue +5 -0
- package/components/content/ProseP.vue +5 -0
- package/components/content/ProsePre.vue +56 -0
- package/components/content/ProseSection.vue +27 -0
- package/components/content/ProseStrong.vue +5 -0
- package/components/content/ProseTable.vue +7 -0
- package/components/content/ProseTbody.vue +5 -0
- package/components/content/ProseTd.vue +5 -0
- package/components/content/ProseTh.vue +5 -0
- package/components/content/ProseThead.vue +5 -0
- package/components/content/ProseTr.vue +5 -0
- package/components/content/ProseUl.vue +5 -0
- package/components/content/ReadMore.vue +41 -0
- package/components/content/Shortcut.vue +20 -0
- package/components/content/Stack.vue +17 -0
- package/components/content/Steps.vue +23 -0
- package/components/content/Tabs.vue +52 -0
- package/components/content/TabsInner.vue +263 -0
- package/components/content/TeamCard.vue +52 -0
- package/components/content/TeamCardGroup.vue +5 -0
- package/components/content/global/AlertEditor.vue +58 -0
- package/components/content/global/BadgeEditor.vue +56 -0
- package/components/content/global/BrEditor.vue +3 -0
- package/components/content/global/CardEditor.vue +142 -0
- package/components/content/global/CardGroupEditor.vue +50 -0
- package/components/content/global/CodeGroup.vue +13 -0
- package/components/content/global/CodeGroupEditor.vue +50 -0
- package/components/content/global/DivEditor.vue +22 -0
- package/components/content/global/FieldEditor.vue +38 -0
- package/components/content/global/FieldGroupEditor.vue +24 -0
- package/components/content/global/HeroEditor.vue +67 -0
- package/components/content/global/ProseSectionEditor.vue +180 -0
- package/components/content/global/ReadMoreEditor.vue +70 -0
- package/components/content/global/SectionEditor.vue +22 -0
- package/components/content/global/StackEditor.vue +35 -0
- package/components/content/global/StepsEditor.vue +55 -0
- package/components/content/global/Tabs._vue +97 -0
- package/components/content/global/TabsEditor.vue +38 -0
- package/components/layout/Aside.vue +83 -0
- package/components/layout/AsideTree.vue +25 -0
- package/components/layout/AsideTreeItem.vue +86 -0
- package/components/layout/AsideTreeItemButton.vue +32 -0
- package/components/layout/Banner.vue +77 -0
- package/components/layout/Breadcrumb.vue +34 -0
- package/components/layout/DocsFooter.vue +6 -0
- package/components/layout/EditLink.vue +23 -0
- package/components/layout/Footer.vue +80 -0
- package/components/layout/FooterItem.vue +50 -0
- package/components/layout/FooterSubmenuItem.vue +39 -0
- package/components/layout/Header/Logo.vue +30 -0
- package/components/layout/Header/MenuItem.vue +83 -0
- package/components/layout/Header/Nav.vue +112 -0
- package/components/layout/Header/NavMobile.vue +14 -0
- package/components/layout/Header/NavMobileItem.vue +79 -0
- package/components/layout/Header/SubmenuItem.vue +39 -0
- package/components/layout/Header.vue +160 -0
- package/components/layout/LangSwitcher.vue +90 -0
- package/components/layout/MobileNav.vue +44 -0
- package/components/layout/PrevNext.vue +24 -0
- package/components/layout/PrevNextButton.vue +50 -0
- package/components/layout/SearchButton.vue +46 -0
- package/components/layout/SearchDialog.vue +217 -0
- package/components/layout/Title.vue +98 -0
- package/components/layout/Toc.vue +99 -0
- package/components/layout/TocTree.vue +42 -0
- package/components/ui/accordion/Accordion.vue +19 -0
- package/components/ui/accordion/AccordionContent.vue +24 -0
- package/components/ui/accordion/AccordionItem.vue +24 -0
- package/components/ui/accordion/AccordionTrigger.vue +39 -0
- package/components/ui/accordion/index.ts +4 -0
- package/components/ui/alert/Alert.vue +19 -0
- package/components/ui/alert/AlertDescription.vue +14 -0
- package/components/ui/alert/AlertTitle.vue +14 -0
- package/components/ui/alert/index.ts +23 -0
- package/components/ui/avatar/Avatar.vue +25 -0
- package/components/ui/avatar/AvatarFallback.vue +11 -0
- package/components/ui/avatar/AvatarImage.vue +12 -0
- package/components/ui/avatar/index.ts +24 -0
- package/components/ui/badge/Badge.vue +17 -0
- package/components/ui/badge/index.ts +71 -0
- package/components/ui/breadcrumb/Breadcrumb.vue +16 -0
- package/components/ui/breadcrumb/BreadcrumbItem.vue +16 -0
- package/components/ui/breadcrumb/BreadcrumbLink.vue +23 -0
- package/components/ui/breadcrumb/BreadcrumbList.vue +16 -0
- package/components/ui/breadcrumb/BreadcrumbPage.vue +19 -0
- package/components/ui/breadcrumb/BreadcrumbSeparator.vue +23 -0
- package/components/ui/breadcrumb/index.ts +6 -0
- package/components/ui/button/Button.vue +29 -0
- package/components/ui/button/index.ts +35 -0
- package/components/ui/card/Card.vue +21 -0
- package/components/ui/card/CardContent.vue +14 -0
- package/components/ui/card/CardDescription.vue +14 -0
- package/components/ui/card/CardFooter.vue +14 -0
- package/components/ui/card/CardHeader.vue +14 -0
- package/components/ui/card/CardTitle.vue +18 -0
- package/components/ui/card/index.ts +6 -0
- package/components/ui/collapsible/Collapsible.vue +18 -0
- package/components/ui/collapsible/CollapsibleContent.vue +14 -0
- package/components/ui/collapsible/CollapsibleTrigger.vue +11 -0
- package/components/ui/collapsible/index.ts +3 -0
- package/components/ui/command/Command.vue +89 -0
- package/components/ui/command/CommandEmpty.vue +30 -0
- package/components/ui/command/CommandGroup.vue +50 -0
- package/components/ui/command/CommandInput.vue +44 -0
- package/components/ui/command/CommandInputOnly.vue +50 -0
- package/components/ui/command/CommandItem.vue +79 -0
- package/components/ui/command/CommandList.vue +28 -0
- package/components/ui/command/CommandSeparator.vue +24 -0
- package/components/ui/command/index.ts +24 -0
- package/components/ui/dialog/Dialog.vue +14 -0
- package/components/ui/dialog/DialogClose.vue +11 -0
- package/components/ui/dialog/DialogContent.vue +52 -0
- package/components/ui/dialog/DialogDescription.vue +24 -0
- package/components/ui/dialog/DialogFooter.vue +19 -0
- package/components/ui/dialog/DialogHeader.vue +16 -0
- package/components/ui/dialog/DialogScrollContent.vue +61 -0
- package/components/ui/dialog/DialogTitle.vue +29 -0
- package/components/ui/dialog/DialogTrigger.vue +11 -0
- package/components/ui/dialog/index.ts +9 -0
- package/components/ui/input/Input.vue +27 -0
- package/components/ui/input/index.ts +1 -0
- package/components/ui/label/Label.vue +27 -0
- package/components/ui/label/index.ts +1 -0
- package/components/ui/navigation-menu/NavigationMenu.vue +33 -0
- package/components/ui/navigation-menu/NavigationMenuContent.vue +34 -0
- package/components/ui/navigation-menu/NavigationMenuIndicator.vue +24 -0
- package/components/ui/navigation-menu/NavigationMenuItem.vue +11 -0
- package/components/ui/navigation-menu/NavigationMenuLink.vue +19 -0
- package/components/ui/navigation-menu/NavigationMenuList.vue +33 -0
- package/components/ui/navigation-menu/NavigationMenuTrigger.vue +34 -0
- package/components/ui/navigation-menu/NavigationMenuViewport.vue +33 -0
- package/components/ui/navigation-menu/index.ts +14 -0
- package/components/ui/popover/Popover.vue +15 -0
- package/components/ui/popover/PopoverContent.vue +49 -0
- package/components/ui/popover/PopoverTrigger.vue +11 -0
- package/components/ui/popover/index.ts +4 -0
- package/components/ui/scroll-area/ScrollArea.vue +32 -0
- package/components/ui/scroll-area/ScrollBar.vue +41 -0
- package/components/ui/scroll-area/index.ts +2 -0
- package/components/ui/separator/Separator.vue +20 -0
- package/components/ui/separator/index.ts +1 -0
- package/components/ui/sheet/Sheet.vue +14 -0
- package/components/ui/sheet/SheetClose.vue +11 -0
- package/components/ui/sheet/SheetContent.vue +58 -0
- package/components/ui/sheet/SheetDescription.vue +22 -0
- package/components/ui/sheet/SheetFooter.vue +19 -0
- package/components/ui/sheet/SheetHeader.vue +16 -0
- package/components/ui/sheet/SheetTitle.vue +22 -0
- package/components/ui/sheet/SheetTrigger.vue +11 -0
- package/components/ui/sheet/index.ts +31 -0
- package/components/ui/slider/Slider.vue +36 -0
- package/components/ui/slider/index.ts +1 -0
- package/components/ui/tabs/Tabs.vue +15 -0
- package/components/ui/tabs/TabsContent.vue +22 -0
- package/components/ui/tabs/TabsList.vue +25 -0
- package/components/ui/tabs/TabsTrigger.vue +27 -0
- package/components/ui/tabs/index.ts +4 -0
- package/components/ui/textarea/Textarea.vue +27 -0
- package/components/ui/textarea/index.ts +1 -0
- package/components/ui/toast/Toast.vue +28 -0
- package/components/ui/toast/ToastAction.vue +22 -0
- package/components/ui/toast/ToastClose.vue +27 -0
- package/components/ui/toast/ToastDescription.vue +22 -0
- package/components/ui/toast/ToastProvider.vue +11 -0
- package/components/ui/toast/ToastTitle.vue +22 -0
- package/components/ui/toast/ToastViewport.vue +20 -0
- package/components/ui/toast/Toaster.vue +34 -0
- package/components/ui/toast/index.ts +38 -0
- package/components/ui/toast/use-toast.ts +165 -0
- package/components.json +18 -0
- package/composables/useBreadcrumb.ts +47 -0
- package/composables/useCollapsedMap.ts +3 -0
- package/composables/useConfig.ts +227 -0
- package/composables/useEditLink.ts +27 -0
- package/composables/useI18nDocs.ts +114 -0
- package/composables/useMdcMenu.ts +204 -0
- package/composables/usePm.ts +58 -0
- package/composables/useScrollspy.ts +51 -0
- package/composables/useThemes.ts +46 -0
- package/composables/useToast.ts +1 -0
- package/content/index.md +45 -0
- package/eslint.config.js +3 -0
- package/i18n/i18n.config.ts +414 -0
- package/index.d.ts +610 -0
- package/layouts/blank.vue +5 -0
- package/layouts/default.vue +9 -0
- package/layouts/editorial.vue +83 -0
- package/lib/registry/themes.ts +636 -0
- package/lib/uno-preset.ts +143 -0
- package/memory-bank/activeContext.md +17 -0
- package/memory-bank/productContext.md +21 -0
- package/memory-bank/progress.md +16 -0
- package/memory-bank/projectbrief.md +20 -0
- package/memory-bank/systemPatterns.md +25 -0
- package/memory-bank/techContext.md +29 -0
- package/modules/inject-css.ts +40 -0
- package/nuxt.config.ts +124 -0
- package/package.json +71 -0
- package/pages/[...slug].vue +109 -0
- package/pages/admin/[...slug].vue +145 -0
- package/pages/index.vue +24 -0
- package/plugins/injectCssHmr.ts +26 -0
- package/plugins/wordup.ts +130 -0
- package/public/content-doc.json +792 -0
- package/public/iconesjs.svg +4 -0
- package/scripts/buildContentDoc-cli.ts +8 -0
- package/scripts/buildContentDoc.ts +165 -0
- package/tailwind.config.js +1 -0
- package/tsconfig.json +3 -0
- package/uno.config.mjs +58 -0
- package/utils/index.ts +12 -0
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Overview
|
|
3
|
+
description: Customizing shadcn-docs-nuxt.
|
|
4
|
+
icon: lucide:settings-2
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
shadcn-docs-nuxt is configured through `app.config.ts`.
|
|
8
|
+
|
|
9
|
+
```ts [app.config.ts]
|
|
10
|
+
export default defineAppConfig({
|
|
11
|
+
shadcnDocs: {
|
|
12
|
+
header: {
|
|
13
|
+
// ...
|
|
14
|
+
},
|
|
15
|
+
aside: {
|
|
16
|
+
// ...
|
|
17
|
+
},
|
|
18
|
+
main: {
|
|
19
|
+
// ...
|
|
20
|
+
},
|
|
21
|
+
// ...
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Fields Reference
|
|
27
|
+
|
|
28
|
+
Illustrative type declarations:
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
type Target = '_blank' | '_parent' | '_self' | '_top' | (string & object) | null | undefined;
|
|
32
|
+
|
|
33
|
+
interface ILink {
|
|
34
|
+
title?: string;
|
|
35
|
+
icon?: string;
|
|
36
|
+
to: string;
|
|
37
|
+
target?: Target;
|
|
38
|
+
showLinkIcon?: boolean; // For nav and toc link section
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
interface INav {
|
|
42
|
+
title: string;
|
|
43
|
+
links?: (ILink & { description: string; icon: string })[];
|
|
44
|
+
to?: string;
|
|
45
|
+
target?: Target;
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Icons
|
|
50
|
+
|
|
51
|
+
All configurable icons can be set to iconify icons, emojis and urls, using the [icon component](/components/docs/icon) under the hood.
|
|
52
|
+
|
|
53
|
+
## `site`
|
|
54
|
+
|
|
55
|
+
::field-group
|
|
56
|
+
::field{name="name" type="string"}
|
|
57
|
+
The site name shown on the tap title: `<page> - <site_name>`.
|
|
58
|
+
::
|
|
59
|
+
::field{name="description" type="string"}
|
|
60
|
+
The site description for SEO.
|
|
61
|
+
::
|
|
62
|
+
::field{name="ogImage" type="string"}
|
|
63
|
+
The path to the Open Graph image.
|
|
64
|
+
::
|
|
65
|
+
::field{name="ogImageComponent" type="string" default-value="ShadcnDocs"}
|
|
66
|
+
The component to use for the dynamic ogImage. Possible values: `ShadcnDocs`, `Nuxt`, `NuxtSeo` or your custom component name.
|
|
67
|
+
::
|
|
68
|
+
::field{name="ogImageColor" type="'light' | 'dark'" default-value="light"}
|
|
69
|
+
Color mode to use for the dynamic ogImage.
|
|
70
|
+
::
|
|
71
|
+
::field{name="umami" type="object"}
|
|
72
|
+
::collapsible{title="Details"}
|
|
73
|
+
::field-group
|
|
74
|
+
::field{name="enable" type="boolean" default-value="false"}
|
|
75
|
+
Whether to turn on the umami integration.
|
|
76
|
+
::
|
|
77
|
+
::field{name="src" type="string" default-value="https://cloud.umami.is/script.js"}
|
|
78
|
+
The link src in the tracking code.
|
|
79
|
+
::
|
|
80
|
+
::field{name="dataWebsiteId" type="string"}
|
|
81
|
+
The _Website ID_ from umami dashboard.
|
|
82
|
+
::
|
|
83
|
+
::
|
|
84
|
+
::
|
|
85
|
+
::
|
|
86
|
+
::
|
|
87
|
+
|
|
88
|
+
## `theme`
|
|
89
|
+
|
|
90
|
+
::field-group
|
|
91
|
+
::field{name="customizable" type="boolean" defaultValue="true"}
|
|
92
|
+
Whether the theme can be customized by the user (show the customize button in the header).
|
|
93
|
+
::
|
|
94
|
+
::field{name="color" type="Color" defaultValue="zinc"}
|
|
95
|
+
The default color theme. https://www.shadcn-vue.com/themes.html
|
|
96
|
+
::
|
|
97
|
+
::field{name="radius" type="string" defaultValue="0.5"}
|
|
98
|
+
The default radius.
|
|
99
|
+
::
|
|
100
|
+
::
|
|
101
|
+
|
|
102
|
+
## `banner`
|
|
103
|
+
|
|
104
|
+
:read-more{to="/development/configuration/banner"}
|
|
105
|
+
|
|
106
|
+
::field-group
|
|
107
|
+
::field{name="enable" type="boolean" default-value="false"}
|
|
108
|
+
Whether to enable the banner.
|
|
109
|
+
::
|
|
110
|
+
::field{name="showClose" type="boolean" default-value="true"}
|
|
111
|
+
Whether to show to close button.
|
|
112
|
+
::
|
|
113
|
+
::field{name="to" type="string"}
|
|
114
|
+
Link to navigate to. Don't set any value if you don't want to navigate.
|
|
115
|
+
::
|
|
116
|
+
::field{name="content" type="string"}
|
|
117
|
+
The content to show (parsed by the MDC parser).
|
|
118
|
+
::
|
|
119
|
+
::field{name="target" type="Target" default-value="_blank"}
|
|
120
|
+
Navigation target.
|
|
121
|
+
::
|
|
122
|
+
::field{name="border" type="boolean" default-value="true"}
|
|
123
|
+
Whether to show the border at the bottom of the banner.
|
|
124
|
+
::
|
|
125
|
+
::
|
|
126
|
+
|
|
127
|
+
## `header`
|
|
128
|
+
|
|
129
|
+
::field-group
|
|
130
|
+
::field{name="showLoadingIndicator" type="boolean" defaultValue="true"}
|
|
131
|
+
Whether to show the nuxt loading indicator.
|
|
132
|
+
::
|
|
133
|
+
::field{name="title" type="string"}
|
|
134
|
+
The title shown on the header next to the icon.
|
|
135
|
+
::
|
|
136
|
+
::field{name="showTitle" type="boolean" defaultValue="true"}
|
|
137
|
+
Whether to show the title text on the header.
|
|
138
|
+
::
|
|
139
|
+
::field{name="border" type="boolean" defaultValue="false"}
|
|
140
|
+
Whether to show the bottom border of the header.
|
|
141
|
+
::
|
|
142
|
+
::field{name="darkModeToggle" type="boolean" defaultValue="true"}
|
|
143
|
+
Whether to show the dark mode toggle.
|
|
144
|
+
::
|
|
145
|
+
::field{name="logo" type="{ light: string; dark: string; }" defaultValue="{ light: '/logo.svg', dark: '/logo-dark.svg' }"}
|
|
146
|
+
The path to the logo image files in `/public`. `light` is for the icon shown in light mode, `dark` is for the icon shown in dark mode.
|
|
147
|
+
::
|
|
148
|
+
::field{name="showTitleInMobile" type="boolean" defaultValue="false"}
|
|
149
|
+
Whether to show the logo and title in mobile. (Recommended to use with [button styled search bar](/development/configuration#search))
|
|
150
|
+
::
|
|
151
|
+
::field{name="nav" type="INav[]" defaultValue="[]"}
|
|
152
|
+
The content of the navbar in the header.
|
|
153
|
+
::
|
|
154
|
+
::field{name="links" type="ILink[]" defaultValue="[]"}
|
|
155
|
+
The links on the right of the header.
|
|
156
|
+
::
|
|
157
|
+
::
|
|
158
|
+
|
|
159
|
+
## `aside`
|
|
160
|
+
|
|
161
|
+
::field-group
|
|
162
|
+
::field{name="useLevel" type="boolean" defaultValue="true"}
|
|
163
|
+
Whether to use level-styled sidebar.
|
|
164
|
+
::
|
|
165
|
+
::field{name="collapse" type="boolean" defaultValue="false"}
|
|
166
|
+
Whether to collapse all collapsible by default.
|
|
167
|
+
::
|
|
168
|
+
::field{name="collapseLevel" type="number" defaultValue="1"}
|
|
169
|
+
Collapse folders that are deeper than the defined level. (Set it to `Infinity` if you want to expand all)
|
|
170
|
+
::
|
|
171
|
+
::field{name="folderStyle" type="'default' | 'tree' | 'group'" defaultValue="default"}
|
|
172
|
+
The default style used for [folders](/getting-started/writing/folders#parameters).
|
|
173
|
+
::
|
|
174
|
+
::
|
|
175
|
+
|
|
176
|
+
## `main`
|
|
177
|
+
|
|
178
|
+
::field-group
|
|
179
|
+
::field{name="padded" type="boolean" defaultValue="true"}
|
|
180
|
+
Whether the page is padded.
|
|
181
|
+
::
|
|
182
|
+
::field{name="breadCrumb" type="boolean" defaultValue="true"}
|
|
183
|
+
Whether to show the bread crumb.
|
|
184
|
+
::
|
|
185
|
+
::field{name="showTitle" type="boolean" defaultValue="true"}
|
|
186
|
+
Whether to show the title section.
|
|
187
|
+
::
|
|
188
|
+
::field{name="codeCopyToast" type="boolean" defaultValue="true"}
|
|
189
|
+
Whether to show a toast on code copy.
|
|
190
|
+
::
|
|
191
|
+
::field{name="codeCopyToastText" type="string" defaultValue="'Copied to clipboard!'"}
|
|
192
|
+
The text shown in the toaster.
|
|
193
|
+
::
|
|
194
|
+
::field{name="fieldRequiredText" type="string" defaultValue="'required'"}
|
|
195
|
+
The text shown in the [field](/components/docs/field) component when a field is required.
|
|
196
|
+
::
|
|
197
|
+
::field{name="pm" type="('npm' | 'pnpm' | 'bun' | 'yarn')[]" default-value="['npm', 'pnpm', 'bun', 'yarn']"}
|
|
198
|
+
Package managers shown in the [pm components](/components/docs/pm).
|
|
199
|
+
::
|
|
200
|
+
::field{name="codeIcon" type="Record<string, string>"}
|
|
201
|
+
The icon mapping for language / filename in the [code group](/components/docs/code-group) header.
|
|
202
|
+
::
|
|
203
|
+
::field{name="editLink" type="object"}
|
|
204
|
+
::collapsible{title="Details"}
|
|
205
|
+
::field-group
|
|
206
|
+
::field{name="enable" type="boolean" default-value="false"}
|
|
207
|
+
Whether to turn on the edit link.
|
|
208
|
+
::
|
|
209
|
+
::field{name="pattern" type="string"}
|
|
210
|
+
The link pattern.
|
|
211
|
+
::
|
|
212
|
+
::field{name="text" type="string" default-value="Edit this page"}
|
|
213
|
+
Text displayed on the link.
|
|
214
|
+
::
|
|
215
|
+
::field{name="icon" type="string" default-value="lucide:square-pen"}
|
|
216
|
+
The icon preceding the link.
|
|
217
|
+
::
|
|
218
|
+
::field{name="placement" type="('docsFooter' | 'toc')[]" default-value="['docsFooter']"}
|
|
219
|
+
Where to place the edit link.
|
|
220
|
+
::
|
|
221
|
+
::
|
|
222
|
+
::
|
|
223
|
+
::
|
|
224
|
+
::
|
|
225
|
+
|
|
226
|
+
## `footer`
|
|
227
|
+
|
|
228
|
+
::field-group
|
|
229
|
+
::field{name="credits" type="string" defaultValue="''"}
|
|
230
|
+
The credit text on the left side of the footer (parsed by the MDC parser).
|
|
231
|
+
::
|
|
232
|
+
::field{name="links" type="ILink[]" defaultValue="[]"}
|
|
233
|
+
The links on the right side of the footer.
|
|
234
|
+
::
|
|
235
|
+
::
|
|
236
|
+
|
|
237
|
+
## `toc`
|
|
238
|
+
|
|
239
|
+
::field-group
|
|
240
|
+
::field{name="enable" type="boolean" defaultValue="true"}
|
|
241
|
+
Whether to turn on the toc section.
|
|
242
|
+
::
|
|
243
|
+
::field{name="enableInMobile" type="boolean" defaultValue="false"}
|
|
244
|
+
Whether to turn on the toc section in mobile.
|
|
245
|
+
::
|
|
246
|
+
::field{name="title" type="string" defaultValue="'On This Page'"}
|
|
247
|
+
The title for the toc section.
|
|
248
|
+
::
|
|
249
|
+
::field{name="links" type="ILink[]" defaultValue="[]"}
|
|
250
|
+
The links under the toc section.
|
|
251
|
+
::
|
|
252
|
+
::field{name="carbonAds" type="object"}
|
|
253
|
+
::collapsible{title="Details"}
|
|
254
|
+
::field-group
|
|
255
|
+
::field{name="enable" type="boolean" default-value="false"}
|
|
256
|
+
Whether to turn on Carbon Ads.
|
|
257
|
+
::
|
|
258
|
+
::field{name="disableInDev" type="boolean" default-value="false"}
|
|
259
|
+
Whether to disable Carbon Ads in dev environment.
|
|
260
|
+
::
|
|
261
|
+
::field{name="code" type="string"}
|
|
262
|
+
Carbon Ads code.
|
|
263
|
+
::
|
|
264
|
+
::field{name="placement" type="string"}
|
|
265
|
+
Carbon Ads placement.
|
|
266
|
+
::
|
|
267
|
+
::field{name="format" type="'cover' | 'responsive'" default-value="cover"}
|
|
268
|
+
Carbon Ads format.
|
|
269
|
+
::
|
|
270
|
+
::
|
|
271
|
+
::
|
|
272
|
+
::
|
|
273
|
+
::
|
|
274
|
+
|
|
275
|
+
## `search`
|
|
276
|
+
|
|
277
|
+
::field-group
|
|
278
|
+
::field{name="enable" type="boolean" defaultValue="true"}
|
|
279
|
+
Whether to turn on the search feature.
|
|
280
|
+
::
|
|
281
|
+
::field{name="inAside" type="boolean" defaultValue="false"}
|
|
282
|
+
Whether to show the search bar in the sidebar.
|
|
283
|
+
::
|
|
284
|
+
::field{name="style" type="'input' | 'button'" defaultValue="input"}
|
|
285
|
+
Whether the search bar is displayed as a input or a button.
|
|
286
|
+
::
|
|
287
|
+
::field{name="placeholder" type="string" defaultValue="'Search...'"}
|
|
288
|
+
The placeholder text shown in the search bar.
|
|
289
|
+
::
|
|
290
|
+
::field{name="placeholderDetailed" type="string" defaultValue="'Search documentation...'"}
|
|
291
|
+
The placeholder text shown in the search dialog input.
|
|
292
|
+
::
|
|
293
|
+
::
|
|
294
|
+
|
|
295
|
+
## Default Config
|
|
296
|
+
|
|
297
|
+
:read-more{to="https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/composables/useConfig.ts" title="source file" icon="lucide:code"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Nuxt Content
|
|
3
|
+
description: Configuring the Nuxt Content module.
|
|
4
|
+
icon: lucide:book
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
::Alert
|
|
8
|
+
---
|
|
9
|
+
to: https://content.nuxt.com/get-started/configuration
|
|
10
|
+
target: _blank
|
|
11
|
+
---
|
|
12
|
+
Read the detailed configuration guide in **Nuxt Content** Docs.
|
|
13
|
+
::
|
|
14
|
+
|
|
15
|
+
The default nuxt content config can be overridden in `nuxt.config.ts`.
|
|
16
|
+
|
|
17
|
+
```ts [nuxt.config.ts]
|
|
18
|
+
export default defineNuxtConfig({
|
|
19
|
+
devtools: { enabled: true },
|
|
20
|
+
extends: ['shadcn-docs-nuxt'],
|
|
21
|
+
|
|
22
|
+
// Here
|
|
23
|
+
content: {
|
|
24
|
+
// ...
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
compatibilityDate: '2024-07-06',
|
|
28
|
+
});
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Syntax Highlighting
|
|
32
|
+
|
|
33
|
+
### Theme
|
|
34
|
+
|
|
35
|
+
```ts [nuxt.config.ts]
|
|
36
|
+
export default defineNuxtConfig({
|
|
37
|
+
content: {
|
|
38
|
+
highlight: {
|
|
39
|
+
theme: {
|
|
40
|
+
// Default theme
|
|
41
|
+
default: 'github-light',
|
|
42
|
+
// Theme used in dark-mode
|
|
43
|
+
dark: 'github-dark',
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
:read-more{to="https://shiki.style/themes"}
|
|
51
|
+
|
|
52
|
+
### Languages
|
|
53
|
+
|
|
54
|
+
The default highlighted languages are: `['json', 'js', 'ts', 'html', 'css', 'vue', 'diff', 'shell', 'markdown', 'yaml', 'bash', 'ini']`{lang="js"}.
|
|
55
|
+
|
|
56
|
+
If you need to highlight other languages, add them in your `nuxt.config.ts`.
|
|
57
|
+
|
|
58
|
+
```ts [nuxt.config.ts]
|
|
59
|
+
export default defineNuxtConfig({
|
|
60
|
+
content: {
|
|
61
|
+
highlight: {
|
|
62
|
+
langs: ['c', 'cpp'],
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
:read-more{to="https://shiki.style/languages"}
|
|
69
|
+
|
|
70
|
+
## Default Config
|
|
71
|
+
|
|
72
|
+
```ts [nuxt.config.ts]
|
|
73
|
+
export default defineNuxtConfig({
|
|
74
|
+
content: {
|
|
75
|
+
documentDriven: true,
|
|
76
|
+
highlight: {
|
|
77
|
+
theme: {
|
|
78
|
+
default: 'github-light',
|
|
79
|
+
dark: 'github-dark',
|
|
80
|
+
},
|
|
81
|
+
preload: ['json', 'js', 'ts', 'html', 'css', 'vue', 'diff', 'shell', 'markdown', 'yaml', 'bash', 'ini'],
|
|
82
|
+
},
|
|
83
|
+
navigation: {
|
|
84
|
+
fields: [
|
|
85
|
+
'description',
|
|
86
|
+
'icon',
|
|
87
|
+
'navBadges',
|
|
88
|
+
'navTruncate',
|
|
89
|
+
'badges',
|
|
90
|
+
'toc',
|
|
91
|
+
'sidebar',
|
|
92
|
+
'collapse',
|
|
93
|
+
'editLink',
|
|
94
|
+
'prevNext',
|
|
95
|
+
'breadcrumb',
|
|
96
|
+
],
|
|
97
|
+
},
|
|
98
|
+
experimental: {
|
|
99
|
+
search: {
|
|
100
|
+
indexed: true,
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
```
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: OG Image
|
|
3
|
+
description: Customizing the dynamic OG Image.
|
|
4
|
+
icon: lucide:image
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**shadcn-docs-nuxt** utilizes the [nuxt-og-image](https://nuxtseo.com/og-image/getting-started/installation) module to generate dynamic OG Images.
|
|
8
|
+
|
|
9
|
+
The dynamic OG Image is used in all pages **except** the index page. The index page uses a static OG Image defined in the [`ogImage`](/development/configuration/overview#site) field instead.
|
|
10
|
+
|
|
11
|
+
## Using Built-in Templates
|
|
12
|
+
|
|
13
|
+
To use a template, set the name of the OG Image component in the [`ogImageComponent`](/development/configuration/overview#site).
|
|
14
|
+
|
|
15
|
+
```ts [app.config.ts]
|
|
16
|
+
export default defineAppConfig({
|
|
17
|
+
shadcnDocs: {
|
|
18
|
+
site: {
|
|
19
|
+
ogImageComponent: 'ShadcnDocs',
|
|
20
|
+
ogImageColor: 'light', // or 'dark'
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Out of the box, a shadcn-docs-nuxt template and multiple community templates are available.
|
|
27
|
+
|
|
28
|
+
::tabs{variant="card"}
|
|
29
|
+
::div{label="ShadcnDocs"}
|
|
30
|
+
{width="1000"}
|
|
31
|
+
::
|
|
32
|
+
::div{label="ShadcnDocs (Dark)"}
|
|
33
|
+
{width="1000"}
|
|
34
|
+
::
|
|
35
|
+
::div{label="Nuxt"}
|
|
36
|
+
{width="1000"}
|
|
37
|
+
::
|
|
38
|
+
::div{label="Nuxt SEO"}
|
|
39
|
+
{width="1000"}
|
|
40
|
+
::
|
|
41
|
+
::
|
|
42
|
+
|
|
43
|
+
::alert{to="https://github.com/nuxt-modules/og-image/tree/main/src/runtime/nuxt/components/Templates/Community" icon="lucide:list"}
|
|
44
|
+
See the full list of community templates.
|
|
45
|
+
::
|
|
46
|
+
|
|
47
|
+
## Using Custom Templates
|
|
48
|
+
|
|
49
|
+
To use a custom template, create a template by following the guide in the [Nuxt SEO Docs](https://nuxtseo.com/og-image/getting-started/getting-familar-with-nuxt-og-image#_1-create-your-template-component). Then set the component name of your template in `ogImageComponent`.
|
|
50
|
+
|
|
51
|
+
::code-group
|
|
52
|
+
```vue [components/OgImage/BlogPost.vue]
|
|
53
|
+
<template>
|
|
54
|
+
<div class="flex size-full items-start justify-start border-[12px] border-solid border-blue-500 bg-gray-50">
|
|
55
|
+
<div class="flex h-full items-start justify-start">
|
|
56
|
+
<div class="flex size-full flex-col justify-between">
|
|
57
|
+
<h1 class="p-20 text-left text-[80px] font-black">
|
|
58
|
+
{{ title }}
|
|
59
|
+
</h1>
|
|
60
|
+
<p class="mb-0 px-20 pb-10 text-2xl font-bold">
|
|
61
|
+
mycoolsite.com
|
|
62
|
+
</p>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</template>
|
|
67
|
+
|
|
68
|
+
<script setup lang="ts">
|
|
69
|
+
withDefaults(defineProps<{
|
|
70
|
+
title?: string;
|
|
71
|
+
}>(), {
|
|
72
|
+
title: 'title',
|
|
73
|
+
});
|
|
74
|
+
</script>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
```ts [app.config.ts]
|
|
78
|
+
export default defineAppConfig({
|
|
79
|
+
shadcnDocs: {
|
|
80
|
+
site: {
|
|
81
|
+
ogImageComponent: 'BlogPost',
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
```
|
|
86
|
+
::
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Edit Link
|
|
3
|
+
icon: lucide:square-pen
|
|
4
|
+
description: A link to the source file.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
An edit link allows you to display a link at the end of each page to edit the page on GitHub / GitLab.
|
|
8
|
+
|
|
9
|
+
```ts [app.config.ts]
|
|
10
|
+
export default defineAppConfig({
|
|
11
|
+
shadcnDocs: {
|
|
12
|
+
main: {
|
|
13
|
+
editLink: {
|
|
14
|
+
enable: true,
|
|
15
|
+
pattern: 'https://github.com/ZTL-UwU/shadcn-docs-nuxt/edit/main/content/:path',
|
|
16
|
+
text: 'Edit this page on GitHub',
|
|
17
|
+
icon: 'lucide:square-pen',
|
|
18
|
+
placement: ['docsFooter', 'toc'],
|
|
19
|
+
},
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
- The `pattern` option defines the URL structure for the link, and `:path` is going to be replaced with the page path.
|
|
26
|
+
|
|
27
|
+
- The `text` option allows you to customize the link text (default is `Edit this page`)
|
|
28
|
+
|
|
29
|
+
- The `icon` option allows you to customize the icon (default is `lucide:square-pen`)
|
|
30
|
+
|
|
31
|
+
- The `placement` option controls the places to put the edit link.
|
|
32
|
+
- `docsFooter`: at the end of the page.
|
|
33
|
+
- `toc`: in the TOC links section.
|
|
34
|
+
|
|
35
|
+
### Front Matter
|
|
36
|
+
|
|
37
|
+
The edit link can be disabled per-page using the `editLink` option in front matter.
|
|
38
|
+
|
|
39
|
+
```yaml
|
|
40
|
+
---
|
|
41
|
+
editLink: false
|
|
42
|
+
---
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Parameters
|
|
46
|
+
|
|
47
|
+
::field-group
|
|
48
|
+
::field{name="enable" type="boolean" default-value="false"}
|
|
49
|
+
Whether to turn on the edit link.
|
|
50
|
+
::
|
|
51
|
+
::field{name="pattern" type="string"}
|
|
52
|
+
The link pattern.
|
|
53
|
+
::
|
|
54
|
+
::field{name="text" type="string" default-value="Edit this page"}
|
|
55
|
+
Text displayed on the link.
|
|
56
|
+
::
|
|
57
|
+
::field{name="icon" type="string" default-value="lucide:square-pen"}
|
|
58
|
+
The icon preceding the link.
|
|
59
|
+
::
|
|
60
|
+
::field{name="placement" type="('docsFooter' | 'toc')[]" default-value="['docsFooter']"}
|
|
61
|
+
Where to place the edit link.
|
|
62
|
+
::
|
|
63
|
+
::
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Banner
|
|
3
|
+
icon: lucide:panel-top
|
|
4
|
+
description: Show a banner on the top of the page.
|
|
5
|
+
badges:
|
|
6
|
+
- value: Source
|
|
7
|
+
icon: lucide:code
|
|
8
|
+
to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/layout/Banner.vue
|
|
9
|
+
target: _blank
|
|
10
|
+
- value: 0.8.3
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
::stack
|
|
14
|
+
```ts [app.config.ts]
|
|
15
|
+
export default defineAppConfig({
|
|
16
|
+
shadcnDocs: {
|
|
17
|
+
banner: {
|
|
18
|
+
enable: true,
|
|
19
|
+
showClose: true,
|
|
20
|
+
content: 'Welcome to **shadcn-docs-nuxt**',
|
|
21
|
+
to: 'https://github.com/ZTL-UwU/shadcn-docs-nuxt',
|
|
22
|
+
target: '_blank',
|
|
23
|
+
border: true,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
```
|
|
28
|
+
{width="1000"}
|
|
29
|
+
::
|
|
30
|
+
|
|
31
|
+
## Parameters
|
|
32
|
+
|
|
33
|
+
::field-group
|
|
34
|
+
::field{name="enable" type="boolean" default-value="false"}
|
|
35
|
+
Whether to enable the banner.
|
|
36
|
+
::
|
|
37
|
+
::field{name="showClose" type="boolean" default-value="true"}
|
|
38
|
+
Whether to show to close button.
|
|
39
|
+
::
|
|
40
|
+
::field{name="to" type="string"}
|
|
41
|
+
Link to navigate to. Don't set any value if you don't want to navigate.
|
|
42
|
+
::
|
|
43
|
+
::field{name="content" type="string"}
|
|
44
|
+
The content to show (parsed by the MDC parser).
|
|
45
|
+
::
|
|
46
|
+
::field{name="target" type="Target" default-value="_blank"}
|
|
47
|
+
Navigation target.
|
|
48
|
+
::
|
|
49
|
+
::field{name="border" type="boolean" default-value="true"}
|
|
50
|
+
Whether to show the border at the bottom of the banner.
|
|
51
|
+
::
|
|
52
|
+
::
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Carbon Ads
|
|
3
|
+
icon: lucide:chart-line
|
|
4
|
+
description: Run ads at the bottom of the TOC section.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**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.
|
|
8
|
+
|
|
9
|
+
```ts [app.config.ts]
|
|
10
|
+
export default defineAppConfig({
|
|
11
|
+
shadcnDocs: {
|
|
12
|
+
toc: {
|
|
13
|
+
enable: true,
|
|
14
|
+
carbonAds: {
|
|
15
|
+
enable: true,
|
|
16
|
+
disableInDev: false,
|
|
17
|
+
code: 'your-carbon-code',
|
|
18
|
+
placement: 'your-carbon-placement',
|
|
19
|
+
format: 'your-carbon-format', // defaults to 'cover'
|
|
20
|
+
},
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
These values are used to call carbon CDN script as shown below.
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
`//cdn.carbonads.com/carbon.js?serve=${code}&placement=${placement}&format=${format}`;
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
:read-more{title="Carbon Ads website" to="https://www.carbonads.net/"}
|
|
33
|
+
|
|
34
|
+
### Disabling on certain pages
|
|
35
|
+
|
|
36
|
+
```md
|
|
37
|
+
---
|
|
38
|
+
title: Page Title
|
|
39
|
+
toc:
|
|
40
|
+
carbonAds:
|
|
41
|
+
enable: false
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
<!-- Page Content -->
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Parameters
|
|
48
|
+
|
|
49
|
+
::field-group
|
|
50
|
+
::field{name="enable" type="boolean" default-value="false"}
|
|
51
|
+
Whether to turn on Carbon Ads.
|
|
52
|
+
::
|
|
53
|
+
::field{name="disableInDev" type="boolean" default-value="false"}
|
|
54
|
+
Whether to disable Carbon Ads in dev environment.
|
|
55
|
+
::
|
|
56
|
+
::field{name="code" type="string"}
|
|
57
|
+
Carbon Ads code.
|
|
58
|
+
::
|
|
59
|
+
::field{name="placement" type="string"}
|
|
60
|
+
Carbon Ads placement.
|
|
61
|
+
::
|
|
62
|
+
::field{name="format" type="'cover' | 'responsive'" default-value="cover"}
|
|
63
|
+
Carbon Ads format.
|
|
64
|
+
::
|
|
65
|
+
::
|