Configuration

Learn how to configure the documentation site made with UnDocs.

Example

# <!-- TODO: automd file generator should support code block wrapper! PR welcome ;) -->
<!-- automd:file src="../../template/.config/docs.yaml" -->

# yaml-language-server: $schema=https://unpkg.com/undocs/schema/config.json

name: 'packageName'
shortDescription: ''
description: ''
github: 'unjs/packageName'
# url: 'https://packageName.unjs.io'
# redirects:
#   "/from": "/to"
# automd: true
landing:
  heroLinks:
    stackblitz:
      icon: 'i-heroicons-play'
      to: 'https://stackblitz.com/github/unjs/packageName/tree/main/playground'
  # contributors: true
  # features:
  #   - title:
  #     description:

<!-- /automd -->

Reference

$schema

  • Type: string

automd

  • Type: boolean

Enable integration with https://automd.unjs.io

Banner configuration

actions

  • Type: array

Display a list of action buttons next to the title.

close

  • Type: undefined

closeIcon

  • Type: string
  • Default: "i-lucide-x"

The icon displayed in the close button (e.g., 'i-lucide-x').

color

  • Type: string
  • Default: "primary"

Banner color theme.

icon

  • Type: string

The icon displayed next to the title (e.g., 'i-lucide-info').

id

  • Type: string

A unique id saved to local storage to remember if the banner has been dismissed. Change this value to show the banner again.

target

  • Type: string

Link target attribute.

title

  • Type: string

The banner title text.

to

  • Type: string

Link destination URL or route path.

ui

UI customization classes for banner components.

actions
  • Type: undefined

Actions container classes

center
  • Type: undefined

Center section classes

close
  • Type: undefined

Close button classes

container
  • Type: undefined

Container element classes

icon
  • Type: undefined

Icon element classes

left
  • Type: undefined

Left section classes

  • Type: undefined

Right section classes

root
  • Type: undefined

Root element classes

title
  • Type: undefined

Title element classes

branch

  • Type: string

The branch of the GitHub repository for the documentation site.

buildCache

  • Type: boolean

Enable build cache (experimental)

description

  • Type: string

The description of the documentation site.

dir

  • Type: string

Documentation directory

Note: This option will be automatically set

github

  • Type: string

The GitHub repository for the documentation site.

landing

  • Type: undefined

lang

  • Type: string
  • Default: "en"

The language of the documentation site.

name

  • Type: string

The name of the documentation site.

redirects

Redirects for the documentation site.

shortDescription

  • Type: string

The description of the documentation site.

socials

Social media links for the documentation site.

sponsors

api

  • Type: string

The URL to the sponsors JSON API.

themeColor

  • Type: string

The theme color of the documentation site.

It will be used as the theme-color meta tag and a full palette of colors will be generated from it.

url

  • Type: string

The URL of the documentation site.

versions

  • Type: array

The versions of the documentation site.