Understanding Configuration
While DocLayer is designed as a zero-config solution, and our main intention was to build a product that follows the "convention over configuration" principle, we also provide a straightforward way - based on sensible defaults - to customize its appearance and functionality to suit your needs, without diving into the internals.
For this, we use Nuxt’s well-established app.config.ts file, which is intended to store application closest and custom configuration.
app.config.ts
app.config.ts is a relatively new feature, introduced after Nuxt 3, and it aligns closely with the new application structure introduced in the Nuxt 4.
You can read more about app.config.ts in the Nuxt documentation.
To ensure type-safe configuration, we've provided a macro function called defineDoclayerAppConfig. This wraps your App Config with our predefined DocLayer configuration, giving you type suggestions for all DocLayer settings as well as your own custom options, defined via the CustomAppConfig type.
You can treat app.config.ts just like a regular Nuxt application configuration file. Any options related to Nuxt Modules or plugins (such as Nuxt UI) can still be defined within the defineDoclayerAppConfig macro.
With this setup, you’ll see type suggestions for all DocLayer’s built-in settings, Nuxt's settings, as well as your own custom properties.

Notice that the object passed to defineDoclayerAppConfig is empty by default. This means all default configuration is applied, and you likely don’t need to change anything unless you want to customize application behavior.
Default Configuration
Below you’ll find the full default DocLayer configuration, which you can freely adjust/change to your needs. All preferences are optional and have their sensible defaults. Review the list to learn more about each setting.
API Reference
All DocLayer configuration is available under the dl key accessible from the app.config.ts. Here you can find a full AppConfig Reference.
useAppConfig composable
When building custom components, pages, composables or utility functions the contents of app.config.ts are available throughout your app via Nuxt’s native useAppConfig composable.
dl.adapters
An object containing DocLayer extensibility endpoints (adapters). Currently, this is used only for the Newsletter, which can be connected to the DlNewsletter component that can be used e.g., on the Landing Pages.
To learn how to use pre-built adapters, create one from scratch, or work with DocLayer Adapters in general, read the documentation here.
| type | default | required |
|---|---|---|
Adapters | undefined | no |
By default, any adapter is connected.
dl.components
An object that allows you to specify global settings for individual components. Configuration options vary by component; visit the relevant component's documentation page for details.
The list below shows which components support global configuration.
| Name | Type | Docs |
|---|---|---|
DlCode | Block | Go to page |
dl.pathMap
An array that lets you map your content paths to special keys (markers) for use with the DlLink component. By default, DocLayer automatically creates an internal JSON file that links each content document path to a unique marker. These markers are registered automatically and can be referenced directly in the DlLink component. You can also define your own custom mappings, giving you full control over the path data, including support for external links.
| type | default | required |
|---|---|---|
PathMap | [] | no |
This is how you can define custom mapping:
The TypeScript compiler will suggest all predefined markers, both for standard registry strings and for custom object marker values.

