@wordup-md/nuxt-layer-shadcn-unocss 0.2.16 → 0.2.18

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.
Files changed (3) hide show
  1. package/README.md +181 -42
  2. package/package.json +4 -4
  3. package/vercel.json +7 -0
package/README.md CHANGED
@@ -1,93 +1,232 @@
1
- # Nuxt Layer Starter
1
+ # @wordup-md/nuxt-layer-shadcn-unocss
2
2
 
3
- Fork of [shadcn-docs-nuxt](https://github.com/shadcn/shadcn-docs-nuxt) at v0.8.13
3
+ > A beautiful, accessible, and feature-rich Nuxt layer for building documentation sites and content-driven applications with shadcn-vue and UnoCSS.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@wordup-md/nuxt-layer-shadcn-unocss)](https://www.npmjs.com/package/@wordup-md/nuxt-layer-shadcn-unocss)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+
8
+ Fork of [shadcn-docs-nuxt](https://github.com/shadcn/shadcn-docs-nuxt) at v0.8.13\
4
9
  `git diff --name-status 54b80e2e96bbc7249170150fb72e20078629a170`
5
10
 
6
- ## Build your website using this layer
11
+ ## ✨ Features
12
+
13
+ - 🎨 **shadcn-vue Components** - Beautiful, accessible UI components built with Radix Vue
14
+ - ⚡ **UnoCSS** - Utility-first CSS framework with instant on-demand compilation
15
+ - 📝 **Nuxt Content** - File-based CMS with MDC (Markdown Components) support
16
+ - 🌍 **i18n Ready** - Built-in internationalization with `@nuxtjs/i18n`
17
+ - 🎭 **Color Mode** - Dark/light mode support with `@nuxtjs/color-mode`
18
+ - ♿ **Accessibility** - WCAG compliant components and utilities
19
+ - 🔍 **Search** - Full-text search powered by Nuxt Content
20
+ - 📱 **Responsive** - Mobile-first design with UnoCSS utilities
21
+ - 🎯 **TypeScript** - Full TypeScript support with auto-imports
22
+ - 🚀 **Performance** - Optimized for SSR, code-splitting, and fast load times
7
23
 
8
- - Create a new Nuxt project
24
+ ## 📦 Installation
25
+
26
+ ### Quick Start
27
+
28
+ 1. **Create a new Nuxt project** (if you don't have one):
9
29
  ```bash
10
- npx create-nuxt-app <project-name>
30
+ npx nuxi@latest init my-docs
31
+ cd my-docs
11
32
  ```
12
33
 
13
- - Install the layer
34
+ 2. **Install the layer**:
14
35
  ```bash
15
36
  pnpm add @wordup-md/nuxt-layer-shadcn-unocss
16
37
  ```
17
38
 
18
- - Extend the layer in your nuxt.config.ts
39
+ 3. **Extend the layer** in your `nuxt.config.ts`:
19
40
  ```ts
20
- defineNuxtConfig({
41
+ export default defineNuxtConfig({
21
42
  extends: '@wordup-md/nuxt-layer-shadcn-unocss'
22
43
  })
23
- ```
24
-
25
- ## Setup
44
+ ```
26
45
 
27
- Make sure to install the dependencies:
46
+ 4. **Start developing**:
47
+ ```bash
48
+ pnpm dev
49
+ ```
28
50
 
51
+ ## 🏗️ What's Included
52
+
53
+ ### Modules
54
+ - `@nuxt/content` - Content management
55
+ - `@nuxt/image` - Image optimization
56
+ - `@nuxt/icon` - Icon component
57
+ - `@nuxtjs/color-mode` - Color mode switching
58
+ - `@nuxtjs/i18n` - Internationalization
59
+ - `@unocss/nuxt` - UnoCSS integration
60
+ - `shadcn-nuxt` - shadcn-vue components
61
+ - `@vueuse/nuxt` - VueUse composables
62
+ - `@unpress/nuxt-module` - Content editing capabilities
63
+
64
+ ### Components
65
+
66
+ #### UI Components (shadcn-vue)
67
+ - Accordion, Alert, Avatar, Badge, Breadcrumb
68
+ - Button, Card, Checkbox, Collapsible, Combobox
69
+ - Command, Dialog, Dropdown Menu, Input, Label
70
+ - Navigation Menu, Popover, Scroll Area, Separator
71
+ - Sheet, Slider, Table, Tabs, Textarea, Toast
72
+
73
+ #### Content Components
74
+ - Hero, Alert, Badge, Card, Code blocks
75
+ - File Tree, Icon, Keyboard shortcuts
76
+ - Menu, Steps, Tabs, and more
77
+
78
+ #### Layout Components
79
+ - Header with navigation
80
+ - Sidebar with tree navigation
81
+ - Footer, Breadcrumb, Table of Contents
82
+ - Search dialog, Language switcher
83
+ - Dark mode toggle
84
+
85
+ ### Layouts
86
+ - **Default** - Standard documentation layout with sidebar and TOC
87
+ - **Editorial** - Content-rich layout for articles and marketing pages
88
+ - **Blank** - Minimal layout for custom structures
89
+
90
+ ### Composables
91
+ - `useConfig()` - Access site configuration
92
+ - `useBreadcrumb()` - Breadcrumb navigation
93
+ - `useI18nDocs()` - i18n utilities for docs
94
+ - `useScrollspy()` - Scroll spy for TOC
95
+ - `useThemes()` - Theme management
96
+ - `useToast()` - Toast notifications
97
+ - And more...
98
+
99
+ ## 🛠️ Development
100
+
101
+ ### Setup
102
+
103
+ Install dependencies:
29
104
  ```bash
30
105
  pnpm install
31
106
  ```
32
107
 
33
- ## Working on your layer
108
+ ### Working on the Layer
109
+
110
+ The layer is structured like a regular Nuxt project at the root of this repository. The `.playground` directory is used for local development and testing.
111
+
112
+ **Start development server**:
113
+ ```bash
114
+ pnpm dev
115
+ ```
116
+
117
+ This will start the playground at `http://localhost:3000`, which imports and uses the layer.
118
+
119
+ **Development commands**:
120
+ ```bash
121
+ # Start dev server (playground)
122
+ pnpm dev
123
+
124
+ # Start dev server (root layer)
125
+ pnpm dev:root
34
126
 
35
- Your layer is at the root of this repository, it is exactly like a regular Nuxt project, except you can publish it on NPM.
127
+ # Build playground
128
+ pnpm build
36
129
 
37
- The `.playground` directory should help you on trying your layer during development.
130
+ # Generate static site
131
+ pnpm generate
38
132
 
39
- Running `pnpm dev` will prepare and boot `.playground` directory, which imports your layer itself.
133
+ # Preview production build
134
+ pnpm preview
40
135
 
41
- ## Distributing your layer
136
+ # Lint code
137
+ pnpm lint
42
138
 
43
- Your Nuxt layer is shaped exactly the same as any other Nuxt project, except you can publish it on NPM.
139
+ # Build content documentation JSON
140
+ pnpm build:json-doc
141
+ ```
44
142
 
45
- To do so, you only have to check if `files` in `package.json` are valid, then run:
143
+ ### Manual Publishing
46
144
 
145
+ 1. **Verify `files` field** in `package.json` (if present) includes all necessary files
146
+ 2. **Build content documentation** (if needed):
147
+ ```bash
148
+ pnpm build:json-doc
149
+ ```
150
+ 3. **Publish to npm**:
47
151
  ```bash
48
152
  npm publish --access public
49
153
  ```
50
154
 
51
- Once done, your users will only have to run:
155
+ ### After Publishing
156
+
157
+ Users can install and use your layer:
52
158
 
53
159
  ```bash
54
- npm install --save your-layer
160
+ npm install @wordup-md/nuxt-layer-shadcn-unocss
55
161
  ```
56
162
 
57
- Then add the dependency to their `extends` in `nuxt.config`:
58
-
163
+ Then extend it in their `nuxt.config.ts`:
59
164
  ```ts
60
- defineNuxtConfig({
61
- extends: 'your-layer'
165
+ export default defineNuxtConfig({
166
+ extends: '@wordup-md/nuxt-layer-shadcn-unocss'
62
167
  })
63
168
  ```
64
169
 
65
- ## Development Server
170
+ ## 🎨 Customization
66
171
 
67
- Start the development server on http://localhost:3000
172
+ ### Overriding Components
68
173
 
69
- ```bash
70
- pnpm dev
174
+ You can override any component by creating a component with the same path in your project. For example, to override the Footer:
175
+
176
+ ```vue
177
+ <!-- components/layout/Footer.vue -->
178
+ <template>
179
+ <footer class="py-6">
180
+ <div class="container">
181
+ Your custom footer content
182
+ </div>
183
+ </footer>
184
+ </template>
71
185
  ```
72
186
 
73
- ## Production
187
+ ### Configuration
74
188
 
75
- Build the application for production:
189
+ The layer uses Nuxt's configuration system. You can override module configurations in your `nuxt.config.ts`:
76
190
 
77
- ```bash
78
- pnpm build
191
+ ```ts
192
+ export default defineNuxtConfig({
193
+ extends: '@wordup-md/nuxt-layer-shadcn-unocss',
194
+
195
+ // Override i18n config
196
+ i18n: {
197
+ defaultLocale: 'fr',
198
+ locales: ['fr', 'en']
199
+ },
200
+
201
+ // Override color mode
202
+ colorMode: {
203
+ preference: 'dark'
204
+ }
205
+ })
79
206
  ```
80
207
 
81
- Or statically generate it with:
208
+ ## 📚 Documentation
82
209
 
83
- ```bash
84
- pnpm generate
85
- ```
210
+ - [Nuxt Documentation](https://nuxt.com)
211
+ - [Nuxt Content](https://content.nuxtjs.org)
212
+ - [shadcn-vue](https://www.shadcn-vue.com)
213
+ - [UnoCSS](https://unocss.dev)
214
+ - [VueUse](https://vueuse.org)
86
215
 
87
- Locally preview production build:
216
+ ## 🤝 Contributing
88
217
 
89
- ```bash
90
- pnpm preview
91
- ```
218
+ Contributions are welcome! Please feel free to submit a Pull Request.
219
+
220
+ ## 📄 License
221
+
222
+ This project is licensed under the MIT License.
223
+
224
+ ## 🙏 Acknowledgments
225
+
226
+ - [shadcn-docs-nuxt](https://github.com/shadcn/shadcn-docs-nuxt) - Original inspiration
227
+ - [shadcn-vue](https://www.shadcn-vue.com) - UI components
228
+ - [Nuxt](https://nuxt.com) - The framework
229
+
230
+ ---
92
231
 
93
- Checkout the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
232
+ Made with ❤️ by [Emmanuel Salomon](https://github.com/ManUtopiK/) with [WordUp.md](https://wordup.md)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wordup-md/nuxt-layer-shadcn-unocss",
3
3
  "type": "module",
4
- "version": "0.2.16",
4
+ "version": "0.2.18",
5
5
  "author": "Emmanuel Salomon <emmanuel.salomon@gmail.com>",
6
6
  "main": "./nuxt.config.ts",
7
7
  "repository": {
@@ -57,9 +57,9 @@
57
57
  "scripts": {
58
58
  "dev": "nuxi dev .playground",
59
59
  "dev:root": "nuxi dev",
60
- "build": "nuxt build .playground",
61
- "generate": "nuxt generate .playground",
62
- "preview": "nuxt preview .playground",
60
+ "build": "npx nuxt build .playground",
61
+ "generate": "npx nuxt generate .playground",
62
+ "preview": "npx nuxt preview .playground",
63
63
  "lint": "eslint .",
64
64
  "build:json-doc": "tsx scripts/buildContentDoc-cli.ts",
65
65
  "bump": "pnpm build:json-doc && git add public/content-doc.json && bumpp --skip-install --commit --push --tag",
package/vercel.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "buildCommand": "pnpm build",
3
+ "outputDirectory": ".playground/.vercel/output",
4
+ "installCommand": "pnpm install",
5
+ "ignoreCommand": "if git describe --exact-match --tags HEAD > /dev/null 2>&1; then exit 1; else exit 0; fi"
6
+ }
7
+