On this page

docuo.config.json

这是第一篇文章我修改了, 我是 sunlyshining

INFO

Refer to the Getting Started Configuration for examples.

Overview

docuo.config.json contains configurations for your site and is placed in the root directory of your site. This file is run in Node.js and should returns a standard json format of content.

Examples:

docuo.config
{
  "title": "Your site title",
  "favicon": "Your site favicon"
}
1
Copied!
TIP

Refer to Syntax to declare docuo.config.json for a more exhaustive list of examples and explanations.

Required fields

title

  • Type: string

Title for your website. Will be used in metadata and as browser tab title.

docuo.config
{
  "title": "Your site title"
}
1
Copied!

themeConfig

  • Type: Object

The theme configuration object to customize your site UI like navbar and footer.

Example:

docuo.config
{
  "themeConfig": {
    "navbar": {
      "title": "Your navbar title",
      "logo": "Your navbar logo",
      "items": [
        {
          "type": "docSidebar",
          "sidebarIds": ["mySidebar"],
          "label": "Documentation",
          "position": "left"
        }
      ]
    },
    "footer": {
      "logo": "Your footer logo",
      "caption": "Your caption",
      "links": [
        {
          "title": "Product",
          "items": [
            {
              "label": "documentation",
              "to": "/"
            }
          ]
        }
      ],
      "socials": [
        {
          "logo": "Twitter",
          "href": "Your twitter url"
        },
        {
          "logo": "LinkedIn",
          "href": "Your linkedin url"
        },
        {
          "logo": "Discord",
          "href": "Your discord url"
        },
        {
          "logo": "Github",
          "href": "Your github url"
        }
      ]
  	} 
  }
}
1
Copied!

Optional fields

favicon

  • Type: string | undefined

Path to your site favicon; must be a URL that can be used in link's href. For example, if your favicon is in static/image/favicon.ico:

TIP

docuo 内部默认static目录是静态目录,Files under these paths will be copied to the build output as-is,即绝对路径

docuo.config
{
  "favicon": "image/favicon.ico"
}
1
Copied!