@astro-minimax/cli 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template/functions/api/chat.ts +17 -3
- package/template/package.json +4 -4
- package/template/src/data/blog/en/alerts-examples.md +64 -0
- package/template/src/data/blog/en/code-examples.md +99 -0
- package/template/src/data/blog/en/hello-world.md +78 -0
- package/template/src/data/blog/en/markmap-examples.md +100 -0
- package/template/src/data/blog/en/math-examples.md +58 -0
- package/template/src/data/blog/en/mermaid-examples.md +237 -0
- package/template/src/data/blog/en/series-example-01.md +41 -0
- package/template/src/data/blog/en/series-example-02.md +41 -0
- package/template/src/data/blog/zh/alerts-examples.md +1 -0
- package/template/src/data/blog/zh/code-examples.md +1 -0
- package/template/src/data/blog/zh/hello-world.md +46 -2
- package/template/src/data/blog/zh/markmap-examples.md +1 -0
- package/template/src/data/blog/zh/math-examples.md +1 -0
- package/template/src/data/blog/zh/mermaid-examples.md +187 -30
- package/template/src/data/blog/zh/series-example-01.md +41 -0
- package/template/src/data/blog/zh/series-example-02.md +41 -0
package/package.json
CHANGED
|
@@ -8,10 +8,22 @@ import factRegistry from '../../datas/fact-registry.json';
|
|
|
8
8
|
|
|
9
9
|
// Optional: TF-IDF vector index for enhanced search reranking
|
|
10
10
|
// The vector index is created by `astro-minimax ai process` command
|
|
11
|
-
//
|
|
11
|
+
// Lazy-loaded on first request to avoid top-level await issues with Cloudflare Pages
|
|
12
12
|
let vectorIndex: unknown = null;
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
let vectorIndexLoaded = false;
|
|
14
|
+
|
|
15
|
+
async function loadVectorIndex(): Promise<unknown> {
|
|
16
|
+
if (vectorIndexLoaded) return vectorIndex;
|
|
17
|
+
vectorIndexLoaded = true;
|
|
18
|
+
try {
|
|
19
|
+
// Dynamic import for optional file that may not exist
|
|
20
|
+
const module = await import('../../src/data/vectors/index.json');
|
|
21
|
+
vectorIndex = module.default;
|
|
22
|
+
} catch {
|
|
23
|
+
// File not available, keep vectorIndex as null
|
|
24
|
+
}
|
|
25
|
+
return vectorIndex;
|
|
26
|
+
}
|
|
15
27
|
|
|
16
28
|
interface FunctionEnv extends ChatHandlerEnv {
|
|
17
29
|
CACHE_KV?: KVNamespace;
|
|
@@ -20,6 +32,8 @@ interface FunctionEnv extends ChatHandlerEnv {
|
|
|
20
32
|
}
|
|
21
33
|
|
|
22
34
|
export const onRequest: PagesFunction<FunctionEnv> = async (context) => {
|
|
35
|
+
await loadVectorIndex();
|
|
36
|
+
|
|
23
37
|
initializeMetadata(
|
|
24
38
|
{ summaries: aiSummaries, authorContext, voiceProfile, factRegistry, vectorIndex },
|
|
25
39
|
context.env,
|
package/template/package.json
CHANGED
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@ai-sdk/openai-compatible": "^2.0.35",
|
|
30
30
|
"@ai-sdk/react": "^3.0.118",
|
|
31
|
-
"@astro-minimax/ai": "^0.8.
|
|
32
|
-
"@astro-minimax/core": "^0.8.
|
|
33
|
-
"@astro-minimax/notify": "^0.8.
|
|
31
|
+
"@astro-minimax/ai": "^0.8.1",
|
|
32
|
+
"@astro-minimax/core": "^0.8.1",
|
|
33
|
+
"@astro-minimax/notify": "^0.8.1",
|
|
34
34
|
"@astrojs/mdx": "^5.0.0",
|
|
35
35
|
"@astrojs/preact": "^5.0.0",
|
|
36
36
|
"@astrojs/rss": "^4.0.17",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"tailwindcss": "^4.2.1"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@astro-minimax/cli": "^0.8.
|
|
60
|
+
"@astro-minimax/cli": "^0.8.1",
|
|
61
61
|
"@astrojs/check": "^0.9.7",
|
|
62
62
|
"@cloudflare/workers-types": "^4.20260313.1",
|
|
63
63
|
"@pagefind/default-ui": "^1.4.0",
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "GitHub Alerts Examples"
|
|
3
|
+
description: "Demonstrate GitHub-style alert boxes with multiple types"
|
|
4
|
+
pubDatetime: 2024-01-06T00:00:00.000Z
|
|
5
|
+
author: "Your Name"
|
|
6
|
+
tags:
|
|
7
|
+
- tutorial
|
|
8
|
+
category: Tutorial/Features
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## What are GitHub Alerts?
|
|
12
|
+
|
|
13
|
+
GitHub Alerts are GitHub-style alert boxes that can be used to emphasize important information, warnings, or tips.
|
|
14
|
+
|
|
15
|
+
## Basic Usage
|
|
16
|
+
|
|
17
|
+
> [!NOTE]
|
|
18
|
+
> This is a regular note for supplementary information.
|
|
19
|
+
|
|
20
|
+
> [!TIP]
|
|
21
|
+
> This is a tip that can help users use certain features better.
|
|
22
|
+
|
|
23
|
+
> [!IMPORTANT]
|
|
24
|
+
> This is important information that users should pay special attention to.
|
|
25
|
+
|
|
26
|
+
> [!WARNING]
|
|
27
|
+
> This is a warning to alert users about potential risks.
|
|
28
|
+
|
|
29
|
+
> [!CAUTION]
|
|
30
|
+
> This is a danger warning for irreversible operations.
|
|
31
|
+
|
|
32
|
+
## With Formatting
|
|
33
|
+
|
|
34
|
+
> [!NOTE]
|
|
35
|
+
> Notes can contain **bold**, *italic*, and `code`.
|
|
36
|
+
|
|
37
|
+
> [!TIP]
|
|
38
|
+
> Tips can also include lists:
|
|
39
|
+
> - Item 1
|
|
40
|
+
> - Item 2
|
|
41
|
+
> - Item 3
|
|
42
|
+
|
|
43
|
+
> [!WARNING]
|
|
44
|
+
> Warnings support code blocks:
|
|
45
|
+
> ```bash
|
|
46
|
+
> rm -rf / # Never run this!
|
|
47
|
+
> ```
|
|
48
|
+
|
|
49
|
+
## Use Cases
|
|
50
|
+
|
|
51
|
+
### For Documentation
|
|
52
|
+
|
|
53
|
+
> [!TIP]
|
|
54
|
+
> Use alerts to highlight key points in your documentation.
|
|
55
|
+
|
|
56
|
+
### For Tutorials
|
|
57
|
+
|
|
58
|
+
> [!IMPORTANT]
|
|
59
|
+
> Make sure to save your work before proceeding.
|
|
60
|
+
|
|
61
|
+
### For API Docs
|
|
62
|
+
|
|
63
|
+
> [!WARNING]
|
|
64
|
+
> This endpoint is deprecated and will be removed in v2.0.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Code Highlighting Examples"
|
|
3
|
+
description: "Demonstrate Shiki code highlighting with multiple programming languages and advanced features"
|
|
4
|
+
pubDatetime: 2024-01-05T00:00:00.000Z
|
|
5
|
+
author: "Your Name"
|
|
6
|
+
tags:
|
|
7
|
+
- tutorial
|
|
8
|
+
- code
|
|
9
|
+
category: Tutorial/Features
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Basic Code Blocks
|
|
13
|
+
|
|
14
|
+
### TypeScript
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
interface User {
|
|
18
|
+
id: number;
|
|
19
|
+
name: string;
|
|
20
|
+
email: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
async function fetchUser(id: number): Promise<User> {
|
|
24
|
+
const response = await fetch(`/api/users/${id}`);
|
|
25
|
+
if (!response.ok) {
|
|
26
|
+
throw new Error('Failed to fetch user');
|
|
27
|
+
}
|
|
28
|
+
return response.json();
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Usage
|
|
32
|
+
const user = await fetchUser(1);
|
|
33
|
+
console.log(user.name);
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Python
|
|
37
|
+
|
|
38
|
+
```python
|
|
39
|
+
from dataclasses import dataclass
|
|
40
|
+
from typing import Optional
|
|
41
|
+
|
|
42
|
+
@dataclass
|
|
43
|
+
class User:
|
|
44
|
+
id: int
|
|
45
|
+
name: str
|
|
46
|
+
email: Optional[str] = None
|
|
47
|
+
|
|
48
|
+
def fetch_user(user_id: int) -> User:
|
|
49
|
+
"""Fetch a user by ID."""
|
|
50
|
+
# Simulate API call
|
|
51
|
+
return User(id=user_id, name="John Doe", email="john@example.com")
|
|
52
|
+
|
|
53
|
+
# Usage
|
|
54
|
+
user = fetch_user(1)
|
|
55
|
+
print(f"User: {user.name}")
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Advanced Features
|
|
59
|
+
|
|
60
|
+
### Line Numbers
|
|
61
|
+
|
|
62
|
+
```typescript showLineNumbers
|
|
63
|
+
function fibonacci(n: number): number {
|
|
64
|
+
if (n <= 1) return n;
|
|
65
|
+
return fibonacci(n - 1) + fibonacci(n - 2);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Calculate first 10 Fibonacci numbers
|
|
69
|
+
for (let i = 0; i < 10; i++) {
|
|
70
|
+
console.log(fibonacci(i));
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Highlight Lines
|
|
75
|
+
|
|
76
|
+
```typescript {2,5-7}
|
|
77
|
+
function processData(data: unknown) {
|
|
78
|
+
if (!data) throw new Error('No data provided'); // Highlighted
|
|
79
|
+
|
|
80
|
+
return {
|
|
81
|
+
success: true, // Highlighted
|
|
82
|
+
data: data, // Highlighted
|
|
83
|
+
timestamp: Date.now() // Highlighted
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Diff Highlighting
|
|
89
|
+
|
|
90
|
+
```diff
|
|
91
|
+
function calculateTotal(items: Item[]) {
|
|
92
|
+
- return items.reduce((sum, item) => sum + item.price, 0);
|
|
93
|
+
+ const subtotal = items.reduce((sum, item) => sum + item.price, 0);
|
|
94
|
+
+ const tax = subtotal * 0.1;
|
|
95
|
+
+ return subtotal + tax;
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
For more code highlighting options, see the [Shiki documentation](https://shiki.style/).
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Hello, World"
|
|
3
|
+
description: "This is my first blog post, powered by the astro-minimax theme."
|
|
4
|
+
pubDatetime: 2026-01-01T00:00:00.000Z
|
|
5
|
+
author: "Your Name"
|
|
6
|
+
# draft: false # Optional: Set true to hide from production
|
|
7
|
+
# featured: false # Optional: Set true to feature on homepage
|
|
8
|
+
tags:
|
|
9
|
+
- getting-started
|
|
10
|
+
category: Tutorial/Getting Started
|
|
11
|
+
# series: # Optional: Article series configuration
|
|
12
|
+
# name: "Getting Started Series"
|
|
13
|
+
# order: 1
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Welcome to My Blog
|
|
17
|
+
|
|
18
|
+
This is the first post created using the [astro-minimax](https://github.com/souloss/astro-minimax) theme.
|
|
19
|
+
|
|
20
|
+
### Start Writing
|
|
21
|
+
|
|
22
|
+
Create `.md` or `.mdx` files in the `src/data/blog/en/` directory to publish new articles.
|
|
23
|
+
|
|
24
|
+
Each article requires the following frontmatter:
|
|
25
|
+
|
|
26
|
+
```yaml
|
|
27
|
+
---
|
|
28
|
+
title: "Article Title"
|
|
29
|
+
description: "Article description"
|
|
30
|
+
pubDatetime: 2026-01-01T00:00:00.000Z
|
|
31
|
+
author: "Author Name"
|
|
32
|
+
tags:
|
|
33
|
+
- tag-name
|
|
34
|
+
category: Category/Subcategory
|
|
35
|
+
---
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Optional Fields
|
|
39
|
+
|
|
40
|
+
```yaml
|
|
41
|
+
# draft: false # Set true to hide the article
|
|
42
|
+
# featured: false # Set true to feature on homepage
|
|
43
|
+
# modDatetime: ... # Last modified time
|
|
44
|
+
# series: # Article series configuration
|
|
45
|
+
# name: "Series Name"
|
|
46
|
+
# order: 1
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Customize the Theme
|
|
50
|
+
|
|
51
|
+
Edit `src/config.ts` to customize your blog:
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
SITE: {
|
|
55
|
+
title: "My Blog",
|
|
56
|
+
author: "Your Name",
|
|
57
|
+
desc: "Blog description",
|
|
58
|
+
// Feature toggles
|
|
59
|
+
features: {
|
|
60
|
+
tags: true, // Tags page
|
|
61
|
+
categories: true, // Categories page
|
|
62
|
+
series: true, // Series page
|
|
63
|
+
archives: true, // Archives page
|
|
64
|
+
search: true, // Search page
|
|
65
|
+
},
|
|
66
|
+
darkMode: true, // Dark mode
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Built-in Features
|
|
71
|
+
|
|
72
|
+
- ✅ **Markdown Extensions** - Math formulas, code highlighting, GitHub Alerts
|
|
73
|
+
- ✅ **Visualization** - Mermaid diagrams, Markmap mind maps
|
|
74
|
+
- ✅ **SEO Optimization** - Auto-generated sitemap, RSS, Open Graph
|
|
75
|
+
- ✅ **Multi-language** - Chinese and English support
|
|
76
|
+
- ✅ **Dark Mode** - Auto-follow system or manual toggle
|
|
77
|
+
|
|
78
|
+
Happy writing!
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Markmap Mind Map Examples"
|
|
3
|
+
description: "Demonstrate Markmap interactive mind map functionality"
|
|
4
|
+
pubDatetime: 2024-01-03T00:00:00.000Z
|
|
5
|
+
author: "Your Name"
|
|
6
|
+
tags:
|
|
7
|
+
- tutorial
|
|
8
|
+
- Markmap
|
|
9
|
+
category: Tutorial/Tools
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## What is Markmap?
|
|
13
|
+
|
|
14
|
+
Markmap is a tool that converts Markdown into interactive mind maps, perfect for presenting hierarchical content.
|
|
15
|
+
|
|
16
|
+
## Basic Usage
|
|
17
|
+
|
|
18
|
+
```markmap
|
|
19
|
+
# Central Topic
|
|
20
|
+
|
|
21
|
+
## Branch 1
|
|
22
|
+
### Sub-branch 1-1
|
|
23
|
+
### Sub-branch 1-2
|
|
24
|
+
#### Deeper level
|
|
25
|
+
|
|
26
|
+
## Branch 2
|
|
27
|
+
### Sub-branch 2-1
|
|
28
|
+
### Sub-branch 2-2
|
|
29
|
+
|
|
30
|
+
## Branch 3
|
|
31
|
+
### Sub-branch 3-1
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Learning Path Example
|
|
35
|
+
|
|
36
|
+
```markmap
|
|
37
|
+
# Web Development Learning Path
|
|
38
|
+
|
|
39
|
+
## Frontend
|
|
40
|
+
### HTML & CSS
|
|
41
|
+
#### Semantic HTML
|
|
42
|
+
#### Flexbox & Grid
|
|
43
|
+
### JavaScript
|
|
44
|
+
#### ES6+ Features
|
|
45
|
+
#### DOM Manipulation
|
|
46
|
+
### Frameworks
|
|
47
|
+
#### Vue.js
|
|
48
|
+
#### React
|
|
49
|
+
#### Angular
|
|
50
|
+
|
|
51
|
+
## Backend
|
|
52
|
+
### Node.js
|
|
53
|
+
#### Express
|
|
54
|
+
#### NestJS
|
|
55
|
+
### Python
|
|
56
|
+
#### Django
|
|
57
|
+
#### FastAPI
|
|
58
|
+
### Databases
|
|
59
|
+
#### SQL
|
|
60
|
+
#### MongoDB
|
|
61
|
+
|
|
62
|
+
## DevOps
|
|
63
|
+
### Version Control
|
|
64
|
+
#### Git
|
|
65
|
+
### CI/CD
|
|
66
|
+
#### GitHub Actions
|
|
67
|
+
### Cloud
|
|
68
|
+
#### AWS
|
|
69
|
+
#### Vercel
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Project Architecture
|
|
73
|
+
|
|
74
|
+
```markmap
|
|
75
|
+
# Project Structure
|
|
76
|
+
|
|
77
|
+
## Source Code
|
|
78
|
+
### Components
|
|
79
|
+
#### UI Components
|
|
80
|
+
#### Layout Components
|
|
81
|
+
### Pages
|
|
82
|
+
#### Home
|
|
83
|
+
#### About
|
|
84
|
+
### Services
|
|
85
|
+
#### API Service
|
|
86
|
+
#### Auth Service
|
|
87
|
+
|
|
88
|
+
## Configuration
|
|
89
|
+
### TypeScript
|
|
90
|
+
### ESLint
|
|
91
|
+
### Vite
|
|
92
|
+
|
|
93
|
+
## Tests
|
|
94
|
+
### Unit Tests
|
|
95
|
+
### E2E Tests
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Click on any node to expand or collapse. This interactivity makes mind maps excellent for documentation and presentations.
|
|
99
|
+
|
|
100
|
+
For more information, visit [Markmap on GitHub](https://github.com/markmap/markmap).
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Math Formula Examples"
|
|
3
|
+
description: "Demonstrate KaTeX math formula rendering with inline and block formulas"
|
|
4
|
+
pubDatetime: 2024-01-04T00:00:00.000Z
|
|
5
|
+
author: "Your Name"
|
|
6
|
+
tags:
|
|
7
|
+
- tutorial
|
|
8
|
+
- math
|
|
9
|
+
category: Tutorial/Features
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Inline Formulas
|
|
13
|
+
|
|
14
|
+
A simple inline formula: $E = mc^2$, Einstein's mass-energy equation.
|
|
15
|
+
|
|
16
|
+
Pythagorean theorem: The sum of squares of two right-angle sides equals the square of the hypotenuse, i.e., $a^2 + b^2 = c^2$.
|
|
17
|
+
|
|
18
|
+
## Block Formulas
|
|
19
|
+
|
|
20
|
+
### Quadratic Formula
|
|
21
|
+
|
|
22
|
+
$$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$
|
|
23
|
+
|
|
24
|
+
### Euler's Formula
|
|
25
|
+
|
|
26
|
+
$$e^{i\pi} + 1 = 0$$
|
|
27
|
+
|
|
28
|
+
### Gaussian Integral
|
|
29
|
+
|
|
30
|
+
$$\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}$$
|
|
31
|
+
|
|
32
|
+
## Complex Examples
|
|
33
|
+
|
|
34
|
+
### Matrix
|
|
35
|
+
|
|
36
|
+
$$
|
|
37
|
+
A = \begin{pmatrix}
|
|
38
|
+
a & b \\
|
|
39
|
+
c & d
|
|
40
|
+
\end{pmatrix}
|
|
41
|
+
$$
|
|
42
|
+
|
|
43
|
+
### Maxwell's Equations
|
|
44
|
+
|
|
45
|
+
$$
|
|
46
|
+
\begin{aligned}
|
|
47
|
+
\nabla \cdot \mathbf{E} &= \frac{\rho}{\varepsilon_0} \\
|
|
48
|
+
\nabla \cdot \mathbf{B} &= 0 \\
|
|
49
|
+
\nabla \times \mathbf{E} &= -\frac{\partial \mathbf{B}}{\partial t} \\
|
|
50
|
+
\nabla \times \mathbf{B} &= \mu_0 \mathbf{J} + \mu_0 \varepsilon_0 \frac{\partial \mathbf{E}}{\partial t}
|
|
51
|
+
\end{aligned}
|
|
52
|
+
$$
|
|
53
|
+
|
|
54
|
+
### Schrödinger Equation
|
|
55
|
+
|
|
56
|
+
$$i\hbar \frac{\partial}{\partial t} \Psi(\mathbf{r}, t) = \hat{H} \Psi(\mathbf{r}, t)$$
|
|
57
|
+
|
|
58
|
+
For more KaTeX syntax, see the [KaTeX Documentation](https://katex.org/).
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Mermaid Diagram Examples"
|
|
3
|
+
description: "Demonstrate Mermaid flowcharts, sequence diagrams, class diagrams, and 11 diagram types"
|
|
4
|
+
pubDatetime: 2024-01-02T00:00:00.000Z
|
|
5
|
+
author: "Your Name"
|
|
6
|
+
tags:
|
|
7
|
+
- tutorial
|
|
8
|
+
- Mermaid
|
|
9
|
+
category: Tutorial/Tools
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
This article demonstrates how to create various Mermaid diagrams using ` ```mermaid ` code blocks.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## 1. Flowchart
|
|
17
|
+
|
|
18
|
+
### 1.1 Basic Flowchart
|
|
19
|
+
|
|
20
|
+
```mermaid
|
|
21
|
+
flowchart TD
|
|
22
|
+
A[Start] --> B{Condition}
|
|
23
|
+
B -->|Yes| C[Execute A]
|
|
24
|
+
B -->|No| D[Execute B]
|
|
25
|
+
C --> E[End]
|
|
26
|
+
D --> E
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### 1.2 Horizontal Flowchart
|
|
30
|
+
|
|
31
|
+
```mermaid
|
|
32
|
+
flowchart LR
|
|
33
|
+
A[Request] --> B[Load Balancer]
|
|
34
|
+
B --> C[Server A]
|
|
35
|
+
B --> D[Server B]
|
|
36
|
+
C --> E[(Database)]
|
|
37
|
+
D --> E
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 2. Sequence Diagram
|
|
43
|
+
|
|
44
|
+
```mermaid
|
|
45
|
+
sequenceDiagram
|
|
46
|
+
participant User
|
|
47
|
+
participant Frontend
|
|
48
|
+
participant Backend
|
|
49
|
+
participant Database
|
|
50
|
+
|
|
51
|
+
User->>Frontend: Click login
|
|
52
|
+
Frontend->>Backend: POST /api/login
|
|
53
|
+
Backend->>Database: Query user
|
|
54
|
+
Database-->>Backend: Return data
|
|
55
|
+
Backend-->>Frontend: Return JWT
|
|
56
|
+
Frontend-->>User: Redirect home
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## 3. Class Diagram
|
|
62
|
+
|
|
63
|
+
```mermaid
|
|
64
|
+
classDiagram
|
|
65
|
+
class Animal {
|
|
66
|
+
+String name
|
|
67
|
+
+int age
|
|
68
|
+
+makeSound()
|
|
69
|
+
}
|
|
70
|
+
class Dog {
|
|
71
|
+
+String breed
|
|
72
|
+
+bark()
|
|
73
|
+
}
|
|
74
|
+
class Cat {
|
|
75
|
+
+String color
|
|
76
|
+
+meow()
|
|
77
|
+
}
|
|
78
|
+
Animal <|-- Dog
|
|
79
|
+
Animal <|-- Cat
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## 4. State Diagram
|
|
85
|
+
|
|
86
|
+
```mermaid
|
|
87
|
+
stateDiagram-v2
|
|
88
|
+
[*] --> Pending
|
|
89
|
+
Pending --> Processing: Start
|
|
90
|
+
Processing --> Completed: Success
|
|
91
|
+
Processing --> Cancelled: Failure
|
|
92
|
+
Completed --> [*]
|
|
93
|
+
Cancelled --> [*]
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## 5. ER Diagram
|
|
99
|
+
|
|
100
|
+
```mermaid
|
|
101
|
+
erDiagram
|
|
102
|
+
USER ||--o{ ORDER : places
|
|
103
|
+
USER {
|
|
104
|
+
int id PK
|
|
105
|
+
string username
|
|
106
|
+
string email
|
|
107
|
+
}
|
|
108
|
+
ORDER ||--|{ ORDER_ITEM : contains
|
|
109
|
+
ORDER {
|
|
110
|
+
int id PK
|
|
111
|
+
int user_id FK
|
|
112
|
+
datetime order_date
|
|
113
|
+
string status
|
|
114
|
+
}
|
|
115
|
+
PRODUCT ||--o{ ORDER_ITEM : "included in"
|
|
116
|
+
PRODUCT {
|
|
117
|
+
int id PK
|
|
118
|
+
string name
|
|
119
|
+
float price
|
|
120
|
+
}
|
|
121
|
+
ORDER_ITEM {
|
|
122
|
+
int id PK
|
|
123
|
+
int quantity
|
|
124
|
+
float unit_price
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## 6. Gantt Chart
|
|
131
|
+
|
|
132
|
+
```mermaid
|
|
133
|
+
gantt
|
|
134
|
+
title Project Timeline
|
|
135
|
+
dateFormat YYYY-MM-DD
|
|
136
|
+
section Design
|
|
137
|
+
Requirements :a1, 2024-01-01, 7d
|
|
138
|
+
UI Design :a2, after a1, 5d
|
|
139
|
+
section Development
|
|
140
|
+
Frontend :b1, after a2, 14d
|
|
141
|
+
Backend :b2, after a2, 14d
|
|
142
|
+
section Testing
|
|
143
|
+
QA Testing :c1, after b1, 7d
|
|
144
|
+
Deployment :c2, after c1, 3d
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## 7. Pie Chart
|
|
150
|
+
|
|
151
|
+
```mermaid
|
|
152
|
+
pie showData
|
|
153
|
+
title Programming Language Usage
|
|
154
|
+
"TypeScript" : 35
|
|
155
|
+
"Python" : 25
|
|
156
|
+
"Go" : 20
|
|
157
|
+
"Rust" : 12
|
|
158
|
+
"Others" : 8
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## 8. Git Graph
|
|
164
|
+
|
|
165
|
+
```mermaid
|
|
166
|
+
gitGraph
|
|
167
|
+
commit id: "Init project"
|
|
168
|
+
commit id: "Add features"
|
|
169
|
+
branch develop
|
|
170
|
+
checkout develop
|
|
171
|
+
commit id: "WIP"
|
|
172
|
+
checkout main
|
|
173
|
+
merge develop id: "v1.0" tag: "v1.0"
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## 9. User Journey
|
|
179
|
+
|
|
180
|
+
```mermaid
|
|
181
|
+
journey
|
|
182
|
+
title Shopping Experience
|
|
183
|
+
section Browse
|
|
184
|
+
Open homepage: 5: User
|
|
185
|
+
Search products: 4: User
|
|
186
|
+
section Purchase
|
|
187
|
+
Add to cart: 4: User
|
|
188
|
+
Checkout: 3: User, System
|
|
189
|
+
section Receive
|
|
190
|
+
Confirm delivery: 5: User
|
|
191
|
+
Rate product: 4: User
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## 10. Mindmap
|
|
197
|
+
|
|
198
|
+
```mermaid
|
|
199
|
+
mindmap
|
|
200
|
+
root((Web Development))
|
|
201
|
+
Frontend
|
|
202
|
+
HTML/CSS
|
|
203
|
+
JavaScript
|
|
204
|
+
TypeScript
|
|
205
|
+
Frameworks
|
|
206
|
+
Vue
|
|
207
|
+
React
|
|
208
|
+
Backend
|
|
209
|
+
Node.js
|
|
210
|
+
Python
|
|
211
|
+
Go
|
|
212
|
+
Database
|
|
213
|
+
MySQL
|
|
214
|
+
MongoDB
|
|
215
|
+
Redis
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## 11. Custom Styling
|
|
221
|
+
|
|
222
|
+
```mermaid
|
|
223
|
+
flowchart TD
|
|
224
|
+
A[Start] --> B[Process]
|
|
225
|
+
B --> C[End]
|
|
226
|
+
|
|
227
|
+
style A fill:#f9f,stroke:#333,stroke-width:2px
|
|
228
|
+
style B fill:#bbf,stroke:#333,stroke-width:2px
|
|
229
|
+
style C fill:#bfb,stroke:#333,stroke-width:2px
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## References
|
|
235
|
+
|
|
236
|
+
- [Mermaid Documentation](https://mermaid.js.org/)
|
|
237
|
+
- [Mermaid Live Editor](https://mermaid.live/)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Article Series Example - Part 1"
|
|
3
|
+
description: "First part of the article series, demonstrating series navigation"
|
|
4
|
+
pubDatetime: 2024-01-07T00:00:00.000Z
|
|
5
|
+
author: "Your Name"
|
|
6
|
+
tags:
|
|
7
|
+
- tutorial
|
|
8
|
+
- series
|
|
9
|
+
category: Tutorial/Examples
|
|
10
|
+
series:
|
|
11
|
+
name: Article Series Example
|
|
12
|
+
order: 1
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## About Article Series
|
|
16
|
+
|
|
17
|
+
astro-minimax supports **article series** functionality, automatically displaying series navigation at the bottom of articles, including progress, previous and next links.
|
|
18
|
+
|
|
19
|
+
### Series Configuration
|
|
20
|
+
|
|
21
|
+
Add a `series` field in frontmatter:
|
|
22
|
+
|
|
23
|
+
```yaml
|
|
24
|
+
---
|
|
25
|
+
title: "Article Title"
|
|
26
|
+
series:
|
|
27
|
+
name: "Series Name"
|
|
28
|
+
order: 1 # Order in the series
|
|
29
|
+
---
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Features
|
|
33
|
+
|
|
34
|
+
- Automatic series progress bar
|
|
35
|
+
- Shows current article position
|
|
36
|
+
- Auto-generates previous/next navigation
|
|
37
|
+
- Series page aggregates all articles
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
> **Next**: [Article Series Example - Part 2](/en/posts/series-example-02)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Article Series Example - Part 2"
|
|
3
|
+
description: "Second part of the article series, continuing the demonstration"
|
|
4
|
+
pubDatetime: 2024-01-08T00:00:00.000Z
|
|
5
|
+
author: "Your Name"
|
|
6
|
+
tags:
|
|
7
|
+
- tutorial
|
|
8
|
+
- series
|
|
9
|
+
category: Tutorial/Examples
|
|
10
|
+
series:
|
|
11
|
+
name: Article Series Example
|
|
12
|
+
order: 2
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Series Advanced Topics
|
|
16
|
+
|
|
17
|
+
This is the second part of the series. When readers view this article, they can see:
|
|
18
|
+
|
|
19
|
+
- Series progress (e.g., 2/2)
|
|
20
|
+
- Link to the previous article
|
|
21
|
+
- Series overview
|
|
22
|
+
|
|
23
|
+
### Use Cases
|
|
24
|
+
|
|
25
|
+
Article series are perfect for:
|
|
26
|
+
|
|
27
|
+
- Multi-chapter tutorials
|
|
28
|
+
- Topic series
|
|
29
|
+
- Progressive learning paths
|
|
30
|
+
- Project development logs
|
|
31
|
+
|
|
32
|
+
### Best Practices
|
|
33
|
+
|
|
34
|
+
1. **Consistent Naming**: Use consistent naming patterns within the series
|
|
35
|
+
2. **Appropriate Splitting**: Each article should focus on one topic
|
|
36
|
+
3. **Cross-References**: Reference other parts appropriately
|
|
37
|
+
4. **Completeness**: Ensure articles form a complete knowledge system
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
> **Previous**: [Article Series Example - Part 1](/en/posts/series-example-01)
|
|
@@ -2,9 +2,15 @@
|
|
|
2
2
|
title: "你好,世界"
|
|
3
3
|
description: "这是我的第一篇博客文章,由 astro-minimax 主题驱动。"
|
|
4
4
|
pubDatetime: 2026-01-01T00:00:00.000Z
|
|
5
|
+
author: "Your Name"
|
|
6
|
+
# draft: false # Optional: Set true to hide from production
|
|
7
|
+
# featured: false # Optional: Set true to feature on homepage
|
|
5
8
|
tags:
|
|
6
9
|
- 入门
|
|
7
10
|
category: 教程/入门
|
|
11
|
+
# series: # Optional: Article series configuration
|
|
12
|
+
# name: "Getting Started Series"
|
|
13
|
+
# order: 1
|
|
8
14
|
---
|
|
9
15
|
|
|
10
16
|
## 欢迎来到我的博客
|
|
@@ -22,13 +28,51 @@ category: 教程/入门
|
|
|
22
28
|
title: "文章标题"
|
|
23
29
|
description: "文章描述"
|
|
24
30
|
pubDatetime: 2026-01-01T00:00:00.000Z
|
|
31
|
+
author: "作者名称"
|
|
25
32
|
tags:
|
|
26
33
|
- 标签名
|
|
34
|
+
category: 分类/子分类
|
|
27
35
|
---
|
|
28
36
|
```
|
|
29
37
|
|
|
38
|
+
### 可选字段
|
|
39
|
+
|
|
40
|
+
```yaml
|
|
41
|
+
# draft: false # 设为 true 可隐藏文章
|
|
42
|
+
# featured: false # 设为 true 可在首页突出显示
|
|
43
|
+
# modDatetime: ... # 最后修改时间
|
|
44
|
+
# series: # 系列文章配置
|
|
45
|
+
# name: "系列名称"
|
|
46
|
+
# order: 1
|
|
47
|
+
```
|
|
48
|
+
|
|
30
49
|
### 自定义主题
|
|
31
50
|
|
|
32
|
-
编辑 `src/config.ts`
|
|
51
|
+
编辑 `src/config.ts` 来自定义博客:
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
SITE: {
|
|
55
|
+
title: "我的博客",
|
|
56
|
+
author: "Your Name",
|
|
57
|
+
desc: "博客描述",
|
|
58
|
+
// 功能开关
|
|
59
|
+
features: {
|
|
60
|
+
tags: true, # 标签页
|
|
61
|
+
categories: true, # 分类页
|
|
62
|
+
series: true, # 系列页
|
|
63
|
+
archives: true, # 归档页
|
|
64
|
+
search: true, # 搜索页
|
|
65
|
+
},
|
|
66
|
+
darkMode: true, # 暗色模式
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### 内置功能
|
|
71
|
+
|
|
72
|
+
- ✅ **Markdown 扩展** - 数学公式、代码高亮、GitHub Alerts
|
|
73
|
+
- ✅ **可视化** - Mermaid 图表、Markmap 思维导图
|
|
74
|
+
- ✅ **SEO 优化** - 自动生成 sitemap、RSS、Open Graph
|
|
75
|
+
- ✅ **多语言** - 支持中英文双语
|
|
76
|
+
- ✅ **暗色模式** - 自动跟随系统或手动切换
|
|
33
77
|
|
|
34
|
-
祝你写作愉快!
|
|
78
|
+
祝你写作愉快!
|
|
@@ -1,28 +1,45 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Mermaid 图表示例"
|
|
3
|
-
description: "展示 Mermaid
|
|
3
|
+
description: "展示 Mermaid 流程图、时序图、类图、状态图等 11 种图表类型"
|
|
4
4
|
pubDatetime: 2024-01-02T00:00:00.000Z
|
|
5
|
+
author: "Your Name"
|
|
5
6
|
tags:
|
|
6
7
|
- 教程
|
|
7
8
|
- Mermaid
|
|
8
9
|
category: 教程/工具
|
|
9
10
|
---
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
本文展示如何使用 ` ```mermaid ` 代码块语法创建各种 Mermaid 图表。
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## 一、流程图 (Flowchart)
|
|
17
|
+
|
|
18
|
+
### 1.1 基本流程图
|
|
19
|
+
|
|
20
|
+
```mermaid
|
|
21
|
+
flowchart TD
|
|
22
|
+
A[开始] --> B{条件判断}
|
|
23
|
+
B -->|是| C[执行操作A]
|
|
24
|
+
B -->|否| D[执行操作B]
|
|
25
|
+
C --> E[结束]
|
|
26
|
+
D --> E
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### 1.2 横向流程图
|
|
12
30
|
|
|
13
31
|
```mermaid
|
|
14
|
-
|
|
15
|
-
A[
|
|
16
|
-
B
|
|
17
|
-
B
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
F -->|是| C
|
|
21
|
-
F -->|否| G[显示错误]
|
|
22
|
-
G --> E
|
|
32
|
+
flowchart LR
|
|
33
|
+
A[用户请求] --> B[负载均衡]
|
|
34
|
+
B --> C[服务器A]
|
|
35
|
+
B --> D[服务器B]
|
|
36
|
+
C --> E[(数据库)]
|
|
37
|
+
D --> E
|
|
23
38
|
```
|
|
24
39
|
|
|
25
|
-
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 二、时序图 (Sequence Diagram)
|
|
26
43
|
|
|
27
44
|
```mermaid
|
|
28
45
|
sequenceDiagram
|
|
@@ -39,18 +56,79 @@ sequenceDiagram
|
|
|
39
56
|
前端-->>用户: 跳转到主页
|
|
40
57
|
```
|
|
41
58
|
|
|
42
|
-
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## 三、类图 (Class Diagram)
|
|
43
62
|
|
|
44
63
|
```mermaid
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
64
|
+
classDiagram
|
|
65
|
+
class Animal {
|
|
66
|
+
+String name
|
|
67
|
+
+int age
|
|
68
|
+
+makeSound()
|
|
69
|
+
}
|
|
70
|
+
class Dog {
|
|
71
|
+
+String breed
|
|
72
|
+
+bark()
|
|
73
|
+
}
|
|
74
|
+
class Cat {
|
|
75
|
+
+String color
|
|
76
|
+
+meow()
|
|
77
|
+
}
|
|
78
|
+
Animal <|-- Dog
|
|
79
|
+
Animal <|-- Cat
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## 四、状态图 (State Diagram)
|
|
85
|
+
|
|
86
|
+
```mermaid
|
|
87
|
+
stateDiagram-v2
|
|
88
|
+
[*] --> 待处理
|
|
89
|
+
待处理 --> 处理中: 开始处理
|
|
90
|
+
处理中 --> 已完成: 处理成功
|
|
91
|
+
处理中 --> 已取消: 处理失败
|
|
92
|
+
已完成 --> [*]
|
|
93
|
+
已取消 --> [*]
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## 五、实体关系图 (ER Diagram)
|
|
99
|
+
|
|
100
|
+
```mermaid
|
|
101
|
+
erDiagram
|
|
102
|
+
USER ||--o{ ORDER : places
|
|
103
|
+
USER {
|
|
104
|
+
int id PK
|
|
105
|
+
string username
|
|
106
|
+
string email
|
|
107
|
+
}
|
|
108
|
+
ORDER ||--|{ ORDER_ITEM : contains
|
|
109
|
+
ORDER {
|
|
110
|
+
int id PK
|
|
111
|
+
int user_id FK
|
|
112
|
+
datetime order_date
|
|
113
|
+
string status
|
|
114
|
+
}
|
|
115
|
+
PRODUCT ||--o{ ORDER_ITEM : "included in"
|
|
116
|
+
PRODUCT {
|
|
117
|
+
int id PK
|
|
118
|
+
string name
|
|
119
|
+
float price
|
|
120
|
+
}
|
|
121
|
+
ORDER_ITEM {
|
|
122
|
+
int id PK
|
|
123
|
+
int order_id FK
|
|
124
|
+
int product_id FK
|
|
125
|
+
int quantity
|
|
126
|
+
}
|
|
51
127
|
```
|
|
52
128
|
|
|
53
|
-
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## 六、甘特图 (Gantt Chart)
|
|
54
132
|
|
|
55
133
|
```mermaid
|
|
56
134
|
gantt
|
|
@@ -67,17 +145,96 @@ gantt
|
|
|
67
145
|
上线部署 :c2, after c1, 3d
|
|
68
146
|
```
|
|
69
147
|
|
|
70
|
-
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## 七、饼图 (Pie Chart)
|
|
151
|
+
|
|
152
|
+
```mermaid
|
|
153
|
+
pie showData
|
|
154
|
+
title 编程语言使用占比
|
|
155
|
+
"TypeScript" : 35
|
|
156
|
+
"Python" : 25
|
|
157
|
+
"Go" : 20
|
|
158
|
+
"Rust" : 12
|
|
159
|
+
"Others" : 8
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## 八、Git 图 (Git Graph)
|
|
165
|
+
|
|
166
|
+
```mermaid
|
|
167
|
+
gitGraph
|
|
168
|
+
commit id: "初始化项目"
|
|
169
|
+
commit id: "添加基础功能"
|
|
170
|
+
branch develop
|
|
171
|
+
checkout develop
|
|
172
|
+
commit id: "开发中"
|
|
173
|
+
commit id: "新功能A"
|
|
174
|
+
checkout main
|
|
175
|
+
merge develop id: "v1.0 发布" tag: "v1.0"
|
|
176
|
+
commit id: "后续优化"
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## 九、用户旅程图 (User Journey)
|
|
71
182
|
|
|
72
183
|
```mermaid
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
184
|
+
journey
|
|
185
|
+
title 用户购物体验旅程
|
|
186
|
+
section 浏览商品
|
|
187
|
+
打开首页: 5: 用户
|
|
188
|
+
搜索商品: 4: 用户
|
|
189
|
+
section 购买流程
|
|
190
|
+
加入购物车: 4: 用户
|
|
191
|
+
结算付款: 3: 用户, 系统
|
|
192
|
+
section 收货评价
|
|
193
|
+
确认收货: 5: 用户
|
|
194
|
+
评价商品: 4: 用户
|
|
81
195
|
```
|
|
82
196
|
|
|
83
|
-
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## 十、思维导图 (Mindmap)
|
|
200
|
+
|
|
201
|
+
```mermaid
|
|
202
|
+
mindmap
|
|
203
|
+
root((Web开发))
|
|
204
|
+
前端
|
|
205
|
+
HTML/CSS
|
|
206
|
+
JavaScript
|
|
207
|
+
TypeScript
|
|
208
|
+
框架
|
|
209
|
+
Vue
|
|
210
|
+
React
|
|
211
|
+
后端
|
|
212
|
+
Node.js
|
|
213
|
+
Python
|
|
214
|
+
Go
|
|
215
|
+
数据库
|
|
216
|
+
MySQL
|
|
217
|
+
MongoDB
|
|
218
|
+
Redis
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## 十一、样式定制
|
|
224
|
+
|
|
225
|
+
```mermaid
|
|
226
|
+
flowchart TD
|
|
227
|
+
A[开始] --> B[处理]
|
|
228
|
+
B --> C[结束]
|
|
229
|
+
|
|
230
|
+
style A fill:#f9f,stroke:#333,stroke-width:2px
|
|
231
|
+
style B fill:#bbf,stroke:#333,stroke-width:2px
|
|
232
|
+
style C fill:#bfb,stroke:#333,stroke-width:2px
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## 参考资料
|
|
238
|
+
|
|
239
|
+
- [Mermaid 官方文档](https://mermaid.js.org/)
|
|
240
|
+
- [Mermaid Live Editor](https://mermaid.live/)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "系列文章示例 - 第一部分"
|
|
3
|
+
description: "这是系列文章的第一篇,演示文章系列导航功能"
|
|
4
|
+
pubDatetime: 2024-01-07T00:00:00.000Z
|
|
5
|
+
author: "Your Name"
|
|
6
|
+
tags:
|
|
7
|
+
- 教程
|
|
8
|
+
- 系列
|
|
9
|
+
category: 教程/示例
|
|
10
|
+
series:
|
|
11
|
+
name: 系列文章示例
|
|
12
|
+
order: 1
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 系列文章说明
|
|
16
|
+
|
|
17
|
+
astro-minimax 支持**文章系列**功能,可以自动在文章底部显示系列导航,包括当前进度、上一篇和下一篇链接。
|
|
18
|
+
|
|
19
|
+
### 系列配置
|
|
20
|
+
|
|
21
|
+
在 frontmatter 中添加 `series` 字段:
|
|
22
|
+
|
|
23
|
+
```yaml
|
|
24
|
+
---
|
|
25
|
+
title: "文章标题"
|
|
26
|
+
series:
|
|
27
|
+
name: "系列名称"
|
|
28
|
+
order: 1 # 文章在系列中的顺序
|
|
29
|
+
---
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### 功能特性
|
|
33
|
+
|
|
34
|
+
- 自动显示系列进度条
|
|
35
|
+
- 显示当前文章在系列中的位置
|
|
36
|
+
- 自动生成上一篇/下一篇导航链接
|
|
37
|
+
- 系列页面聚合所有系列文章
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
> **下一篇**: [系列文章示例 - 第二部分](/zh/posts/series-example-02)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "系列文章示例 - 第二部分"
|
|
3
|
+
description: "这是系列文章的第二篇,继续演示文章系列导航功能"
|
|
4
|
+
pubDatetime: 2024-01-08T00:00:00.000Z
|
|
5
|
+
author: "Your Name"
|
|
6
|
+
tags:
|
|
7
|
+
- 教程
|
|
8
|
+
- 系列
|
|
9
|
+
category: 教程/示例
|
|
10
|
+
series:
|
|
11
|
+
name: 系列文章示例
|
|
12
|
+
order: 2
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 系列文章进阶
|
|
16
|
+
|
|
17
|
+
这是系列文章的第二部分。当读者阅读时,可以在文章底部看到:
|
|
18
|
+
|
|
19
|
+
- 系列进度(如 2/2)
|
|
20
|
+
- 上一篇文章的链接
|
|
21
|
+
- 系列概览
|
|
22
|
+
|
|
23
|
+
### 适用场景
|
|
24
|
+
|
|
25
|
+
文章系列功能特别适合:
|
|
26
|
+
|
|
27
|
+
- 多章节教程
|
|
28
|
+
- 主题系列文章
|
|
29
|
+
- 渐进式学习路径
|
|
30
|
+
- 项目开发记录
|
|
31
|
+
|
|
32
|
+
### 最佳实践
|
|
33
|
+
|
|
34
|
+
1. **统一命名**:系列内文章标题使用一致的命名模式
|
|
35
|
+
2. **合理分篇**:每篇文章聚焦一个主题
|
|
36
|
+
3. **相互引用**:在文中适当引用其他篇章
|
|
37
|
+
4. **完整性**:确保系列文章形成完整的知识体系
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
> **上一篇**: [系列文章示例 - 第一部分](/zh/posts/series-example-01)
|