Global Instance
For convenient and universal access, DocLayer exposes a global instance available on both the server and client sides. This can be especially useful when building features where the Vue or Nuxt context might not be directly available. Since the global instance is accessible everywhere, you can use it confidently throughout your application.
To reach DocLayer's globally exposed internals, simply use globalThis.__DL__.
The global instance (globalThis.__DL__) will expose the following properties for you to access from anywhere in your application - whether on the server or client: appConfig, adapterData, utils (utilLogger, utilLogMessage).

Logger
We've exposed a single global instance of logger, powered by Consola. For consistent and readable logging, this logger is used throughout the entire codebase. We recommend using this instance whenever you need to log messages, rather than creating new logger instances. Logging will be even more consistent when you combine it with the utilLogMessage utility. You can access it as shown below:
The logger uses a globally defined tag by default, which can be set using the DL_TAG environment variable. This means you don't need to specify a tag each time you use the logger. More about defining global metadata, you can read here.
Exports
The DocLayer package provides several entry points that expose utilities, types, and configuration objects. You can access them as shown below - we've listed your options here:
@vuehouse/dl/exports
This entry point primarily exports utilities, macros, and adapters. All of these are fully tree-shakeable and work independently. You can find detailed documentation for each export on its dedicated page, where we additionally note how to import and use each one.
@vuehouse/dl/types
All utility types documented on the types page are available from this entrypoint. Simply import them by name from the package as needed.
Packages
Below is a list of packages that are part of the DocLayer ecosystem, along with a brief description of their responsibilities and guidance on how to use them.
License | Description | |
|---|---|---|
Core | MIT | The main DocLayer package. Nuxt module that extends a standard Nuxt application, enabling you to build on top of DocLayer. |
Search | MIT | Search module enables text-based search and AI assistance within your content. It is tightly integrated with DocLayer, providing a seamless search experience in module-powered applications. |
Markdownlint Rules | MIT | A set of |
ESLint Configuration | MIT | Globally defined ESLint configuration used across the DocLayer monorepo. It provides rules for both module-based applications and internal Nuxt components. |
Vercel Deployment | MIT | A complementary package for Vercel deployment that ensures the correct platform-specific configuration and final build structure. It is especially super useful if you want to work with Vercel's CLI and CI/CD pipelines. |
CLI | MIT | A command-line interface for DocLayer. It provides a set of commands to help you manage your DocLayer-based application. |
AI Kit | MIT | Complementary package enabling AI capabilities for DocLayer. Providing advanced |
