跳至主要內容

API Reference

Complete API reference for MIDA theme components and functions

2024-01-15 2分鐘 T 進階

MIDA API Reference

Complete reference documentation for MIDA theme APIs and components.

Core Components

Lucide Icon Helper

The lucide-icon.html partial provides intelligent icon rendering.

Usage:

1{{ partial "helpers/lucide-icon.html" (dict "name" "menu" "size" "lg") }}

Parameters:

  • name (required): Icon name
  • size (optional): xs, sm, base, lg, xl, 2xl, 3xl
  • class (optional): Custom CSS classes
  • stroke (optional): Stroke width (default: “2”)

Document Card Component

Renders document cards in list views.

Usage:

1{{ partial "components/docs-card.html" . }}

Context: Document page context

Tree Navigation

Hierarchical document navigation component.

Usage:

1{{ partial "sections/sidebars/docs-tree-nav.html" . }}

Helper Functions

Document Statistics

Access document statistics through front matter:

1stats:
2  view_count: 1500
3  like_count: 85
4  share_count: 12

Document Types

Supported document types:

  • guide - Step-by-step guides
  • tutorial - Learning tutorials
  • reference - Technical reference
  • api - API documentation
  • faq - Frequently asked questions
  • troubleshooting - Problem solving guides

Configuration

Site Parameters

1[params.docs]
2  [params.docs.features]
3    edit = true
4    print = true
5    search = true
6    comments = true

Front Matter Options

Essential front matter fields for docs:

1title: "Document Title"
2doc_type: "guide"
3status: "published"
4difficulty: "beginner"
5categories: ["Category"]
6tags: ["tag1", "tag2"]

Advanced Features

Collaboration

Enable multi-user editing:

1collaboration:
2  enable: true
3  editors: ["user1", "user2"]
4  permissions: "edit"

Version Control

Git integration settings:

1git:
2  branch: "main"
3  edit_url: "https://github.com/repo/edit/main/"

This API reference provides the essential information for developers working with the MIDA documentation system.

API Team

🧭

快速導航

🏠 返回文檔中心
📊

文檔資訊

最後更新 2024-01-15
閱讀時間 2 分鐘
字數統計 220 字
難度等級 🔴 進階
🏷️

分類標籤