Docs
Planning

Planning

How to plan your documentation

The first step in planning your documentation is to decide what you want to document.

It's better to have a raw structure of your documentation on paper, for example.

Step 1: Edit docs.ts file

The file location src/config/docs.ts

The file structure is simple, it's an array of objects, where each object is a category of your documentation.

interface DocsConfig {
  mainNav: MainNavItem[];
  sidebarNav: SidebarNavItem[];
}

Documentation structure explanation

For this section we only need to edit sidebarNav properties. title: "Getting Started" is the name of the category. And items array is actually your docs. The mandatory field is only title.

sidebarNav: [
  {
    title: "Getting Started",
    items: [
      {
        title: "Introduction",
        href: "/docs",
        icon: "doorOpen",
      },
      {
        title: "Installation",
        href: "/docs/installation",
        icon: "terminal",
      },
    ],
  },
];

Step 2: Create .mdx documentation files.

All documentation files should be stored in src/content/docs folder.

The file name should be the same as the href property in the docs.ts file. For example, if you have href: "/docs/installation" in the docs.ts file, the file name should be installation.mdx.

Documentation link and filename structure explanation

Step 3. All is done!

Now you're ready to fill your new installation.mdx file with necessary information.