ai

Mintlify Docs กับ Low Code No Code — วิธีสร้าง

Mintlify Docs กับ Low Code No Code — วิธีสร้าง

Mintlify คืออะไร

Mintlify Docs กับ Low Code No Code — วิธีสร้าง

Mintlify เป็น Modern Documentation Platform ที่ช่วยสร้าง Documentation Website สวยงามระดับมืออาชีพจาก Markdown และ MDX Files โดยอัตโนมัติ จุดเด่นคือ Design ที่สวยงามโดยไม่ต้อง Customize มาก รองรับ API Reference จาก OpenAPI Spec, Interactive Code Blocks, Search ในตัว, Analytics และ GitHub Sync สำหรับอัปเดต Content

เนื้อหาเกี่ยวข้อง — อ่านต่อ: Image Segmentation Scaling Strategy วิธี Scale

Mintlify เป็นตัวอย่างที่ดีของ Low-Code/No-Code Approach สำหรับ Developer Documentation เพราะแค่เขียน Markdown แล้ว Push ไป GitHub ก็ได้ Documentation Site ที่สมบูรณ์ ไม่ต้องจัดการ Build Process, Hosting หรือ CDN เอง

เนื้อหาเกี่ยวข้อง — ทำความเข้าใจ TTS Coqui Tech Conference 2026

การเริ่มต้นใช้งาน Mintlify

# ติดตั้ง Mintlify CLI
npm i -g mintlify

# สร้าง Project ใหม่
mintlify init

# โครงสร้างไฟล์
my-docs/
├── mint.json              # Configuration หลัก
├── introduction.mdx       # หน้าแรก
├── quickstart.mdx         # Quick Start Guide
├── api-reference/         # API Reference
│   ├── introduction.mdx
│   ├── authentication.mdx
│   └── endpoints/
│       ├── create-user.mdx
│       ├── get-user.mdx
│       └── update-user.mdx
├── guides/                # User Guides
│   ├── getting-started.mdx
│   ├── configuration.mdx
│   └── deployment.mdx
├── images/                # Static Images
│   ├── logo-dark.svg
│   └── logo-light.svg
└── openapi.yaml          # OpenAPI Specification

---
# mint.json — Configuration หลัก
{
  "$schema": "https://mintlify.com/schema.json",
  "name": "My Product Docs",
  "logo": {
    "dark": "/images/logo-dark.svg",
    "light": "/images/logo-light.svg"
  },
  "favicon": "/images/favicon.svg",
  "colors": {
    "primary": "#2563eb",
    "light": "#60a5fa",
    "dark": "#1e40af",
    "anchors": {
      "from": "#2563eb",
      "to": "#7c3aed"
    }
  },
  "topbarLinks": [
    {"name": "Dashboard", "url": "https://app.myproduct.com"}
  ],
  "topbarCtaButton": {
    "name": "Sign Up Free",
    "url": "https://app.myproduct.com/signup"
  },
  "tabs": [
    {"name": "Documentation", "url": "docs"},
    {"name": "API Reference", "url": "api-reference"}
  ],
  "anchors": [
    {"name": "GitHub", "icon": "github", "url": "https://github.com/myorg"},
    {"name": "Community", "icon": "discord", "url": "https://discord.gg/myorg"},
    {"name": "Blog", "icon": "newspaper", "url": "https://blog.myproduct.com"}
  ],
  "navigation": [
    {
      "group": "Getting Started",
      "pages": ["introduction", "quickstart"]
    },
    {
      "group": "Guides",
      "pages": [
        "guides/getting-started",
        "guides/configuration",
        "guides/deployment"
      ]
    },
    {
      "group": "API Reference",
      "pages": [
        "api-reference/introduction",
        "api-reference/authentication",
        {
          "group": "Endpoints",
          "pages": [
            "api-reference/endpoints/create-user",
            "api-reference/endpoints/get-user",
            "api-reference/endpoints/update-user"
          ]
        }
      ]
    }
  ],
  "footerSocials": {
    "twitter": "https://twitter.com/myproduct",
    "github": "https://github.com/myorg",
    "linkedin": "https://linkedin.com/company/myproduct"
  },
  "api": {
    "baseUrl": "https://api.myproduct.com",
    "auth": {
      "method": "bearer"
    }
  },
  "openapi": "openapi.yaml"
}

