diff --git a/README.md b/README.md index 35fd15f3..d25eb7cb 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,26 @@ Beautifully designed _Nuxt Content_ template with _shadcn-vue_. **Customizable. - [Documentation / Demo](https://shadcn-docs-nuxt.vercel.app/) +## Quick Start + +1. Create a project with the starter template + + ```bash + npx nuxi@latest init -t github:ZTL-UwU/shadcn-docs-nuxt-starter + ``` + +2. Install dependencies + + ```bash + npm install + ``` + +3. Start dev server + + ```bash + npm run dev + ``` + ## Contributing 1. Clone this repository diff --git a/app.config.ts b/app.config.ts index c27cf266..249dbfac 100644 --- a/app.config.ts +++ b/app.config.ts @@ -16,12 +16,12 @@ export default defineAppConfig({ links: [{ title: 'Getting Started', to: '/getting-started', - description: 'For the beautiful component design & docs design', + description: 'Start building your document with shadcn-docs-nuxt', target: undefined, }, { title: 'API', to: '/api', - description: 'For the vue port of shadcn-ui & some docs component source', + description: 'Discover the configurations and exposed APIs.', target: undefined, }], }, { @@ -134,9 +134,13 @@ export default defineAppConfig({ }, }); +type DeepPartial = T extends object ? { + [P in keyof T]?: DeepPartial; +} : T; + declare module '@nuxt/schema' { interface AppConfigInput { - shadcnDocs?: { + shadcnDocs: DeepPartial<{ site: { name: string; }; @@ -150,13 +154,13 @@ declare module '@nuxt/schema' { darkModeToggle: true; nav: ({ title: string; - to?: string; - target?: string; - links?: ({ + to: string; + target: string; + links: ({ title: string; to: string; - target?: string; - description?: string; + target: string; + description: string; })[]; })[]; links: ({ @@ -179,10 +183,10 @@ declare module '@nuxt/schema' { footer: { credits: string; links: ({ - icon?: string; - title?: string; + icon: string; + title: string; to: string; - target?: string; + target: string; })[]; }; toc: { @@ -193,6 +197,6 @@ declare module '@nuxt/schema' { enable: boolean; inAside: boolean; }; - }; + }>; } } diff --git a/components/content/ProseCode.vue b/components/content/ProseCode.vue index 82557e85..a87db159 100644 --- a/components/content/ProseCode.vue +++ b/components/content/ProseCode.vue @@ -9,8 +9,8 @@
@@ -61,4 +61,17 @@ const icon = iconMap.get(props.filename?.toLowerCase()) || iconMap.get(props.lan .fade-leave-to { opacity: 0; } + +.shiki .line.highlight { + background-color: hsl(var(--muted) / 0.8); +} + +.shiki .line { + padding-left: 0.75rem; + padding-right: 0.75rem; +} + +.inline-copy .line { + padding-right: 2.7rem; +} diff --git a/components/layout/Header/NavMobileItem.vue b/components/layout/Header/NavMobileItem.vue index 9b83fc0e..65fbe712 100644 --- a/components/layout/Header/NavMobileItem.vue +++ b/components/layout/Header/NavMobileItem.vue @@ -38,10 +38,8 @@