π¨ Customization Guide
Docsly is intentionally unopinionated about style and layout, giving you full control over how your documentation looks and behaves. Here's how to customize it to match your brand or structure.
π§± Layouts
By default, Docsly uses a single layout file at layouts/default.vue. You can modify this or add new ones based on routes or content types.
<template>
<div>
<Header />
<main class="prose mx-auto px-4">
<slot />
</main>
<Footer />
</div>
</template>
Want a sidebar layout? Add a new one like layouts/docs.vue and use it in frontmatter:
---
layout: docs
---
π§© Components
All reusable UI elements live in the components/ directory. Youβre encouraged to extend, replace, or create your own versions.
Example: customize the Callout component or add a new one like CopyButton.vue.
You can use these directly inside markdown too:
<Callout type="info">
This is reusable and customizable.
</Callout>
π¨ Styling with Tailwind
Tailwind CSS is already set up. To change the design language:
- Modify
tailwind.config.ts(e.g., extend colors, fonts, spacing) - Add global CSS to
styles/main.css - Use utility classes across layouts and components
Example:
extend: {
colors: {
brand: '#10B981',
},
}
π Dark Mode
Dark mode is handled with Tailwindβs dark strategy:
darkMode: 'class'
You can toggle themes via a component or plugin:
const colorMode = useColorMode();
colorMode.preference = 'dark';
π§ Icons & Fonts
You can add custom icons (e.g., using Iconify) or fonts (e.g., Google Fonts) by extending the app.head in nuxt.config.ts.
head: {
link: [
{ rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Inter&display=swap' },
]
}
π§© Custom Markdown Components
To enhance your content, create custom components (e.g. Hero.vue, CodeBlock.vue) and use them directly in markdown files.