Add Our First Documentation

Folder Structure
├── content
│   └── en
│       └── docs
├── data
│   └── en
│       └── docs
├── static
│   ├── manifest.json
│   └── sw.js
├── hugo.yaml
└── themes
    └── E25DX

Initialize Our First Documentation

Recap

Here, we are going to create the documentation’s overview and two more pages belongs to two sections in the sidebar. For example, “Documentation::Overview”, “Basics::Hello World” and “Beyond The Basics::Modules”

  1. Create new content/en/docs folder to store .md files for the pages and data/en/docs/ folder to store .yaml files for the sidebar.

    mkdir -p content/en/docs && mkdir -p data/en/docs
  2. Add content/en/docs/_overview.md for overview.

    ---
    title: Overview
    url: "docs/overview"
    aliases:
    - "/docs"
    ---
    
    Overview/ Any Markdown
  3. Add content/en/docs/a1.hello-world.md as the first page of first section.

    ---
    title: Hello World
    slug: hello-world
    ---
    
    Hello World/ Any Markdown
  4. Add content/en/docs/b1.modules.md as the first page of the second section.

    ---
    title: Modules
    slug: modules
    ---
    
    Module/ Any Markdown
  5. Add data/en/docs/sidebar.yml for section titles and page titles.

    - title: Documentation
      pages:
        - title: Overview
    
    - title: Basics
      pages:
        - title: Hello World
    
    - title: Beyond The Basics
      pages:
        - title: Modules