name: nuxt-project-guide description: This skill should be used when making updates or modifications to the Nuxt UI landing page project. It provides comprehensive documentation on the project architecture, content management system, component structure, and common update patterns. Use this skill when adding new sections, updating content, modifying components, changing visual design, or troubleshooting issues in this specific Nuxt 4 + Nuxt UI v4 + Nuxt Content project.
Nuxt Project Guide
Overview
This skill provides comprehensive guidance for working with this Nuxt UI landing page boilerplate. The project is a content-driven single-page application built with Nuxt 4, Nuxt UI v4, and Nuxt Content v3, where all page content is defined in a single YAML file and validated through Zod schemas.
When to Use This Skill
Use this skill when:
- Making any content updates to the landing page
- Adding new sections or features to the page
- Modifying visual design (colors, images, styles)
- Understanding how Nuxt Content, schemas, or data flow works
- Troubleshooting validation errors or build issues
- Updating components or layouts
- Configuring Nuxt settings or modules
Quick Decision Tree
"I need to update content"
- Determine which section needs updating
- Consult
references/quick-reference.md→ "Content Updates" section - Edit
content/index.yml→ corresponding section - Changes hot-reload automatically (no restart needed)
"I need to add a new section"
- Consult
references/project-overview.md→ "Data Flow" section - Follow the pattern: Schema → Content → Component
- Steps:
- Define schema in
content.config.ts - Add content to
content/index.yml - Add rendering logic to
app/pages/index.vue
- Define schema in
- Restart dev server after schema changes
"I need to change visual design"
- Identify what needs changing:
- Colors: Edit
app/app.config.ts(requires restart) - Images: Add to
public/images/light/andpublic/images/dark/ - Styles: Edit
app/assets/css/main.css(hot-reloads) - Layout: Edit component files in
app/components/
- Colors: Edit
- Consult
references/quick-reference.md→ "Visual Design Updates"
"I need to understand how something works"
- Consult
references/project-overview.mdfor comprehensive documentation - Navigate to relevant section:
- How Nuxt Builds Pages - Understanding the build process
- Layout System - How app.vue and layouts work
- Nuxt Content Integration - How YAML becomes queryable data
- Component Architecture - Component hierarchy and patterns
- Data Flow - How content flows through the system
"I'm getting validation errors"
- Check terminal output for specific error from Zod
- Consult
references/project-overview.md→ "Nuxt Content Integration" → "Content Schema" - Verify content in
content/index.ymlmatches schema incontent.config.ts - Common issues:
- Missing required fields
- Wrong data types
- Invalid enum values
- Typos in field names
Core Concepts
Content-Driven Architecture
All page content lives in content/index.yml. This YAML file is:
- Validated against Zod schemas in
content.config.ts - Queried in
app/pages/index.vueusingqueryCollection('content').first() - Passed as props to Nuxt UI components
- Hot-reloaded in development (no restart needed for content changes)
Data Flow Pattern
content/index.yml
↓ validated by
content.config.ts (Zod schemas)
↓ queried by
app/pages/index.vue (queryCollection)
↓ passed to
Nuxt UI Components
↓ rendered as
HTML
Three Types of Changes
1. Content-Only Changes (No restart needed)
- Edit
content/index.yml - Changes hot-reload automatically
- Examples: Update text, change links, modify descriptions
2. Schema/Config Changes (Restart required)
- Edit
content.config.ts,nuxt.config.ts, orapp.config.ts - Restart dev server: Stop and run
pnpm devagain - Examples: Add new section, change validation rules, update modules
3. Component Changes (No restart needed)
- Edit
.vuefiles inapp/components/orapp/pages/ - Changes hot-reload automatically
- Examples: Update layout, modify styling, change structure
Working with Content
Editing Existing Content
- Open
content/index.yml - Locate the section to edit (hero, features, pricing, etc.)
- Make changes following YAML syntax
- Save file - changes appear immediately in browser
- If validation errors appear, check schema in
content.config.ts
Using MDC Syntax for Styled Text
Content supports inline styling with MDC syntax:
title: '[Highlighted text]{.text-primary} regular text'
This renders "Highlighted text" with the .text-primary CSS class applied.
Common Content Sections
seo:- SEO metadata (title, description)hero:- Hero section with title, description, and CTA linkssection:- Feature showcase sectionfeatures:- Features gridsteps:- Step-by-step guidepricing:- Pricing planstestimonials:- Customer testimonialscta:- Final call-to-action section
Working with Schemas
Understanding Schemas
Schemas define the structure and validation rules for content. Located in content.config.ts, they use Zod for runtime validation.
Adding a New Section
To add a completely new section to the page:
- Define the schema in
content.config.ts:
myNewSection: createBaseSchema().extend({
items: z.array(z.object({
title: z.string().nonempty(),
description: z.string().nonempty()
}))
})
- Add content to
content/index.yml:
myNewSection:
title: "Section Title"
description: "Section description"
items:
- title: "Item 1"
description: "Description 1"
- Render in page at
app/pages/index.vue:
<UPageSection
:title="page.myNewSection.title"
:description="page.myNewSection.description"
:items="page.myNewSection.items"
/>
- Restart dev server to load new schema
Modifying Existing Schemas
To change validation rules for existing content:
- Edit schema in
content.config.ts - Update content in
content/index.ymlto match new rules - Restart dev server
- Check terminal for validation errors
Working with Components
Component Locations
- Layout components:
app/components/AppHeader.vue,app/components/AppFooter.vue - Decorative components:
app/components/HeroBackground.vue,app/components/StarsBg.vue - Utility components:
app/components/AppLogo.vue,app/components/TemplateMenu.vue - Page component:
app/pages/index.vue(main landing page) - Root layout:
app/app.vue(wraps entire app)
Modifying Components
- Locate the component file in
app/components/orapp/pages/ - Make changes to template, script, or style sections
- Save file - changes hot-reload automatically
- No restart needed for component changes
Using Nuxt UI Components
The project heavily uses pre-built Nuxt UI components:
UPageHero- Hero sectionsUPageSection- Content sectionsUButton- Buttons with variantsUColorModeImage- Images that swap based on color modeUPricingPlans/UPricingPlan- Pricing cards- And many more...
Consult references/project-overview.md → "Component Architecture" for complete list and usage.
Visual Design
Changing Colors
Edit app/app.config.ts:
export default defineAppConfig({
ui: {
colors: {
primary: 'orange', // Change to any Tailwind color
neutral: 'neutral'
}
}
})
Restart required after this change.
Adding Dark/Light Mode Images
- Add light version to
public/images/light/filename.svg - Add dark version to
public/images/dark/filename.svg - Use in components:
<UColorModeImage
light="/images/light/filename.svg"
dark="/images/dark/filename.svg"
/>
Updating Global Styles
Edit app/assets/css/main.css with custom CSS. Changes hot-reload automatically.
Configuration
Updating Nuxt Config
Edit nuxt.config.ts for:
- Adding modules
- Changing build settings
- Configuring prerendering
- ESLint rules
- MDC settings
Always restart dev server after config changes.
Understanding Build Process
- Development:
pnpm dev- Hot reload enabled - Production Build:
pnpm build- Static site generation - Preview:
pnpm preview- Test production build locally
The build prerenders the / route, creating static HTML ready for deployment.
Reference Materials
Quick Reference
Consult references/quick-reference.md for:
- Common update patterns
- File location cheat sheet
- When to restart dev server
- Common gotchas
- Quick commands
Comprehensive Documentation
Consult references/project-overview.md for:
- Complete architecture overview
- Detailed explanations of Nuxt, Nuxt Content, and layouts
- Component architecture breakdown
- Visual design system details
- Data flow diagrams
- Development workflow guidance
When to Use Which Reference
Use quick-reference.md when:
- Making routine updates
- Need to quickly locate a file
- Want to verify if restart is needed
- Looking for common patterns
Use project-overview.md when:
- Learning how the system works
- Adding new functionality
- Troubleshooting complex issues
- Understanding architecture decisions
- Need detailed technical explanations
Troubleshooting
Content Validation Errors
- Check terminal output for Zod error message
- Locate the problematic field in
content/index.yml - Compare against schema in
content.config.ts - Fix content to match schema requirements
- Restart dev server if schema was modified
Build Errors
- Check terminal output for specific error
- Run
pnpm typecheckto identify TypeScript errors - Run
pnpm lintto identify ESLint errors - Consult
references/project-overview.mdfor architecture guidance
Hot Reload Not Working
- Verify dev server is running (
pnpm dev) - Check if change requires restart (config files do)
- Try manual browser refresh
- Restart dev server as last resort
Best Practices
Before Making Changes
- Understand current architecture (consult references)
- Identify all files that need updating
- Follow existing patterns in the codebase
- Know whether restart is required
After Making Changes
- Verify changes appear correctly in browser
- Check terminal for errors or warnings
- Test in both light and dark modes (if visual changes)
- Run
pnpm typecheckandpnpm lintbefore committing
Content Updates
- Keep YAML properly indented (use 2 spaces)
- Follow existing content structure
- Use MDC syntax for inline styling
- Validate against schema before saving
Component Updates
- Follow existing component patterns
- Use Nuxt UI components when possible
- Maintain responsive design (test mobile views)
- Use TypeScript for type safety
Schema Updates
- Update schema first, then content
- Restart dev server after schema changes
- Use descriptive validation errors
- Extend existing schemas when possible (use
.extend())