shadcn-docs
Customizing shadcn-docs-nuxt.
shadcn-docs-nuxt is configured through app.config.ts.
app.config.ts
export default defineAppConfig({
shadcnDocs: {
header: {
xxx
},
aside: {
xxx
},
main: {
xxx
},
xxx
},
});
Fields Reference
Illustrative type declarations:
type Target = '_blank' | '_parent' | '_self' | '_top' | (string & object) | null | undefined;
interface ILink {
title?: string;
icon?: string;
to: string;
target?: Target;
}
interface INav {
title: string;
links?: (ILink & { description: string })[];
to?: string;
target?: Target;
}
Icons
All configurable icons can be set to iconify icons, emojis and urls, using smart icon under the hood.
site
namestring
<page> - <site_name>. descriptionstring
ogImagestring
ogImageComponentstring
ShadcnDocsShadcnDocs, Nuxt, NuxtSeo or your custom component name. theme
customizableboolean
truecolorColor
zincradiusstring
0.5header
showLoadingIndicatorboolean
truetitlestring
showTitleboolean
trueborderboolean
falsedarkModeToggleboolean
truelogo{ light: string; dark: string; }
{ light: '/logo.svg', dark: '/logo-dark.svg' }/public. light is for the icon shown in light mode, dark is for the icon shown in dark mode. showTitleInMobileboolean
falsenavINav[]
[]linksILink[]
[]aside
useLevelboolean
truecollapseboolean
falsemain
paddedboolean
truebreadCrumbboolean
trueshowTitleboolean
truecodeCopyToastboolean
truecodeCopyToastTextstring
'Copied to clipboard!fieldRequiredTextstring
'required'codeIconRecord<string, string>
footer
creditsstring
''linksILink[]
[]toc
enableboolean
trueenableInMobileboolean
falsetitlestring
'On This Page'linksILink[]
[]search
enableboolean
trueinAsideboolean
falsestyle'input' | 'button'
inputplaceholderstring
'Search...'placeholderDetailedstring
'Search documentation...'Default Config
composables/useConfig.ts
const defaultConfig: DefaultConfig = {
site: {
name: 'shadcn-docs',
description: 'Beautifully designed Nuxt Content template built with shadcn-vue. Customizable. Compatible. Open Source.',
ogImage: '/hero.png',
},
theme: {
customizable: true,
color: 'zinc',
radius: 0.5,
},
header: {
showLoadingIndicator: true,
title: 'shadcn-docs',
showTitle: true,
logo: {
light: '/logo.svg',
dark: '/logo-dark.svg',
},
showTitleInMobile: false,
border: false,
darkModeToggle: true,
nav: [],
links: [],
},
aside: {
useLevel: true,
collapse: false,
},
main: {
breadCrumb: true,
showTitle: true,
codeCopyToast: true,
codeCopyToastText: 'Copied to clipboard!',
fieldRequiredText: 'required',
padded: true,
codeIcon: {
'package.json': 'vscode-icons:file-type-node',
'tsconfig.json': 'vscode-icons:file-type-tsconfig',
'.npmrc': 'vscode-icons:file-type-npm',
'.editorconfig': 'vscode-icons:file-type-editorconfig',
'.eslintrc': 'vscode-icons:file-type-eslint',
'.eslintrc.cjs': 'vscode-icons:file-type-eslint',
'.eslintignore': 'vscode-icons:file-type-eslint',
'eslint.config.js': 'vscode-icons:file-type-eslint',
'eslint.config.mjs': 'vscode-icons:file-type-eslint',
'eslint.config.cjs': 'vscode-icons:file-type-eslint',
'.gitignore': 'vscode-icons:file-type-git',
'yarn.lock': 'vscode-icons:file-type-yarn',
'.env': 'vscode-icons:file-type-dotenv',
'.env.example': 'vscode-icons:file-type-dotenv',
'.vscode/settings.json': 'vscode-icons:file-type-vscode',
'nuxt': 'vscode-icons:file-type-nuxt',
'.nuxtrc': 'vscode-icons:file-type-nuxt',
'.nuxtignore': 'vscode-icons:file-type-nuxt',
'nuxt.config.js': 'vscode-icons:file-type-nuxt',
'nuxt.config.ts': 'vscode-icons:file-type-nuxt',
'nuxt.schema.ts': 'vscode-icons:file-type-nuxt',
'tailwind.config.js': 'vscode-icons:file-type-tailwind',
'tailwind.config.ts': 'vscode-icons:file-type-tailwind',
'vue': 'vscode-icons:file-type-vue',
'ts': 'vscode-icons:file-type-typescript',
'tsx': 'vscode-icons:file-type-typescript',
'mjs': 'vscode-icons:file-type-js',
'cjs': 'vscode-icons:file-type-js',
'js': 'vscode-icons:file-type-js',
'jsx': 'vscode-icons:file-type-js',
'md': 'vscode-icons:file-type-markdown',
'mdc': 'vscode-icons:file-type-markdown',
'py': 'vscode-icons:file-type-python',
'npm': 'vscode-icons:file-type-npm',
'pnpm': 'vscode-icons:file-type-pnpm',
'npx': 'vscode-icons:file-type-npm',
'yarn': 'vscode-icons:file-type-yarn',
'bun': 'vscode-icons:file-type-bun',
'yml': 'vscode-icons:file-type-yaml',
'json': 'vscode-icons:file-type-json',
'terminal': 'lucide:terminal',
},
},
footer: {
credits: '',
links: [],
},
toc: {
enable: true,
enableInMobile: false,
title: 'On This Page',
links: [],
},
search: {
enable: true,
inAside: false,
style: 'input',
placeholder: 'Search...',
placeholderDetailed: 'Search documentation...',
},
};