pathMap suggestionsOverwriting default mapping
You can override automatically generated paths by creating a custom mapping with the same marker as an existing one. In this case, your custom mapping will take priority and be used instead of the default. This is especially useful if you want to use already defined markers but the content path has changed, or you want to use a different label.
dl.transformers
An object containing custom transformers. Currently there are two transformers available:
code- allows you to transform code blocks inside theDlCodecomponent before they are rendered. It is currently used to escape selected chunks of code.content- allows you to transform Markdown content both before it is converted to an AST (pre, as Markdown) and after (post) it has been rendered to HTML from the AST. These transformations are applied to every dynamic page.
| type | default | required |
|---|---|---|
Transformers | see below | no |
Below, transformers provided by default.
Caution when defining custom transformers
Please note that transformer functions utilize the pre-built, internal set of utilities. Also, these transformers are applied globally across all content. If you use a dedicated method to transform parts of your code or content, make sure to reuse the results of the existing transformers when defining your custom ones. You can do this as follows:
dl.ui
This object contains layout-related behavioral configuration. If you want to adjust DocLayer’s layout preferences, this is the section you’ll likely want to modify.
Theming
Visually, DocLayer is themed using CSS Variables and dedicated Tailwind utility classes. More about theming setup you can read here.
All items within this object are predefined and optional. You only need to define them in your app.config.ts file if you want to change or extend certain options.
dl.ui.colorMode
Sets the preferred color mode for the application.
DocLayer uses Nuxt’s Color Mode Module to control the application color mode. More about the internal module usage you can read here.
| type | default | required |
|---|---|---|
'dark' | 'light' | 'system' | system | no |
dl.ui.header
Controls whether the layout Header is displayed on the Landing Page.
| type | default | required |
|---|---|---|
boolean | true | no |
dl.ui.headerLogoPath
The path to the layout Header logo. By default, the logo is placed in the /public directory, so it’s accessible directly from the base application URL (e.g., your.domain/logo.webp). There’s no need to specify the path if you use the default.
To keep the default, simply add your logo file (logo.webp) to the /public directory.
To use different logos for light and dark modes, provide an object with light and dark properties, using the same image path rules for each. You can also add an optional fallback property, which will be used when the color mode is set to system or is not yet determined. If no fallback is provided and color mode is not resolved yet, the logo stays hidden.
Image optimization
Images in the /public directory are always optimized by the Nuxt Image Module. Images in /app/assets are not, as they’re handled by the internal bundler (Vite or Webpack).
Everything you need to know about image optimization you can read here.
| type | default | required |
|---|---|---|
'/logo.webp' | no |
dl.ui.headerLogoWidth
Controls the width of the layout Header logo, in rem units.
DocLayer uses only rem units for sizing. More about in-CSS sizing and layout scaling setup you can read here.
| type | default | required |
|---|---|---|
'${string}rem' | 'auto' | '9rem' | no |
dl.ui.headerLogoHeight
Controls the height of the layout Header logo, in rem units.
| type | default | required |
|---|---|---|
'${string}rem' | 'auto' | 'auto' | no |
dl.ui.headerIconSize
Sets the size of the right-side Header icons menu, in rem units.
| type | default | required |
|---|---|---|
'${string}rem' | '1.5rem' | no |
dl.ui.headerIconsReverse
If set, reverses the order of the right-side Header icons menu.
| type | default | required |
|---|---|---|
boolean | undefined | no |
dl.headerIcons
An object with an array of links for the application's right-side Header icons menu.
| type | default | required |
|---|---|---|
{ links: Exclude<NavLink, '_overwrite'>; } | undefined | no |
To add new icons to the right-side Header menu, note that the Search and Color Mode icons are always present. You can add your own custom icons (e.g., for a GitHub, Discord, etc.) as follows:
By default we use Bootstrap icon set for the header icons, so any prefix is not required. However, you can use any other icon set by adding the prefix to the icon name. For example: icon: 'vscode-icons:icon-name' or icon: 'lucide:icon-name'.
dl.inDocData
An object containing custom data that can be accessed in your Markdown (.md) files. This might be really handy if you want to reuse certain data across your content. Any property you add to this object can be accessed using the special data binding $doc handler.
| type | default | required |
|---|---|---|
Record<string, Primitive | PrimitiveRecord> | no | no |
To keep this object manageable, it's restricted by the type to define only one nested object and use only basic primitives as values.
This is how you can set and get (use) your data:
dl.meta
An object containing global SEO metadata. It's used to populate data to SEO meta tags throughout your application.
DocLayer handles SEO metadata using the unhead and SchemaOrg Modules, both integrated via the internal useDynamicHead composable. You can learn more about this setup here.
| type | default | required |
|---|---|---|
Record<'title' | 'description' | 'keywords' | 'author' | 'robots' | 'tag' | 'locale' | 'og:${string}', string> | see below | no |
To define SEO metadata, you have two options:
- Use environment variables - these will take precedence over default values..env
- Overwrite the
metaobject inapp.config.ts.
By default, DocLayer automatically handles several og (Open Graph) tags for you. For example, og:title and og:description are set based on the values you provide in meta.title and meta.description. Tags like og:locale, og:type, and og:url are also managed.
If you want to add more Open Graph tags globally, or override the default values, simply add or update properties in the meta object. For example:
On how to define and handle metadata locally you can read here.
dl.schemaOrg
This object contains global values that will be propagated to the Schema.org graph.
| type | default | required |
|---|---|---|
SchemaOrg | undefined | no |
More about local Schema.org metadata, you can read here.
dl.llms
An object containing data used to generate the llms.txt static file. Note that this file is only available at build time and will be included in your final built static app.
DocLayer uses the Nuxt LLMs Module, which implements the llms.txt file concept. This is paired with a dedicated internal plugin that enables you to control the data from app.config.ts. The plugin also collects content data to generate llms.txt sections. More about this setup, you can read here.
| type | default | required |
|---|---|---|
LLMOptions | see below | no |
To define LLMs data, follow the same rules as for SEO metadata. Here are the environment variables you can use:
