Overriding Components
Replace any built-in Docus component by creating a file with the same name in yourcomponents/ directory.
Component Structure
Docus includes several key components you can override:Example: Custom Header
Create a custom header by overridingAppHeader.vue:
[components/app/AppHeader.vue]
1
Create Component
Create a new component in
components/app/AppHeader.vue2
Copy Base Structure
Copy the base structure from the original component or create your own
3
Customize
Add your custom functionality, styling, or layout
4
Auto-Import
Nuxt automatically imports your component, overriding the default
Custom Layouts
Create custom layouts for different page types:[layouts/custom.vue]
[content/docs/special-page.md]
Layouts give you full control over page structure while reusing components like
AppHeader and AppFooter.Custom Pages
Add custom pages by creating Vue components in thepages/ directory:
[pages/changelog.vue]
Extending Templates
Docus provides template pages that you can extend:Landing Page Template
The default landing page template is used when you don’t have anindex.vue:
[pages/index.vue]
Composables
Docus provides several composables you can use in your custom components:useDocusI18n
Ref<boolean>
Whether i18n is enabled
Ref<string>
Current locale code
LocaleObject[]
Available locales
(key: string) => string
Translation function
(path: string) => string
Get localized path
useSeo
useLogoAssets
Custom Modules
Create Nuxt modules to add functionality to Docus:[modules/analytics.ts]
[nuxt.config.ts]
Plugins
Add functionality with Nuxt plugins:[plugins/analytics.client.ts]
- Client-side
- Server-side
- Universal
Use
.client.ts suffix for plugins that only run in the browser:API Routes
Add custom API endpoints:[server/api/search.ts]
1
Create Handler
Create a file in
server/api/ directory2
Define Logic
Implement your API logic using Nuxt Content or other data sources
3
Use in Frontend
Call the API from your components:
Middleware
Add route middleware for authentication or redirects:[middleware/auth.ts]
[pages/admin.vue]
Nitro Configuration
Customize the server with Nitro configuration:[nuxt.config.ts]
boolean
default:"true"
Automatically discover and prerender linked pages
object
Configure caching, headers, and redirects per route pattern
Content Hooks
Hook into content processing:[nuxt.config.ts]
Next Steps
Nuxt Documentation
Learn more about Nuxt features
Nuxt Content
Explore Content module capabilities