Organize Files

Directory Introduction

By default, Qiandu is maintained based on Hugo, so the content searches for Markdown files in the content directory. The directory structure determines the final output structure of the website. For example:

    • _index.md
      • _index.md
      • getting-started.md
        • _index.md
        • organize-files.md
      • _index.md
      • post-1.md
  • Each _index.md file is the index page of the corresponding section, and other Markdown files are regular pages.

    content
    ├── _index.md // <- /
    ├── docs
    │ ├── _index.md // <- /docs/
    │ ├── getting-started.md // <- /docs/getting-started/
    │ └── guide
    │ ├── _index.md // <- /docs/guide/
    │ └── organize-files.md // <- /docs/guide/organize-files/
    └── blog
    ├── _index.md // <- /blog/
    └── post-1.md // <- /blog/post-1/

    Sidebar Navigation

    The sidebar navigation is automatically generated based on the alphabetical order of the content organization. To manually configure the sidebar order, use the weight config in the frontmatter of the Markdown file.

    content/docs/guide/_index.md
    ---
    title: Guide
    weight: 2
    ---
    ℹ️
    It is recommended that the sidebar is not too deep. If there is too much content, consider breaking them into multiple sections.

    Configure Content Directory

    If you need to use a different directory for your content, you can contact your administrator to set contentDir in the site configuration file to achieve this.