mirror of
https://gitlab.com/KenanZhu/AutoLibraryManuals.git
synced 2026-11-05 05:35:51 +08:00
Clean up Mintlify starter template and set up AutoLibrary structure
Remove sample pages (essentials, agent-ready, ai-tools, api-reference, snippets). Update docs.json with AutoLibrary branding and navigation structure. Rewrite index.mdx as AutoLibrary landing page. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
1 parent
04174b399f
commit
73528d076a
25 files changed
+129
-1765
No files matched your search
@@ -1,55 +1,38 @@
|
||||
# Mintlify Starter Kit
|
||||
# AutoLibrary 用户手册
|
||||
|
||||
Use the starter kit to get your docs deployed and ready to customize.
|
||||
AutoLibrary 北京建筑大学图书馆自动化工具的 Mintlify 文档站点。
|
||||
|
||||
Click the green **Use this template** button at the top of this repo to copy the Mintlify starter kit. The starter kit contains examples with
|
||||
## 开发
|
||||
|
||||
- Guide pages
|
||||
- Navigation
|
||||
- Customizations
|
||||
- API reference pages
|
||||
- Use of popular components
|
||||
|
||||
**[Follow the full quickstart guide](https://starter.mintlify.com/quickstart)**
|
||||
|
||||
## AI-assisted writing
|
||||
|
||||
Set up your AI coding tool to work with Mintlify:
|
||||
|
||||
```bash
|
||||
npx skills add https://mintlify.com/docs
|
||||
```
|
||||
|
||||
This command installs Mintlify's documentation skill for your configured AI tools like Claude Code, Cursor, Windsurf, and others. The skill includes component reference, writing standards, and workflow guidance.
|
||||
|
||||
See the [AI tools guides](/ai-tools) for tool-specific setup.
|
||||
|
||||
## Development
|
||||
|
||||
Install the [Mintlify CLI](https://www.npmjs.com/package/mint) to preview your documentation changes locally. To install, use the following command:
|
||||
安装 [Mintlify CLI](https://www.npmjs.com/package/mint) 以在本地预览文档更改:
|
||||
|
||||
```
|
||||
npm i -g mint
|
||||
```
|
||||
|
||||
Run the following command at the root of your documentation, where your `docs.json` is located:
|
||||
在 `docs.json` 所在目录运行:
|
||||
|
||||
```
|
||||
mint dev
|
||||
```
|
||||
|
||||
View your local preview at `http://localhost:3000`.
|
||||
在 `http://localhost:3000` 查看本地预览。
|
||||
|
||||
## Publishing changes
|
||||
## 发布
|
||||
|
||||
Install our GitHub app from your [dashboard](https://dashboard.mintlify.com/settings/organization/github-app) to propagate changes from your repo to your deployment. Changes are deployed to production automatically after pushing to the default branch.
|
||||
更改推送到默认分支后将自动部署到生产环境。
|
||||
|
||||
## Need help?
|
||||
## 文档结构
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
- If your dev environment isn't running: Run `mint update` to ensure you have the most recent version of the CLI.
|
||||
- If a page loads as a 404: Make sure you are running in a folder with a valid `docs.json`.
|
||||
|
||||
### Resources
|
||||
- [Mintlify documentation](https://mintlify.com/docs)
|
||||
```
|
||||
├── docs.json # Mintlify 配置与导航
|
||||
├── index.mdx # 首页
|
||||
├── versions/ # 版本手册
|
||||
│ ├── v1.3.0.mdx
|
||||
│ ├── v1.2.1.mdx
|
||||
│ ├── ...
|
||||
│ └── v0.0.3-alpha.mdx
|
||||
├── autoscript.mdx # AutoScript 语法参考
|
||||
├── logo/ # Logo 资源
|
||||
└── images/ # 图片资源
|
||||
```
|
||||
@@ -1,91 +0,0 @@
|
||||
---
|
||||
title: 'Contextual menu'
|
||||
description: 'Give readers one-click access to AI tools and integrations'
|
||||
icon: 'bolt'
|
||||
---
|
||||
|
||||
The contextual toolbar is a floating action bar that appears on every page of your docs. It lets readers instantly copy page content, open it in an AI assistant, or add your docs as an MCP server — without leaving the page.
|
||||
|
||||
Configure it in `docs.json` under `contextual.options`:
|
||||
|
||||
```json docs.json
|
||||
{
|
||||
"contextual": {
|
||||
"options": ["copy", "view", "claude", "chatgpt", "mcp", "cursor", "vscode"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Available options
|
||||
|
||||
### Content actions
|
||||
|
||||
| Option | Description |
|
||||
|--------|-------------|
|
||||
| `copy` | Copies the page as Markdown to the clipboard |
|
||||
| `view` | Opens the raw Markdown version of the page (`.md` URL) |
|
||||
|
||||
### AI assistants
|
||||
|
||||
| Option | Description |
|
||||
|--------|-------------|
|
||||
| `claude` | Opens the page in Claude |
|
||||
| `chatgpt` | Opens the page in ChatGPT |
|
||||
| `perplexity` | Opens the page in Perplexity |
|
||||
| `grok` | Opens the page in Grok |
|
||||
| `aistudio` | Opens the page in Google AI Studio |
|
||||
|
||||
### Editor integrations
|
||||
|
||||
| Option | Description |
|
||||
|--------|-------------|
|
||||
| `cursor` | Adds the page to Cursor's context |
|
||||
| `vscode` | Adds the page to VS Code Copilot |
|
||||
| `windsurf` | Adds the page to Windsurf's Cascade |
|
||||
| `devin` | Opens the page in Devin |
|
||||
|
||||
### MCP
|
||||
|
||||
| Option | Description |
|
||||
|--------|-------------|
|
||||
| `mcp` | Shows instructions for using your docs as an MCP server |
|
||||
| `add-mcp` | Provides a one-click prompt to add your docs MCP server to an AI tool |
|
||||
|
||||
<Tip>
|
||||
The `mcp` and `add-mcp` options are especially powerful — they let developers connect your entire docs site to any MCP-compatible AI assistant, so it can answer questions about your product directly.
|
||||
</Tip>
|
||||
|
||||
## Custom options
|
||||
|
||||
You can add custom entries to the toolbar with a title, description, icon, and link. The `href` supports dynamic placeholders:
|
||||
|
||||
| Placeholder | Resolves to |
|
||||
|-------------|-------------|
|
||||
| `$page` | The current page's full URL |
|
||||
| `$path` | The current page's path |
|
||||
| `$mcp` | Your docs MCP server URL |
|
||||
|
||||
```json docs.json
|
||||
{
|
||||
"contextual": {
|
||||
"options": [
|
||||
"copy",
|
||||
"claude",
|
||||
{
|
||||
"title": "Open issue",
|
||||
"description": "Report a problem with this page",
|
||||
"icon": "github",
|
||||
"href": "https://github.com/your-org/docs/issues/new?title=Issue+on+$path"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<Note>
|
||||
The contextual toolbar is only visible on preview and production deployments, not in `mint dev` local preview.
|
||||
</Note>
|
||||
|
||||
## Pairing with Visibility
|
||||
|
||||
The toolbar's `copy` and `view` options expose your page's Markdown content directly. If you use the [`Visibility`](/agent-ready/visibility) component, the `for="agents"` blocks will be included in that Markdown — giving AI assistants structured context that human readers don't see.
|
||||
@@ -1,75 +0,0 @@
|
||||
---
|
||||
title: 'Prompt component'
|
||||
description: 'Embed shareable AI prompts readers can copy or open in Cursor'
|
||||
icon: 'robot'
|
||||
---
|
||||
|
||||
The `Prompt` component displays a pre-built AI prompt with one-click actions to copy it to the clipboard or open it directly in Cursor. It's ideal for any docs page where you want to hand readers a ready-to-use prompt.
|
||||
|
||||
## Basic usage
|
||||
|
||||
<Prompt description="Summarize this API endpoint">
|
||||
You are a technical writer. Given the following API endpoint documentation, write a one-paragraph summary that explains what the endpoint does, what inputs it requires, and what it returns. Be concise and use plain language.
|
||||
</Prompt>
|
||||
|
||||
```mdx
|
||||
<Prompt description="Summarize this API endpoint">
|
||||
You are a technical writer. Given the following API endpoint documentation,
|
||||
write a one-paragraph summary that explains what the endpoint does, what
|
||||
inputs it requires, and what it returns. Be concise and use plain language.
|
||||
</Prompt>
|
||||
```
|
||||
|
||||
## With Cursor integration
|
||||
|
||||
Add `actions={["copy", "cursor"]}` to also surface an "Open in Cursor" button. This is especially useful for prompts readers will use in their editor.
|
||||
|
||||
<Prompt
|
||||
description="Generate a typed API client"
|
||||
icon="code"
|
||||
actions={["copy", "cursor"]}
|
||||
>
|
||||
You are an expert TypeScript developer. Given the following OpenAPI specification, generate a fully-typed API client using native fetch. Include:
|
||||
- A base client class with configurable baseUrl and auth headers
|
||||
- One method per endpoint, with typed request parameters and response types
|
||||
- JSDoc comments on each method
|
||||
Do not use any third-party HTTP libraries.
|
||||
</Prompt>
|
||||
|
||||
```mdx
|
||||
<Prompt
|
||||
description="Generate a typed API client"
|
||||
icon="code"
|
||||
actions={["copy", "cursor"]}
|
||||
>
|
||||
You are an expert TypeScript developer. Given the following OpenAPI
|
||||
specification, generate a fully-typed API client using native fetch...
|
||||
</Prompt>
|
||||
```
|
||||
|
||||
## Props
|
||||
|
||||
<ResponseField name="description" type="string" required>
|
||||
Heading text shown above the prompt content. Supports Markdown.
|
||||
</ResponseField>
|
||||
|
||||
<ResponseField name="children" type="string" required>
|
||||
The prompt text that gets copied or sent to Cursor.
|
||||
</ResponseField>
|
||||
|
||||
<ResponseField name="actions" type="array">
|
||||
Which action buttons to show. Options: `"copy"`, `"cursor"`. Defaults to `["copy"]`.
|
||||
</ResponseField>
|
||||
|
||||
<ResponseField name="icon" type="string">
|
||||
An icon displayed alongside the description. Supports Font Awesome, Lucide, and Tabler icon names, image URLs, or inline SVG.
|
||||
</ResponseField>
|
||||
|
||||
## When to use it
|
||||
|
||||
The `Prompt` component works well anywhere you're teaching readers to work with AI:
|
||||
|
||||
- **Quickstart guides** — give readers a prompt to generate their first integration
|
||||
- **API reference pages** — include a prompt for generating client code from the spec
|
||||
- **Troubleshooting guides** — embed a debugging prompt readers can run against their own error logs
|
||||
- **Conceptual pages** — add a prompt for exploring the topic further with an AI assistant
|
||||
@@ -1,85 +0,0 @@
|
||||
---
|
||||
title: 'Visibility'
|
||||
description: 'Show different content to humans and AI agents'
|
||||
icon: 'eye'
|
||||
---
|
||||
|
||||
The `Visibility` component lets a single page serve two audiences: humans reading on the web and AI agents processing the Markdown output. Content marked `for="humans"` appears on the rendered page but is excluded from Markdown exports. Content marked `for="agents"` is hidden on the web but included in Markdown.
|
||||
|
||||
This means you can write conversational, UI-centric instructions for humans and structured, machine-readable instructions for AI — without maintaining two separate pages.
|
||||
|
||||
## How it works
|
||||
|
||||
Mintlify serves every page at two URLs:
|
||||
|
||||
- `https://docs.example.com/page` — the rendered site, for humans
|
||||
- `https://docs.example.com/page.md` — the raw Markdown, for AI agents
|
||||
|
||||
`Visibility` controls what appears at each URL.
|
||||
|
||||
## Example
|
||||
|
||||
```mdx
|
||||
<Visibility for="humans">
|
||||
<Steps>
|
||||
<Step title="Open the dashboard">
|
||||
Navigate to [dashboard.example.com](https://dashboard.example.com) and sign in.
|
||||
</Step>
|
||||
<Step title="Create an API key">
|
||||
Go to **Settings → API Keys** and click **New key**.
|
||||
</Step>
|
||||
</Steps>
|
||||
</Visibility>
|
||||
|
||||
<Visibility for="agents">
|
||||
To authenticate, send a POST request to `/v1/auth/token` with the user's
|
||||
email and password in the request body. The response includes a bearer token
|
||||
valid for 24 hours. Pass this token as `Authorization: Bearer <token>` on
|
||||
all subsequent requests.
|
||||
</Visibility>
|
||||
```
|
||||
|
||||
Human readers see the step-by-step UI walkthrough. AI agents processing the Markdown get the direct API instructions instead.
|
||||
|
||||
## Props
|
||||
|
||||
<ResponseField name="for" type='"humans" | "agents"' required>
|
||||
- `"humans"` — visible on the rendered web page, excluded from `.md` export
|
||||
- `"agents"` — hidden on the rendered web page, included in `.md` export
|
||||
</ResponseField>
|
||||
|
||||
## When to use it
|
||||
|
||||
<Columns cols={2}>
|
||||
<Card title="Onboarding flows" icon="person-walking-arrow-right">
|
||||
Show UI screenshots and button clicks to humans. Give agents the equivalent API calls.
|
||||
</Card>
|
||||
<Card title="Configuration guides" icon="sliders">
|
||||
Show a visual settings panel to humans. Give agents the equivalent JSON or CLI flags.
|
||||
</Card>
|
||||
<Card title="Error messages" icon="triangle-exclamation">
|
||||
Show a friendly explanation to humans. Give agents structured error codes and remediation steps.
|
||||
</Card>
|
||||
<Card title="Conceptual pages" icon="lightbulb">
|
||||
Include rich diagrams and narrative for humans. Provide a concise structured summary for agents.
|
||||
</Card>
|
||||
</Columns>
|
||||
|
||||
## Combining with Prompt
|
||||
|
||||
`Visibility` and `Prompt` complement each other well. Use `Visibility` to give agents structured context, then use `Prompt` to give human readers a prompt they can use to ask an AI about that same content.
|
||||
|
||||
```mdx
|
||||
<Visibility for="agents">
|
||||
## Authentication schema
|
||||
- Method: Bearer token
|
||||
- Header: `Authorization: Bearer <token>`
|
||||
- Token TTL: 86400 seconds
|
||||
- Refresh endpoint: POST /v1/auth/refresh
|
||||
</Visibility>
|
||||
|
||||
<Prompt description="Ask about authentication" icon="lock">
|
||||
Explain how authentication works in this API and show me example code for
|
||||
getting a token and making an authenticated request.
|
||||
</Prompt>
|
||||
```
|
||||
@@ -1,43 +0,0 @@
|
||||
---
|
||||
title: "Claude Code setup"
|
||||
description: "Configure Claude Code for your documentation workflow"
|
||||
icon: "asterisk"
|
||||
---
|
||||
|
||||
Set up Claude Code to help you write and maintain your Mintlify documentation.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Active Claude subscription (Pro, Max, or API access)
|
||||
|
||||
## Setup
|
||||
|
||||
<Steps>
|
||||
<Step title="Install Claude Code">
|
||||
```bash
|
||||
npm install -g @anthropic-ai/claude-code
|
||||
```
|
||||
</Step>
|
||||
|
||||
<Step title="Install the Mintlify skill">
|
||||
In your docs directory, run:
|
||||
|
||||
```bash
|
||||
npx skills add https://mintlify.com/docs
|
||||
```
|
||||
|
||||
This gives Claude Code Mintlify's component reference, writing standards,
|
||||
and workflow guidance.
|
||||
</Step>
|
||||
|
||||
<Step title="Customize project instructions">
|
||||
Edit `AGENTS.md` in your project root to add project-specific terminology,
|
||||
style preferences, and content boundaries.
|
||||
</Step>
|
||||
|
||||
<Step title="Start writing with Claude Code">
|
||||
```bash
|
||||
claude
|
||||
```
|
||||
</Step>
|
||||
</Steps>
|
||||
@@ -1,39 +0,0 @@
|
||||
---
|
||||
title: "Cursor setup"
|
||||
description: "Configure Cursor for your documentation workflow"
|
||||
icon: "arrow-pointer"
|
||||
---
|
||||
|
||||
Set up Cursor to help you write and maintain your Mintlify documentation.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Cursor editor installed
|
||||
|
||||
## Setup
|
||||
|
||||
<Steps>
|
||||
<Step title="Open your docs directory in Cursor">
|
||||
Open the root of your documentation repository where `docs.json` is located.
|
||||
</Step>
|
||||
|
||||
<Step title="Install the Mintlify skill">
|
||||
In the integrated terminal, run:
|
||||
|
||||
```bash
|
||||
npx skills add https://mintlify.com/docs
|
||||
```
|
||||
|
||||
This gives Cursor Mintlify's component reference, writing standards,
|
||||
and workflow guidance.
|
||||
</Step>
|
||||
|
||||
<Step title="Customize project instructions">
|
||||
Edit `AGENTS.md` in your project root to add project-specific terminology,
|
||||
style preferences, and content boundaries.
|
||||
</Step>
|
||||
|
||||
<Step title="Start writing with Cursor">
|
||||
Open a file and use Cursor's AI features to draft and edit documentation.
|
||||
</Step>
|
||||
</Steps>
|
||||
@@ -1,39 +0,0 @@
|
||||
---
|
||||
title: "Windsurf setup"
|
||||
description: "Configure Windsurf for your documentation workflow"
|
||||
icon: "water"
|
||||
---
|
||||
|
||||
Set up Windsurf's Cascade AI assistant to help you write and maintain your Mintlify documentation.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Windsurf editor installed
|
||||
|
||||
## Setup
|
||||
|
||||
<Steps>
|
||||
<Step title="Open your docs directory in Windsurf">
|
||||
Open the root of your documentation repository where `docs.json` is located.
|
||||
</Step>
|
||||
|
||||
<Step title="Install the Mintlify skill">
|
||||
In the integrated terminal, run:
|
||||
|
||||
```bash
|
||||
npx skills add https://mintlify.com/docs
|
||||
```
|
||||
|
||||
This gives Windsurf Mintlify's component reference, writing standards,
|
||||
and workflow guidance.
|
||||
</Step>
|
||||
|
||||
<Step title="Customize project instructions">
|
||||
Edit `AGENTS.md` in your project root to add project-specific terminology,
|
||||
style preferences, and content boundaries.
|
||||
</Step>
|
||||
|
||||
<Step title="Start writing with Cascade">
|
||||
Open a file and use Cascade to draft and edit documentation.
|
||||
</Step>
|
||||
</Steps>
|
||||
@@ -1,4 +0,0 @@
|
||||
---
|
||||
title: 'Create Plant'
|
||||
openapi: 'POST /plants'
|
||||
---
|
||||
@@ -1,4 +0,0 @@
|
||||
---
|
||||
title: 'Delete Plant'
|
||||
openapi: 'DELETE /plants/{id}'
|
||||
---
|
||||
@@ -1,4 +0,0 @@
|
||||
---
|
||||
title: 'Get Plants'
|
||||
openapi: 'GET /plants'
|
||||
---
|
||||
@@ -1,4 +0,0 @@
|
||||
---
|
||||
title: 'New Plant'
|
||||
openapi: 'WEBHOOK /plant/webhook'
|
||||
---
|
||||
@@ -1,33 +0,0 @@
|
||||
---
|
||||
title: 'Introduction'
|
||||
description: 'Example section for showcasing API endpoints'
|
||||
---
|
||||
|
||||
<Note>
|
||||
If you're not looking to build API reference documentation, you can delete
|
||||
this section by removing the api-reference folder.
|
||||
</Note>
|
||||
|
||||
## Welcome
|
||||
|
||||
There are two ways to build API documentation: [OpenAPI](https://mintlify.com/docs/api-playground/openapi/setup) and [MDX components](https://mintlify.com/docs/api-playground/mdx/configuration). For the starter kit, we are using the following OpenAPI specification.
|
||||
|
||||
<Card
|
||||
title="Plant Store Endpoints"
|
||||
icon="leaf"
|
||||
href="https://github.com/mintlify/starter/blob/main/api-reference/openapi.json"
|
||||
>
|
||||
View the OpenAPI specification file
|
||||
</Card>
|
||||
|
||||
## Authentication
|
||||
|
||||
All API endpoints are authenticated using Bearer tokens and picked up from the specification file.
|
||||
|
||||
```json
|
||||
"security": [
|
||||
{
|
||||
"bearerAuth": []
|
||||
}
|
||||
]
|
||||
```
|
||||
@@ -1,217 +0,0 @@
|
||||
{
|
||||
"openapi": "3.1.0",
|
||||
"info": {
|
||||
"title": "OpenAPI Plant Store",
|
||||
"description": "A sample API that uses a plant store as an example to demonstrate features in the OpenAPI specification",
|
||||
"license": {
|
||||
"name": "MIT"
|
||||
},
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "http://sandbox.mintlify.com"
|
||||
}
|
||||
],
|
||||
"security": [
|
||||
{
|
||||
"bearerAuth": []
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/plants": {
|
||||
"get": {
|
||||
"description": "Returns all plants from the system that the user has access to",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "The maximum number of results to return",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Plant response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/Plant"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Unexpected error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"description": "Creates a new plant in the store",
|
||||
"requestBody": {
|
||||
"description": "Plant to add to the store",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/NewPlant"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "plant response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Plant"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "unexpected error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/plants/{id}": {
|
||||
"delete": {
|
||||
"description": "Deletes a single plant based on the ID supplied",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"description": "ID of plant to delete",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "Plant deleted",
|
||||
"content": {}
|
||||
},
|
||||
"400": {
|
||||
"description": "unexpected error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"webhooks": {
|
||||
"/plant/webhook": {
|
||||
"post": {
|
||||
"description": "Information about a new plant added to the store",
|
||||
"requestBody": {
|
||||
"description": "Plant added to the store",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/NewPlant"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Return a 200 status to indicate that the data was received successfully"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"Plant": {
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "The name of the plant",
|
||||
"type": "string"
|
||||
},
|
||||
"tag": {
|
||||
"description": "Tag to specify the type",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"NewPlant": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/Plant"
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"id"
|
||||
],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "Identification number of the plant",
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"Error": {
|
||||
"required": [
|
||||
"error",
|
||||
"message"
|
||||
],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"securitySchemes": {
|
||||
"bearerAuth": {
|
||||
"type": "http",
|
||||
"scheme": "bearer"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
---
|
||||
title: 'Development'
|
||||
description: 'Preview changes locally to update your docs'
|
||||
icon: 'terminal'
|
||||
---
|
||||
|
||||
<Info>
|
||||
**Prerequisites**:
|
||||
- Node.js version 19 or higher
|
||||
- A docs repository with a `docs.json` file
|
||||
</Info>
|
||||
|
||||
Follow these steps to install and run Mintlify on your operating system.
|
||||
|
||||
<Steps>
|
||||
<Step title="Install the Mintlify CLI">
|
||||
|
||||
```bash
|
||||
npm i -g mint
|
||||
```
|
||||
</Step>
|
||||
|
||||
<Step title="Preview locally">
|
||||
|
||||
Navigate to your docs directory where your `docs.json` file is located, and run the following command:
|
||||
|
||||
```bash
|
||||
mint dev
|
||||
```
|
||||
|
||||
A local preview of your documentation will be available at `http://localhost:3000`.
|
||||
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Custom ports
|
||||
|
||||
By default, Mintlify uses port 3000. You can customize the port Mintlify runs on by using the `--port` flag. For example, to run Mintlify on port 3333, use this command:
|
||||
|
||||
```bash
|
||||
mint dev --port 3333
|
||||
```
|
||||
|
||||
If you attempt to run Mintlify on a port that's already in use, it will use the next available port:
|
||||
|
||||
```md
|
||||
Port 3000 is already in use. Trying 3001 instead.
|
||||
```
|
||||
|
||||
## Mintlify versions
|
||||
|
||||
Please note that each CLI release is associated with a specific version of Mintlify. If your local preview does not align with the production version, please update the CLI:
|
||||
|
||||
```bash
|
||||
npm mint update
|
||||
```
|
||||
|
||||
## Validating links
|
||||
|
||||
The CLI can assist with validating links in your documentation. To identify any broken links, use the following command:
|
||||
|
||||
```bash
|
||||
mint broken-links
|
||||
```
|
||||
|
||||
## Deployment
|
||||
|
||||
If the deployment is successful, you should see the following:
|
||||
|
||||
<Frame>
|
||||
<img src="/images/checks-passed.png" alt="Screenshot of a deployment confirmation message that says All checks have passed." style={{ borderRadius: '0.5rem' }} />
|
||||
</Frame>
|
||||
|
||||
## Code formatting
|
||||
|
||||
We suggest using extensions on your IDE to recognize and format MDX. If you're a VSCode user, consider the [MDX VSCode extension](https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx) for syntax highlighting, and [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) for code formatting.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion title='Error: Could not load the "sharp" module using the darwin-arm64 runtime'>
|
||||
|
||||
This may be due to an outdated version of node. Try the following:
|
||||
1. Remove the currently-installed version of the CLI: `npm remove -g mint`
|
||||
2. Upgrade to Node v19 or higher.
|
||||
3. Reinstall the CLI: `npm i -g mint`
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Issue: Encountering an unknown error">
|
||||
|
||||
Solution: Go to the root of your device and delete the `~/.mintlify` folder. Then run `mint dev` again.
|
||||
</Accordion>
|
||||
</AccordionGroup>
|
||||
|
||||
Curious about what changed in the latest CLI version? Check out the [CLI changelog](https://www.npmjs.com/package/mintlify?activeTab=versions).
|
||||
@@ -1,72 +1,46 @@
|
||||
{
|
||||
"$schema": "https://mintlify.com/docs.json",
|
||||
"theme": "mint",
|
||||
"name": "Mintlify Starter Kit",
|
||||
"name": "AutoLibrary",
|
||||
"colors": {
|
||||
"primary": "#16A34A",
|
||||
"light": "#07C983",
|
||||
"dark": "#15803D"
|
||||
"primary": "#0EA5E9",
|
||||
"light": "#38BDF8",
|
||||
"dark": "#0284C7"
|
||||
},
|
||||
"favicon": "/favicon.svg",
|
||||
"navigation": {
|
||||
"tabs": [
|
||||
{
|
||||
"tab": "Guides",
|
||||
"tab": "用户手册",
|
||||
"groups": [
|
||||
{
|
||||
"group": "Getting started",
|
||||
"group": "总览",
|
||||
"pages": [
|
||||
"index",
|
||||
"quickstart",
|
||||
"development"
|
||||
"index"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "Customization",
|
||||
"group": "版本手册",
|
||||
"pages": [
|
||||
"essentials/settings",
|
||||
"essentials/navigation"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "Writing content",
|
||||
"pages": [
|
||||
"essentials/markdown",
|
||||
"essentials/code",
|
||||
"essentials/images",
|
||||
"essentials/components",
|
||||
"essentials/reusable-snippets"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "Agent ready",
|
||||
"pages": [
|
||||
"agent-ready/prompt",
|
||||
"agent-ready/visibility",
|
||||
"agent-ready/contextual",
|
||||
"ai-tools/cursor",
|
||||
"ai-tools/claude-code",
|
||||
"ai-tools/windsurf"
|
||||
"versions/v1.3.0",
|
||||
"versions/v1.2.1",
|
||||
"versions/v1.1.0",
|
||||
"versions/v1.0.5",
|
||||
"versions/v1.0.0",
|
||||
"versions/v1.0.0-beta",
|
||||
"versions/v0.1.0-alpha",
|
||||
"versions/v0.0.3-alpha"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"tab": "API reference",
|
||||
"tab": "AutoScript",
|
||||
"groups": [
|
||||
{
|
||||
"group": "API documentation",
|
||||
"group": "脚本参考",
|
||||
"pages": [
|
||||
"api-reference/introduction"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "Endpoint examples",
|
||||
"pages": [
|
||||
"api-reference/endpoint/get",
|
||||
"api-reference/endpoint/create",
|
||||
"api-reference/endpoint/delete",
|
||||
"api-reference/endpoint/webhook"
|
||||
"autoscript"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -75,14 +49,19 @@
|
||||
"global": {
|
||||
"anchors": [
|
||||
{
|
||||
"anchor": "Documentation",
|
||||
"href": "https://mintlify.com/docs",
|
||||
"icon": "book-open-cover"
|
||||
"anchor": "下载",
|
||||
"href": "https://autolibrary.kenanzhu.com/downloads",
|
||||
"icon": "download"
|
||||
},
|
||||
{
|
||||
"anchor": "Blog",
|
||||
"href": "https://mintlify.com/blog",
|
||||
"icon": "newspaper"
|
||||
"anchor": "更新日志",
|
||||
"href": "https://autolibrary.kenanzhu.com/changelog",
|
||||
"icon": "clock"
|
||||
},
|
||||
{
|
||||
"anchor": "GitHub",
|
||||
"href": "https://github.com/AutoLibrary",
|
||||
"icon": "github"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -95,32 +74,28 @@
|
||||
"links": [
|
||||
{
|
||||
"label": "Support",
|
||||
"href": "mailto:hi@mintlify.com"
|
||||
"href": "mailto:support@autolibrary.kenanzhu.com"
|
||||
}
|
||||
],
|
||||
"primary": {
|
||||
"type": "button",
|
||||
"label": "Dashboard",
|
||||
"href": "https://dashboard.mintlify.com"
|
||||
"label": "下载",
|
||||
"href": "https://autolibrary.kenanzhu.com/downloads"
|
||||
}
|
||||
},
|
||||
"contextual": {
|
||||
"options": [
|
||||
"copy",
|
||||
"view",
|
||||
"chatgpt",
|
||||
"claude",
|
||||
"perplexity",
|
||||
"mcp",
|
||||
"cursor",
|
||||
"vscode"
|
||||
]
|
||||
"copy",
|
||||
"view",
|
||||
"chatgpt",
|
||||
"claude",
|
||||
"cursor",
|
||||
"vscode"
|
||||
]
|
||||
},
|
||||
"footer": {
|
||||
"socials": {
|
||||
"x": "https://x.com/mintlify",
|
||||
"github": "https://github.com/mintlify",
|
||||
"linkedin": "https://linkedin.com/company/mintlify"
|
||||
"github": "https://github.com/AutoLibrary"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
---
|
||||
title: 'Code blocks'
|
||||
description: 'Display inline code and code blocks'
|
||||
icon: 'code'
|
||||
---
|
||||
|
||||
## Inline code
|
||||
|
||||
To denote a `word` or `phrase` as code, enclose it in backticks (`).
|
||||
|
||||
```
|
||||
To denote a `word` or `phrase` as code, enclose it in backticks (`).
|
||||
```
|
||||
|
||||
## Code blocks
|
||||
|
||||
Use [fenced code blocks](https://www.markdownguide.org/extended-syntax/#fenced-code-blocks) by enclosing code in three backticks and follow the leading ticks with the programming language of your snippet to get syntax highlighting. Optionally, you can also write the name of your code after the programming language.
|
||||
|
||||
```java HelloWorld.java
|
||||
class HelloWorld {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello, World!");
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
````md
|
||||
```java HelloWorld.java
|
||||
class HelloWorld {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello, World!");
|
||||
}
|
||||
}
|
||||
```
|
||||
````
|
||||
|
||||
## Code groups
|
||||
|
||||
To display the same snippet in multiple languages as tabs, use the `CodeGroup` component. See [Components](/essentials/components#code-groups) for usage.
|
||||
@@ -1,207 +0,0 @@
|
||||
---
|
||||
title: 'Components'
|
||||
description: 'Callouts, cards, steps, tabs, and more'
|
||||
icon: 'puzzle-piece'
|
||||
---
|
||||
|
||||
Mintlify components let you build rich, interactive documentation pages using MDX. Here are some commonly used ones.
|
||||
|
||||
See the [components overview](https://mintlify.com/docs/components) in the Mintlify documentation for a complete list.
|
||||
|
||||
## Callouts
|
||||
|
||||
Use callouts to draw attention to important information.
|
||||
|
||||
<Note>A **Note** is for general information that helps the reader.</Note>
|
||||
|
||||
<Tip>A **Tip** highlights a helpful shortcut or best practice.</Tip>
|
||||
|
||||
<Warning>A **Warning** flags something that could cause problems.</Warning>
|
||||
|
||||
<Info>An **Info** callout provides supplementary context.</Info>
|
||||
|
||||
```mdx
|
||||
<Note>A **Note** is for general information that helps the reader.</Note>
|
||||
|
||||
<Tip>A **Tip** highlights a helpful shortcut or best practice.</Tip>
|
||||
|
||||
<Warning>A **Warning** flags something that could cause problems.</Warning>
|
||||
|
||||
<Info>An **Info** callout provides supplementary context.</Info>
|
||||
```
|
||||
|
||||
## Cards
|
||||
|
||||
Cards link readers to other pages or resources.
|
||||
|
||||
<Columns cols={2}>
|
||||
<Card title="API Reference" icon="terminal" href="/api-reference/introduction">
|
||||
Auto-generated docs from your OpenAPI spec.
|
||||
</Card>
|
||||
<Card title="Quickstart" icon="rocket" href="/quickstart">
|
||||
Get your docs running in three steps.
|
||||
</Card>
|
||||
</Columns>
|
||||
|
||||
```mdx
|
||||
<Columns cols={2}>
|
||||
<Card title="API Reference" icon="terminal" href="/api-reference/introduction">
|
||||
Auto-generated docs from your OpenAPI spec.
|
||||
</Card>
|
||||
<Card title="Quickstart" icon="rocket" href="/quickstart">
|
||||
Get your docs running in three steps.
|
||||
</Card>
|
||||
</Columns>
|
||||
```
|
||||
|
||||
Use `<Columns cols={N}>` to control the grid width. Cards without `href` render as informational panels.
|
||||
|
||||
## Steps
|
||||
|
||||
Steps present numbered procedures clearly.
|
||||
|
||||
<Steps>
|
||||
<Step title="Install the package">
|
||||
```bash
|
||||
npm install my-package
|
||||
```
|
||||
</Step>
|
||||
<Step title="Initialize">
|
||||
Run the init command in your project root.
|
||||
```bash
|
||||
npx my-package init
|
||||
```
|
||||
</Step>
|
||||
<Step title="You're ready">
|
||||
Start using the package in your code.
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
````mdx
|
||||
<Steps>
|
||||
<Step title="Install the package">
|
||||
```bash
|
||||
npm install my-package
|
||||
```
|
||||
</Step>
|
||||
<Step title="Initialize">
|
||||
Run the init command in your project root.
|
||||
</Step>
|
||||
<Step title="You're ready">
|
||||
Start using the package in your code.
|
||||
</Step>
|
||||
</Steps>
|
||||
````
|
||||
|
||||
## Tabs
|
||||
|
||||
Tabs let readers switch between alternative content — different languages, environments, or platforms.
|
||||
|
||||
<Tabs>
|
||||
<Tab title="npm">
|
||||
```bash
|
||||
npm install my-package
|
||||
```
|
||||
</Tab>
|
||||
<Tab title="yarn">
|
||||
```bash
|
||||
yarn add my-package
|
||||
```
|
||||
</Tab>
|
||||
<Tab title="pnpm">
|
||||
```bash
|
||||
pnpm add my-package
|
||||
```
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
````mdx
|
||||
<Tabs>
|
||||
<Tab title="npm">
|
||||
```bash
|
||||
npm install my-package
|
||||
```
|
||||
</Tab>
|
||||
<Tab title="yarn">
|
||||
```bash
|
||||
yarn add my-package
|
||||
```
|
||||
</Tab>
|
||||
<Tab title="pnpm">
|
||||
```bash
|
||||
pnpm add my-package
|
||||
```
|
||||
</Tab>
|
||||
</Tabs>
|
||||
````
|
||||
|
||||
## Accordions
|
||||
|
||||
Accordions collapse content behind a toggle — useful for FAQs or optional detail.
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion title="What does this product do?">
|
||||
A brief answer to the first question. Keep it concise.
|
||||
</Accordion>
|
||||
<Accordion title="How is pricing calculated?">
|
||||
Another answer here. Use as much space as you need.
|
||||
</Accordion>
|
||||
</AccordionGroup>
|
||||
|
||||
```mdx
|
||||
<AccordionGroup>
|
||||
<Accordion title="What does this product do?">
|
||||
A brief answer to the first question.
|
||||
</Accordion>
|
||||
<Accordion title="How is pricing calculated?">
|
||||
Another answer here.
|
||||
</Accordion>
|
||||
</AccordionGroup>
|
||||
```
|
||||
|
||||
## Frames
|
||||
|
||||
Wrap images or other content in a `Frame` to add a styled border and rounded corners.
|
||||
|
||||
<Frame>
|
||||
<img src="https://mintlify-assets.b-cdn.net/bigbend.jpg" alt="Big Bend landscape" />
|
||||
</Frame>
|
||||
|
||||
```mdx
|
||||
<Frame>
|
||||
<img src="/images/screenshot.png" alt="App screenshot" />
|
||||
</Frame>
|
||||
```
|
||||
|
||||
## Code groups
|
||||
|
||||
`CodeGroup` displays multiple code snippets as tabs — ideal for showing the same example in multiple languages.
|
||||
|
||||
<CodeGroup>
|
||||
```typescript TypeScript
|
||||
const response = await fetch('https://api.example.com/users');
|
||||
const users = await response.json();
|
||||
```
|
||||
|
||||
```python Python
|
||||
import requests
|
||||
response = requests.get('https://api.example.com/users')
|
||||
users = response.json()
|
||||
```
|
||||
|
||||
```bash curl
|
||||
curl https://api.example.com/users
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
````mdx
|
||||
<CodeGroup>
|
||||
```typescript TypeScript
|
||||
const response = await fetch('https://api.example.com/users');
|
||||
```
|
||||
|
||||
```python Python
|
||||
response = requests.get('https://api.example.com/users')
|
||||
```
|
||||
</CodeGroup>
|
||||
````
|
||||
@@ -1,59 +0,0 @@
|
||||
---
|
||||
title: 'Images and embeds'
|
||||
description: 'Add image, video, and other HTML elements'
|
||||
icon: 'image'
|
||||
---
|
||||
|
||||
<img
|
||||
style={{ borderRadius: '0.5rem' }}
|
||||
src="https://mintlify-assets.b-cdn.net/bigbend.jpg"
|
||||
/>
|
||||
|
||||
## Image
|
||||
|
||||
### Using Markdown
|
||||
|
||||
The [markdown syntax](https://www.markdownguide.org/basic-syntax/#images) lets you add images using the following code
|
||||
|
||||
```md
|
||||

|
||||
```
|
||||
|
||||
Note that the image file size must be less than 5MB. Otherwise, we recommend hosting on a service like [Cloudinary](https://cloudinary.com/) or [S3](https://aws.amazon.com/s3/). You can then use that URL and embed.
|
||||
|
||||
### Using embeds
|
||||
|
||||
To get more customizability with images, you can also use [embeds](/writing-content/embed) to add images
|
||||
|
||||
```html
|
||||
<img height="200" src="/path/image.jpg" />
|
||||
```
|
||||
|
||||
## Embeds and HTML elements
|
||||
|
||||
<iframe
|
||||
width="560"
|
||||
height="315"
|
||||
src="https://www.youtube.com/embed/4KzFe50RQkQ"
|
||||
title="YouTube video player"
|
||||
frameBorder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowFullScreen
|
||||
style={{ width: '100%', borderRadius: '0.5rem' }}
|
||||
></iframe>
|
||||
|
||||
<br />
|
||||
|
||||
<Tip>
|
||||
|
||||
Mintlify supports [HTML tags in Markdown](https://www.markdownguide.org/basic-syntax/#html). This is helpful if you prefer HTML tags to Markdown syntax, and lets you create documentation with infinite flexibility.
|
||||
|
||||
</Tip>
|
||||
|
||||
### iFrames
|
||||
|
||||
Loads another HTML page within the document. Most commonly used for embedding videos.
|
||||
|
||||
```html
|
||||
<iframe src="https://www.youtube.com/embed/4KzFe50RQkQ"> </iframe>
|
||||
```
|
||||
@@ -1,88 +0,0 @@
|
||||
---
|
||||
title: 'Markdown syntax'
|
||||
description: 'Text, title, and styling in standard markdown'
|
||||
icon: 'text-size'
|
||||
---
|
||||
|
||||
## Titles
|
||||
|
||||
Best used for section headers.
|
||||
|
||||
```md
|
||||
## Titles
|
||||
```
|
||||
|
||||
### Subtitles
|
||||
|
||||
Best used for subsection headers.
|
||||
|
||||
```md
|
||||
### Subtitles
|
||||
```
|
||||
|
||||
<Tip>
|
||||
|
||||
Each **title** and **subtitle** creates an anchor and also shows up on the table of contents on the right.
|
||||
|
||||
</Tip>
|
||||
|
||||
## Text formatting
|
||||
|
||||
We support most markdown formatting. Simply add `**`, `_`, or `~` around text to format it.
|
||||
|
||||
| Style | How to write it | Result |
|
||||
| ------------- | ----------------- | --------------- |
|
||||
| Bold | `**bold**` | **bold** |
|
||||
| Italic | `_italic_` | _italic_ |
|
||||
| Strikethrough | `~strikethrough~` | ~strikethrough~ |
|
||||
|
||||
You can combine these. For example, write `**_bold and italic_**` to get **_bold and italic_** text.
|
||||
|
||||
You need to use HTML to write superscript and subscript text. That is, add `<sup>` or `<sub>` around your text.
|
||||
|
||||
| Text Size | How to write it | Result |
|
||||
| ----------- | ------------------------ | ---------------------- |
|
||||
| Superscript | `<sup>superscript</sup>` | <sup>superscript</sup> |
|
||||
| Subscript | `<sub>subscript</sub>` | <sub>subscript</sub> |
|
||||
|
||||
## Linking to pages
|
||||
|
||||
You can add a link by wrapping text in `[]()`. You would write `[link to google](https://google.com)` to [link to google](https://google.com).
|
||||
|
||||
Links to pages in your docs need to be root-relative. Basically, you should include the entire folder path. For example, `[link to text](/writing-content/text)` links to the page "Text" in our components section.
|
||||
|
||||
Relative links like `[link to text](../text)` will open slower because we cannot optimize them as easily.
|
||||
|
||||
## Blockquotes
|
||||
|
||||
### Singleline
|
||||
|
||||
To create a blockquote, add a `>` in front of a paragraph.
|
||||
|
||||
> Dorothy followed her through many of the beautiful rooms in her castle.
|
||||
|
||||
```md
|
||||
> Dorothy followed her through many of the beautiful rooms in her castle.
|
||||
```
|
||||
|
||||
### Multiline
|
||||
|
||||
> Dorothy followed her through many of the beautiful rooms in her castle.
|
||||
>
|
||||
> The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.
|
||||
|
||||
```md
|
||||
> Dorothy followed her through many of the beautiful rooms in her castle.
|
||||
>
|
||||
> The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.
|
||||
```
|
||||
|
||||
### LaTeX
|
||||
|
||||
Mintlify supports [LaTeX](https://www.latex-project.org) through the Latex component.
|
||||
|
||||
<Latex>8 x (vk x H1 - H2) = (0,1)</Latex>
|
||||
|
||||
```md
|
||||
<Latex>8 x (vk x H1 - H2) = (0,1)</Latex>
|
||||
```
|
||||
@@ -1,87 +0,0 @@
|
||||
---
|
||||
title: 'Navigation'
|
||||
description: 'The navigation field in docs.json defines the pages that go in the navigation menu'
|
||||
icon: 'map'
|
||||
---
|
||||
|
||||
The navigation menu is the list of links on every website.
|
||||
|
||||
You will likely update `docs.json` every time you add a new page. Pages do not show up automatically.
|
||||
|
||||
## Navigation syntax
|
||||
|
||||
Our navigation syntax is recursive which means you can make nested navigation groups. You don't need to include `.mdx` in page names.
|
||||
|
||||
<CodeGroup>
|
||||
|
||||
```json Regular Navigation
|
||||
"navigation": {
|
||||
"tabs": [
|
||||
{
|
||||
"tab": "Docs",
|
||||
"groups": [
|
||||
{
|
||||
"group": "Getting Started",
|
||||
"pages": ["quickstart"]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
```json Nested Navigation
|
||||
"navigation": {
|
||||
"tabs": [
|
||||
{
|
||||
"tab": "Docs",
|
||||
"groups": [
|
||||
{
|
||||
"group": "Getting Started",
|
||||
"pages": [
|
||||
"quickstart",
|
||||
{
|
||||
"group": "Nested Reference Pages",
|
||||
"pages": ["nested-reference-page"]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
## Folders
|
||||
|
||||
Simply put your MDX files in folders and update the paths in `docs.json`.
|
||||
|
||||
For example, to have a page at `https://yoursite.com/your-folder/your-page` you would make a folder called `your-folder` containing an MDX file called `your-page.mdx`.
|
||||
|
||||
<Warning>
|
||||
|
||||
You cannot use `api` for the name of a folder unless you nest it inside another folder. Mintlify uses Next.js which reserves the top-level `api` folder for internal server calls. A folder name such as `api-reference` would be accepted.
|
||||
|
||||
</Warning>
|
||||
|
||||
```json Navigation With Folder
|
||||
"navigation": {
|
||||
"tabs": [
|
||||
{
|
||||
"tab": "Docs",
|
||||
"groups": [
|
||||
{
|
||||
"group": "Group Name",
|
||||
"pages": ["your-folder/your-page"]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Hidden pages
|
||||
|
||||
MDX files not included in `docs.json` will not show up in the sidebar but are accessible through the search bar and by linking directly to them.
|
||||
@@ -1,100 +0,0 @@
|
||||
---
|
||||
title: "Reusable snippets"
|
||||
description: "Write once, reuse everywhere. Use snippets to keep content in sync across pages"
|
||||
icon: "recycle"
|
||||
---
|
||||
|
||||
Any content you find yourself repeating across pages is a good candidate for a snippet. Create the file once in the `snippets/` directory, import it wherever you need it, and updates propagate everywhere automatically.
|
||||
|
||||
<Note>
|
||||
Files inside `snippets/` are not rendered as standalone pages. They only appear where you import them.
|
||||
</Note>
|
||||
|
||||
## Content snippets
|
||||
|
||||
The simplest pattern: write MDX content in a snippet file and import it as a component.
|
||||
|
||||
```mdx snippets/prerequisites.mdx
|
||||
Before you begin, make sure you have:
|
||||
- Node.js 18 or higher
|
||||
- An API key from your [dashboard](https://dashboard.example.com)
|
||||
```
|
||||
|
||||
Import it into any page using a root-relative path:
|
||||
|
||||
```mdx your-page.mdx
|
||||
---
|
||||
title: Install the SDK
|
||||
---
|
||||
|
||||
import Prerequisites from '/snippets/prerequisites.mdx';
|
||||
|
||||
<Prerequisites />
|
||||
|
||||
## Installation
|
||||
...
|
||||
```
|
||||
|
||||
You can also use relative imports, which enables CMD+click navigation to the snippet in your editor:
|
||||
|
||||
```mdx
|
||||
import Prerequisites from '../snippets/prerequisites.mdx';
|
||||
```
|
||||
|
||||
## Variable snippets
|
||||
|
||||
Export named constants from a snippet file to reuse values like product names, version numbers, or URLs.
|
||||
|
||||
```mdx snippets/vars.mdx
|
||||
export const sdkVersion = '3.2.0';
|
||||
export const baseUrl = 'https://api.example.com/v1';
|
||||
```
|
||||
|
||||
Import and use them inline:
|
||||
|
||||
```mdx your-page.mdx
|
||||
import { sdkVersion, baseUrl } from '/snippets/vars.mdx';
|
||||
|
||||
The current SDK version is **{sdkVersion}**.
|
||||
|
||||
All requests go to `{baseUrl}`.
|
||||
```
|
||||
|
||||
## Component snippets
|
||||
|
||||
For snippets that need to vary based on where they're used, export an arrow function component that accepts props.
|
||||
|
||||
```mdx snippets/endpoint-note.mdx
|
||||
export const EndpointNote = ({ method, path }) => (
|
||||
<Note>
|
||||
This guide covers the <code>{method} {path}</code> endpoint.
|
||||
See the <a href="/api-reference/introduction">API reference</a> for full details.
|
||||
</Note>
|
||||
);
|
||||
```
|
||||
|
||||
* Use arrow function syntax (`const Foo = () => ...`).
|
||||
* The `function` keyword is not supported in snippet files.
|
||||
* MDX syntax doesn't compile inside arrow function bodies. Use plain HTML tags there, or use a default export instead.
|
||||
|
||||
Pass props when you render it:
|
||||
|
||||
```mdx your-page.mdx
|
||||
import { EndpointNote } from '/snippets/endpoint-note.mdx';
|
||||
|
||||
<EndpointNote method="POST" path="/v1/users" />
|
||||
```
|
||||
|
||||
## Snippets importing snippets
|
||||
|
||||
Snippets can import other snippets, which is useful for composing larger shared sections from smaller pieces.
|
||||
|
||||
```mdx snippets/auth-intro.mdx
|
||||
import AuthNote from '/snippets/auth-note.mdx';
|
||||
|
||||
## Authentication
|
||||
|
||||
All endpoints require a bearer token.
|
||||
|
||||
<AuthNote />
|
||||
```
|
||||
@@ -1,174 +0,0 @@
|
||||
---
|
||||
title: 'Configuration'
|
||||
description: 'Customize your site with the `docs.json` file'
|
||||
icon: 'gear'
|
||||
---
|
||||
|
||||
Every Mintlify site is configured through a `docs.json` file in your project root. Changes take effect immediately in local preview.
|
||||
|
||||
## Identity
|
||||
|
||||
Set the name, theme, and visual identity of your site.
|
||||
|
||||
```json docs.json
|
||||
{
|
||||
"name": "Acme Docs",
|
||||
"theme": "mint",
|
||||
"favicon": "/favicon.svg",
|
||||
"logo": {
|
||||
"light": "/logo/light.svg",
|
||||
"dark": "/logo/dark.svg"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<ResponseField name="name" type="string" required>
|
||||
Your project name. Appears in the browser tab title and site metadata.
|
||||
</ResponseField>
|
||||
|
||||
<ResponseField name="theme" type="string">
|
||||
The visual theme. Options: `mint`, `maple`, `willow`, `sequoia`, `prism`.
|
||||
</ResponseField>
|
||||
|
||||
<ResponseField name="favicon" type="string">
|
||||
Path to your favicon. SVG recommended for crisp rendering at all sizes.
|
||||
</ResponseField>
|
||||
|
||||
<ResponseField name="logo" type="object">
|
||||
<Expandable title="Logo">
|
||||
<ResponseField name="light" type="string">Logo shown in light mode.</ResponseField>
|
||||
<ResponseField name="dark" type="string">Logo shown in dark mode.</ResponseField>
|
||||
<ResponseField name="href" type="string" default="/">URL the logo links to.</ResponseField>
|
||||
</Expandable>
|
||||
</ResponseField>
|
||||
|
||||
## Colors
|
||||
|
||||
```json docs.json
|
||||
{
|
||||
"colors": {
|
||||
"primary": "#16A34A",
|
||||
"light": "#07C983",
|
||||
"dark": "#15803D"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<ResponseField name="colors.primary" type="string" required>
|
||||
Primary brand color. Used for highlights, active states, and accents in light mode.
|
||||
</ResponseField>
|
||||
|
||||
<ResponseField name="colors.light" type="string">
|
||||
Primary color for dark mode.
|
||||
</ResponseField>
|
||||
|
||||
<ResponseField name="colors.dark" type="string">
|
||||
Used for buttons and important interactive elements.
|
||||
</ResponseField>
|
||||
|
||||
<ResponseField name="colors.background" type="object">
|
||||
Override the default page background color.
|
||||
<Expandable title="Background">
|
||||
<ResponseField name="light" type="string">Background hex color in light mode.</ResponseField>
|
||||
<ResponseField name="dark" type="string">Background hex color in dark mode.</ResponseField>
|
||||
</Expandable>
|
||||
</ResponseField>
|
||||
|
||||
## Navbar
|
||||
|
||||
Configure the top navigation bar links and primary call-to-action.
|
||||
|
||||
```json docs.json
|
||||
{
|
||||
"navbar": {
|
||||
"links": [
|
||||
{ "label": "Support", "href": "mailto:support@example.com" }
|
||||
],
|
||||
"primary": {
|
||||
"type": "button",
|
||||
"label": "Dashboard",
|
||||
"href": "https://dashboard.example.com"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<ResponseField name="navbar.links" type="array">
|
||||
Text links displayed in the top navigation bar.
|
||||
<Expandable title="Link">
|
||||
<ResponseField name="label" type="string">Display text for the link.</ResponseField>
|
||||
<ResponseField name="href" type="string">URL the link points to.</ResponseField>
|
||||
</Expandable>
|
||||
</ResponseField>
|
||||
|
||||
<ResponseField name="navbar.primary" type="object">
|
||||
The prominent call-to-action in the top-right corner.
|
||||
<Expandable title="Primary">
|
||||
<ResponseField name="type" type='"button" | "github"'>
|
||||
`button` renders a CTA button. `github` renders a star count badge.
|
||||
</ResponseField>
|
||||
<ResponseField name="label" type="string">Button label. Required when type is `button`.</ResponseField>
|
||||
<ResponseField name="href" type="string">URL the button or badge links to.</ResponseField>
|
||||
</Expandable>
|
||||
</ResponseField>
|
||||
|
||||
## Navigation
|
||||
|
||||
Organize your pages into tabs and groups. See the [Navigation](/essentials/navigation) guide for full details.
|
||||
|
||||
```json docs.json
|
||||
{
|
||||
"navigation": {
|
||||
"tabs": [
|
||||
{
|
||||
"tab": "Guides",
|
||||
"groups": [
|
||||
{
|
||||
"group": "Getting started",
|
||||
"pages": ["index", "quickstart"]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"global": {
|
||||
"anchors": [
|
||||
{
|
||||
"anchor": "Blog",
|
||||
"href": "https://example.com/blog",
|
||||
"icon": "newspaper"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Contextual toolbar
|
||||
|
||||
The contextual toolbar floats on every page and gives readers one-click access to AI tools and integrations. See [Contextual toolbar](/agent-ready/contextual) for the full list of options.
|
||||
|
||||
```json docs.json
|
||||
{
|
||||
"contextual": {
|
||||
"options": ["copy", "view", "claude", "mcp", "cursor", "vscode"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Footer
|
||||
|
||||
```json docs.json
|
||||
{
|
||||
"footer": {
|
||||
"socials": {
|
||||
"x": "https://x.com/yourhandle",
|
||||
"github": "https://github.com/yourorg",
|
||||
"linkedin": "https://linkedin.com/company/yourco"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<ResponseField name="footer.socials" type="object">
|
||||
Social links shown in the footer. Supported keys: `x`, `github`, `linkedin`, `discord`, `slack`, `facebook`, `instagram`, `website`.
|
||||
</ResponseField>
|
||||
@@ -1,133 +1,111 @@
|
||||
---
|
||||
title: "Introduction"
|
||||
description: "Welcome to the new home for your documentation"
|
||||
icon: 'star'
|
||||
title: "AutoLibrary 用户手册"
|
||||
description: "北京建筑大学图书馆座位自动化工具 - 简化预约、签到、续约流程"
|
||||
icon: "book-open"
|
||||
---
|
||||
|
||||
## Setting up
|
||||
## 欢迎使用 AutoLibrary
|
||||
|
||||
Get your documentation site up and running in minutes.
|
||||
AutoLibrary 是一款专为北京建筑大学图书馆设计的自动化工具,帮助您简化图书馆座位操作流程,节省宝贵时间。
|
||||
|
||||
<Card
|
||||
title="Start here"
|
||||
title="最新版本 v1.3.0"
|
||||
icon="rocket"
|
||||
href="/quickstart"
|
||||
href="/versions/v1.3.0"
|
||||
horizontal
|
||||
>
|
||||
Follow our three step quickstart guide.
|
||||
查看最新版本的用户手册,包含 AutoScript 脚本编排、定时任务编辑等新特性。
|
||||
</Card>
|
||||
|
||||
## Make it yours
|
||||
## 主要功能
|
||||
|
||||
Design a docs site that looks great and empowers your users.
|
||||
|
||||
<Columns cols={2}>
|
||||
<Columns cols={3}>
|
||||
<Card
|
||||
title="Edit locally"
|
||||
icon="pen-to-square"
|
||||
href="/development"
|
||||
title="自动预约"
|
||||
icon="calendar-check"
|
||||
href="/versions/v1.3.0#自动预约"
|
||||
>
|
||||
Edit your docs locally and preview them in real time.
|
||||
按配置自动预约指定座位,支持定时任务批量处理。
|
||||
</Card>
|
||||
<Card
|
||||
title="Customize your site"
|
||||
icon="palette"
|
||||
href="/essentials/settings"
|
||||
title="自动签到"
|
||||
icon="clipboard-check"
|
||||
href="/versions/v1.3.0#自动签到"
|
||||
>
|
||||
Customize the design and colors of your site to match your brand.
|
||||
</Card>
|
||||
<Card
|
||||
title="Set up navigation"
|
||||
icon="map"
|
||||
href="/essentials/navigation"
|
||||
>
|
||||
Organize your docs to help users find what they need and succeed with your product.
|
||||
在可签到时间范围内自动完成签到,避免失约。
|
||||
</Card>
|
||||
<Card
|
||||
title="API documentation"
|
||||
icon="terminal"
|
||||
href="/api-reference/introduction"
|
||||
title="自动续约"
|
||||
icon="rotate-right"
|
||||
href="/versions/v1.3.0#自动续约"
|
||||
>
|
||||
Auto-generate API documentation from OpenAPI specifications.
|
||||
到达可续约时间自动延长座位使用时间。
|
||||
</Card>
|
||||
</Columns>
|
||||
|
||||
## Create beautiful pages
|
||||
## 版本手册
|
||||
|
||||
Everything you need to create world-class documentation.
|
||||
选择对应您使用的软件版本来查看详细文档:
|
||||
|
||||
<Columns cols={2}>
|
||||
<Card
|
||||
title="Write with MDX"
|
||||
icon="pen-fancy"
|
||||
href="/essentials/markdown"
|
||||
title="v1.3.0 (最新)"
|
||||
icon="star"
|
||||
href="/versions/v1.3.0"
|
||||
>
|
||||
Use MDX to style your docs pages.
|
||||
AutoScript 编排、定时任务编辑、重复任务、浏览器驱动自动下载。
|
||||
</Card>
|
||||
<Card
|
||||
title="Code samples"
|
||||
icon="code"
|
||||
href="/essentials/code"
|
||||
title="v1.2.1"
|
||||
icon="file-lines"
|
||||
href="/versions/v1.2.1"
|
||||
>
|
||||
Add sample code to demonstrate how to use your product.
|
||||
定时任务、配置文件管理、浏览器驱动自动下载。
|
||||
</Card>
|
||||
<Card
|
||||
title="Images"
|
||||
icon="image"
|
||||
href="/essentials/images"
|
||||
title="v1.1.0"
|
||||
icon="file-lines"
|
||||
href="/versions/v1.1.0"
|
||||
>
|
||||
Display images and other media.
|
||||
双版本类型(完整版/迷你版)、用户分组管理。
|
||||
</Card>
|
||||
<Card
|
||||
title="Reusable snippets"
|
||||
icon="recycle"
|
||||
href="/essentials/reusable-snippets"
|
||||
title="v1.0.5"
|
||||
icon="file-lines"
|
||||
href="/versions/v1.0.5"
|
||||
>
|
||||
Write once and reuse across your docs.
|
||||
运行模式组合优化、界面与配置文件双配置方式。
|
||||
</Card>
|
||||
<Card
|
||||
title="v1.0.0"
|
||||
icon="file-lines"
|
||||
href="/versions/v1.0.0"
|
||||
>
|
||||
首个正式版,支持自动预约/签到/续约、定时任务。
|
||||
</Card>
|
||||
<Card
|
||||
title="早期版本"
|
||||
icon="folder-open"
|
||||
href="/versions/v1.0.0-beta"
|
||||
>
|
||||
v1.0.0-beta、v0.1.0-alpha、v0.0.3-alpha 等早期测试版本。
|
||||
</Card>
|
||||
</Columns>
|
||||
|
||||
## Make your content agent ready
|
||||
|
||||
Make your docs work for humans and AI agents alike.
|
||||
|
||||
<Columns cols={2}>
|
||||
<Card
|
||||
title="Prompt component"
|
||||
icon="robot"
|
||||
href="/agent-ready/prompt"
|
||||
>
|
||||
Embed shareable AI prompts readers can copy or open in Cursor.
|
||||
</Card>
|
||||
<Card
|
||||
title="Visibility"
|
||||
icon="eye"
|
||||
href="/agent-ready/visibility"
|
||||
>
|
||||
Show different content to humans and agents reading your docs.
|
||||
</Card>
|
||||
<Card
|
||||
title="Contextual menu"
|
||||
icon="bolt"
|
||||
href="/agent-ready/contextual"
|
||||
>
|
||||
Give readers one-click access to Claude, ChatGPT, Cursor, and more.
|
||||
</Card>
|
||||
<Card
|
||||
title="AI coding tools"
|
||||
icon="wand-magic-sparkles"
|
||||
href="/ai-tools/claude-code"
|
||||
>
|
||||
Set up Claude Code, Cursor, or Windsurf with Mintlify's skill.
|
||||
</Card>
|
||||
</Columns>
|
||||
|
||||
## Need inspiration?
|
||||
## AutoScript 脚本
|
||||
|
||||
<Card
|
||||
title="See complete examples"
|
||||
icon="stars"
|
||||
href="https://mintlify.com/customers"
|
||||
title="AutoScript 语法参考"
|
||||
icon="code"
|
||||
href="/autoscript"
|
||||
horizontal
|
||||
>
|
||||
Browse our showcase of exceptional documentation sites.
|
||||
AutoScript 是一种轻量级脚本语言,专为重复定时任务设计。允许在任务执行前对预约数据进行预处理,实现动态调整参数。
|
||||
</Card>
|
||||
|
||||
## 快速开始
|
||||
|
||||
1. 从 [下载页面](https://autolibrary.kenanzhu.com/downloads) 获取最新版本
|
||||
2. 安装浏览器驱动(工具支持自动下载)
|
||||
3. 配置学号、密码及预约信息
|
||||
4. 点击"开始运行脚本"或设置定时任务
|
||||
@@ -1,81 +0,0 @@
|
||||
---
|
||||
title: "Quickstart"
|
||||
description: "Start building awesome documentation in minutes"
|
||||
icon: 'rocket'
|
||||
---
|
||||
|
||||
## Get started in three steps
|
||||
|
||||
Get your documentation site running locally and make your first customization.
|
||||
|
||||
### Step 1: Set up your local environment
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion icon="copy" title="Clone your docs locally">
|
||||
During the onboarding process, you created a GitHub repository with your docs content if you didn't already have one. You can find a link to this repository in your [dashboard](https://dashboard.mintlify.com).
|
||||
|
||||
To clone the repository locally so that you can make and preview changes to your docs, follow the [Cloning a repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) guide in the GitHub docs.
|
||||
</Accordion>
|
||||
<Accordion icon="rectangle-terminal" title="Start the preview server">
|
||||
1. Install the Mintlify CLI: `npm i -g mint`
|
||||
2. Navigate to your docs directory and run: `mint dev`
|
||||
3. Open `http://localhost:3000` to see your docs live!
|
||||
|
||||
<Tip>Your preview updates automatically as you edit files.</Tip>
|
||||
</Accordion>
|
||||
</AccordionGroup>
|
||||
|
||||
### Step 2: Deploy your changes
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion icon="github" title="Install our GitHub app">
|
||||
Install the Mintlify GitHub app from your [dashboard](https://dashboard.mintlify.com/settings/organization/github-app).
|
||||
|
||||
Our GitHub app automatically deploys your changes to your docs site, so you don't need to manage deployments yourself.
|
||||
</Accordion>
|
||||
<Accordion icon="palette" title="Update your site name and colors">
|
||||
For a first change, let's update the name and colors of your docs site.
|
||||
|
||||
1. Open `docs.json` in your editor.
|
||||
2. Change the `"name"` field to your project name.
|
||||
3. Update the `"colors"` to match your brand.
|
||||
4. Save and see your changes instantly at `http://localhost:3000`.
|
||||
|
||||
<Tip>Try changing the primary color to see an immediate difference!</Tip>
|
||||
</Accordion>
|
||||
</AccordionGroup>
|
||||
|
||||
### Step 3: Go live
|
||||
|
||||
<Accordion icon="rocket" title="Publish your docs">
|
||||
1. Commit and push your changes.
|
||||
2. Your docs will update and be live in moments!
|
||||
</Accordion>
|
||||
|
||||
## Next steps
|
||||
|
||||
Now that you have your docs running, explore these key features:
|
||||
|
||||
<CardGroup cols={2}>
|
||||
|
||||
<Card title="Write Content" icon="pen-to-square" href="/essentials/markdown">
|
||||
Learn MDX syntax and start writing your documentation.
|
||||
</Card>
|
||||
|
||||
<Card title="Customize style" icon="palette" href="/essentials/settings">
|
||||
Make your docs match your brand perfectly.
|
||||
</Card>
|
||||
|
||||
<Card title="Add code examples" icon="square-code" href="/essentials/code">
|
||||
Include syntax-highlighted code blocks.
|
||||
</Card>
|
||||
|
||||
<Card title="API documentation" icon="code" href="/api-reference/introduction">
|
||||
Auto-generate API docs from OpenAPI specs.
|
||||
</Card>
|
||||
|
||||
</CardGroup>
|
||||
|
||||
<Note>
|
||||
**Need help?** See our [full documentation](https://mintlify.com/docs) or join our [community](https://mintlify.com/community).
|
||||
</Note>
|
||||
@@ -1,4 +0,0 @@
|
||||
One of the core principles of software development is DRY (Don't Repeat
|
||||
Yourself). This is a principle that applies to documentation as
|
||||
well. If you find yourself repeating the same content in multiple places, you
|
||||
should consider creating a custom snippet to keep your content in sync.
|
||||
Reference in new issue
Block a user