---
# รัน Development Server
mintlify dev

# Preview ที่ http://localhost:3000

การเขียน Content ด้วย MDX

# introduction.mdx — หน้าแรกของ Documentation
---
title: 'Welcome to My Product'
description: 'เริ่มต้นใช้งาน My Product API ภายใน 5 นาที'
icon: 'rocket'
---

## Quick Overview

My Product เป็น API Platform สำหรับจัดการ User Authentication
และ Authorization แบบครบวงจร

<CardGroup cols={2}>
  <Card title="Quick Start" icon="play" href="/quickstart">
    เริ่มต้นใช้งานภายใน 5 นาที
  </Card>
  <Card title="API Reference" icon="code" href="/api-reference">
    ดู Endpoint ทั้งหมด
  </Card>
  <Card title="SDKs" icon="rectangle-terminal" href="/sdks">
    Client Libraries สำหรับทุกภาษา
  </Card>
  <Card title="Examples" icon="lightbulb" href="/examples">
    ตัวอย่างการใช้งานจริง
  </Card>
</CardGroup>

## Installation

<CodeGroup>

```bash npm
npm install @myproduct/sdk
```

```bash yarn
yarn add @myproduct/sdk
```

```bash pip
pip install myproduct-sdk
```

</CodeGroup>

## Basic Usage

<Tabs>
  <Tab title="Node.js">
    ```javascript
    import { MyProduct } from '@myproduct/sdk';

    const client = new MyProduct({
      apiKey: process.env.MYPRODUCT_API_KEY,
    });

    const user = await client.users.create({
      email: 'user@example.com',
      name: 'John Doe',
    });
    console.log(user.id);
    ```
  </Tab>
  <Tab title="Python">
    ```python
    from myproduct import MyProduct

    client = MyProduct(api_key=os.environ["MYPRODUCT_API_KEY"])

    user = client.users.create(
        email="user@example.com",
        name="John Doe",
    )
    print(user.id)
    ```
  </Tab>
</Tabs>

<Info>
  ต้องสมัคร Account และสร้าง API Key ก่อนใช้งาน
  ดูวิธีที่ [Authentication Guide](/api-reference/authentication)
</Info>

<Warning>
  อย่าเปิดเผย API Key ใน Client-side Code
  ใช้ Environment Variables เสมอ
</Warning>

---
# api-reference/endpoints/create-user.mdx
---
title: 'Create User'
api: 'POST https://api.myproduct.com/v1/users'
description: 'สร้าง User ใหม่ในระบบ'
---

## Request Body

<ParamField body="email" type="string" required>
  อีเมลของ User ต้องเป็น Valid Email Format
</ParamField>

<ParamField body="name" type="string" required>
  ชื่อของ User ความยาว 2-100 ตัวอักษร
</ParamField>

<ParamField body="role" type="string" default="user">
  Role ของ User: `admin`, `editor`, `user`
</ParamField>

## Response

<ResponseField name="id" type="string">
  User ID ที่สร้างขึ้น (UUID format)
</ResponseField>

<ResponseField name="email" type="string">
  อีเมลของ User
</ResponseField>

<ResponseField name="created_at" type="string">
  วันที่สร้าง (ISO 8601 format)
</ResponseField>

<ResponseExample>
```json
{
  "id": "usr_abc123",
  "email": "user@example.com",
  "name": "John Doe",
  "role": "user",
  "created_at": "2026-03-01T10:00:00Z"
}
```
</ResponseExample>

OpenAPI Specification สำหรับ API Reference

Mintlify Docs กับ Low Code No Code — วิธีสร้าง
# openapi.yaml — สร้าง API Reference อัตโนมัติ
openapi: 3.1.0
info:
  title: My Product API
  version: 1.0.0
  description: API สำหรับจัดการ Users และ Authentication

servers:
  - url: https://api.myproduct.com/v1
    description: Production

