Project Structure
Understand how Docus organizes your documentation project and what each directory contains.Overview
Docus is a Nuxt layer that extends your standard Nuxt application with documentation features. This layer-based approach gives you the flexibility of a full Nuxt project while keeping your documentation as the primary focus.Minimal Structure
When you create a new Docus project withnpx create-docus my-docs, you get a minimal, clean structure:
This minimal structure is all you need to start writing documentation. The Docus layer provides all the theming, routing, and UI components.
Full Nuxt Project Structure
Since Docus is a Nuxt layer, you can extend it with any feature from a standard Nuxt project:Core Directories
content/ Directory
This is where you write your documentation in Markdown. Docus automatically generates routes based on your file structure.
Single Language Structure
For single-language documentation, organize files directly in the content directory:/→index.md/getting-started→getting-started.md/guide/introduction→guide/introduction.md/guide/configuration→guide/configuration.md
Multi-language Structure (i18n)
For multi-language documentation, organize content by locale:/en→en/index.md/en/getting-started→en/getting-started.md/fr→fr/index.md/fr/getting-started→fr/getting-started.md
Markdown Frontmatter
Each Markdown file can include frontmatter for metadata:public/ Directory
Files in the public/ directory are served at the root path and are not modified by the build process:
Files in
public/ are served as-is. For optimized images, consider using Nuxt Image’s <NuxtImg> component.Configuration Files
package.json
The minimal Docus package.json includes only essential dependencies and scripts:
package.json
docusprovides the documentation layerbetter-sqlite3is required by Nuxt Content for native SQLite connectornuxtis the core framework- Scripts use
--extends docusflag to apply the layer
nuxt.config.ts (Optional)
This file is not mandatory to start a Docus application. Only create it if you need to customize the configuration.
nuxt.config.ts to extend Docus with additional modules or configuration:
nuxt.config.ts
app.config.ts (Optional)
This file is not mandatory and requires
nuxt.config.ts to be present.app.config.ts to customize Docus branding, SEO, and UI settings:
app.config.ts
Optional Directories
app/components/
Create custom Vue components to use in your Markdown:
app/layouts/
Override default layouts or create custom ones:
app/pages/
Create custom Vue pages outside of the content system:
server/api/
Add server API routes for dynamic functionality:
File Naming Conventions
Numbered Prefixes
Use numbered prefixes to control ordering in the sidebar navigation:The numbers are stripped from the URL.
1.introduction.md becomes /getting-started/introductionIndex Files
Useindex.md for directory landing pages:
Dependencies
Docus relies on these core packages:docus- The documentation layer (version 5.7.0)nuxt- Core framework (version 4.x)@nuxt/content- Content management system@nuxt/ui- UI component library@nuxt/image- Image optimizationbetter-sqlite3- SQLite database for content indexingtailwindcss- CSS framework (version 4.x)
Optional Dependencies
@nuxtjs/i18n- Internationalization support@nuxtjs/mcp-toolkit- Model Context Protocol integrationnuxt-llms- LLM integration featuresnuxt-og-image- Open Graph image generation
Layer System
Theextends: ['docus'] configuration means your project inherits:
- Pre-configured Nuxt modules
- Documentation theme and layouts
- UI components from Nuxt UI
- Routing logic for content
- Search functionality
- Navigation generation
- SEO optimizations
Extends Feature
The Nuxt
extends feature allows you to layer multiple configurations, letting you override or extend the base Docus theme.Full Nuxt Power
You have access to the entire Nuxt ecosystem. Add any Nuxt module or feature to your Docus project.
Next Steps
Studio Module
Learn how to edit your documentation visually in production
Migration Guide
Migrate from Docus v3 or other documentation frameworks