Docs layer exports
What @lupinum/ginko-docs offers publicly. The package entry points, the functions for ginko.config.ts, the option in nuxt.config.ts, the components, the override points and what stays internal.
Entry points
@lupinum/ginko-docs has four entry points. Import only these paths; every other file in the package is internal and can change in any release.
| Entry point | What it is |
|---|---|
@lupinum/ginko-docs | The Nuxt layer for extends in nuxt.config.ts |
@lupinum/ginko-docs/config | The bricks and page addresses for ginko.config.ts |
@lupinum/ginko-docs/pages | Nuxt module that registers the layer's pages. The layer loads it itself. |
@lupinum/ginko-docs/icons | Nuxt module that bundles the icons at build time. The layer loads it itself. |
Do not add the two modules to modules: extends: ['@lupinum/ginko-docs'] brings them along.
The layer
// nuxt.config.ts
import ginko from './ginko.config.ts'
export default defineNuxtConfig({
extends: ['@lupinum/ginko-docs'],
modules: ['@lupinum/ginko/nuxt'],
ginko,
})The entry point is the layer's configuration, not a collection of functions. Through Nuxt's layer mechanism it adds pages, layout, components, CSS and the modules above, plus @lupinum/ginko-components.
The only option in nuxt.config.ts is ginkoDocs.brick: the key of the docs brick when it is not docs.
// nuxt.config.ts
export default defineNuxtConfig({
extends: ['@lupinum/ginko-docs'],
ginkoDocs: { brick: 'wissen' }, // the same key as docsCollection({ brick: 'wissen' })
})config
import { blogCollections, blogPages, changelogCollection, changelogPages, components, docsCollection, docsHome, homePages } from '@lupinum/ginko-docs/config'
import type { DocsSource } from '@lupinum/ginko-docs/config'| Export | Kind | Purpose |
|---|---|---|
docsCollection({ locales, base?, source?, navExtras?, brick?, label?, max? }) | Function | The docs brick. Pages under base (default /docs). |
docsHome({ source? }) | Function | The optional start page: content/home.md. |
blogCollections({ locales, source?, max? }) | Function | The optional blog: { posts, authors }, spread into bricks. |
changelogCollection({ source?, max? }) | Function | The optional changelog. |
homePages({ locales }) | Function | The start page's addresses by locale, for pages. |
blogPages({ locales }) | Function | The blog list's addresses by locale, for pages. |
changelogPages({ locales }) | Function | The changelog's addresses by locale, for pages. |
components | Object | The registry of the Markdown components of @lupinum/ginko-components, for components in defineSite. |
DocsSource | Type | 'files' (default) or 'platform': where a brick reads its content from. |
The bricks read files unless you say otherwise: docs usually live in Git. With source: 'platform' the content lives on the platform, and editors change it in the Studio. How to use the functions is on Docs sites.
App config
The options go under docs in the site's app.config.ts. The layer extends the types of defineAppConfig, so TypeScript checks every option without a type import. The list of options is on Docs sites.
The layer's texts are messages under docs.*. The site's own messages win key by key. The layer brings English, German and French.
Components
These components are public and stay stable between releases:
| Component | Props and slots | Purpose |
|---|---|---|
<DocsSearch /> | shortcut (default true): / and Ctrl/⌘ K open the search | The search, for example in the site's own header |
<DocsLanguage /> | list: a row of links instead of a menu | The languages of the current page |
<DocsThemeToggle /> | segmented: the three-way Auto/Light/Dark switch | The light/dark switch |
<DocsShell> | slot default for the page, slot bar for controls in the phone bar | Navigation and search around a page of your own |
<Icon name="lucide:…" /> | name | An icon from the layer's bundle. If the site installs @nuxt/icon, its Icon wins. |
Two empty components are override points. The site replaces them with its own file of the same name in app/components/:
| Component | Props | Where it appears |
|---|---|---|
DocsPageEnd | doc, the page's entry | After the text of every docs page, before "Edit this page" and the pager |
DocsSidebarEnd | none | Below the navigation, in the sidebar and in the phone menu |
Examples are on Theming and overrides.
Internal
Everything else is internal and can change in any release: the other Docs* components, the useDocs* composables, the files under app/ and the CSS classes. The functions that @lupinum/ginko-docs/icons exports next to the module are there for the package's tests. For the look, the tokens on Theming and overrides are the public interface, not the classes.