security:
  - BearerAuth: []

paths:
  /users:
    post:
      operationId: createUser
      summary: สร้าง User ใหม่
      tags: [Users]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [email, name]
              properties:
                email:
                  type: string
                  format: email
                  description: อีเมลของ User
                name:
                  type: string
                  minLength: 2
                  maxLength: 100
                role:
                  type: string
                  enum: [admin, editor, user]
                  default: user
      responses:
        '201':
          description: User created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '400':
          description: Invalid request
        '409':
          description: Email already exists

    get:
      operationId: listUsers
      summary: ดึงรายการ Users
      tags: [Users]
      parameters:
        - name: page
          in: query
          schema:
            type: integer
            default: 1
        - name: limit
          in: query
          schema:
            type: integer
            default: 20
            maximum: 100
        - name: role
          in: query
          schema:
            type: string
            enum: [admin, editor, user]
      responses:
        '200':
          description: List of users
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/User'
                  pagination:
                    $ref: '#/components/schemas/Pagination'

components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
  schemas:
    User:
      type: object
      properties:
        id:
          type: string
        email:
          type: string
        name:
          type: string
        role:
          type: string
        created_at:
          type: string
          format: date-time
    Pagination:
      type: object
      properties:
        page:
          type: integer
        limit:
          type: integer
        total:
          type: integer

Low-Code/No-Code Features ของ Mintlify

  • GitHub Sync: เชื่อมต่อ GitHub Repository แล้ว Auto-deploy เมื่อ Push ไม่ต้องตั้ง CI/CD เอง
  • Built-in Search: Algolia Search ในตัว ไม่ต้อง Config เอง ค้นหาได้ทันทีเมื่อ Deploy
  • API Playground: ผู้ใช้ทดลองเรียก API ได้จากหน้า Docs เลย ไม่ต้อง Setup Postman
  • Analytics: ดู Page Views, Popular Pages, Search Queries เพื่อปรับปรุง Docs
  • Custom Domain: ใช้ Domain เช่น docs.myproduct.com ได้ทันที
  • Versioning: รองรับ Docs หลาย Version สำหรับ API เวอร์ชันต่างๆ
  • Feedback Widget: ผู้ใช้ให้ Feedback แต่ละหน้าว่ามีประโยชน์หรือไม่
  • i18n: รองรับหลายภาษาสำหรับ Global Documentation

เปรียบเทียบ Documentation Tools

FeatureMintlifyDocusaurusGitBookReadMe
Setup Time5 นาที30 นาที10 นาที15 นาที
Build Requiredไม่ต้องต้อง (React)ไม่ต้องไม่ต้อง
Self-hostedไม่ได้ได้ไม่ได้ไม่ได้
API PlaygroundมีPluginไม่มีมี
OpenAPI Supportมี (Auto-generate)Pluginจำกัดมี
Design Qualityสูงมากปรับแต่งได้ดีดี
Free PlanOpen Source onlyฟรี (Self-host)มี (จำกัด)มี (จำกัด)
MDX Supportมีมีไม่มีไม่มี

Mintlify คืออะไร

Mintlify เป็น Documentation Platform สำหรับสร้าง Docs Site สวยงามจาก Markdown/MDX Files รองรับ API Reference จาก OpenAPI Spec, Interactive Code Blocks, Search ในตัว และ GitHub Sync ไม่ต้องจัดการ Build หรือ Hosting เอง

แนะนำเพิ่มเติม — คอร์สเทรด Forex ที่ iCafeForex

เนื้อหาเกี่ยวข้อง — บทความที่เกี่ยวข้อง: Delta Lake Disaster Recovery Plan

XM Legend · เทรดเดอร์ & ผู้สอน Forex 13 ปี

ผู้ก่อตั้ง SiamCafe ตั้งแต่ปี 1997 · เทรดเดอร์สาย Forex มากกว่า 13 ปี ได้รับการยกย่องเป็น XM Legend · แบ่งปันความรู้ Forex, ไอที, AI และการเทรด จากประสบการณ์จริงในตลาดจริง