Skip to content

Commit e9b58b0

Browse files
authored
Merge pull request #1939 from milvus-io/preview
Preview
2 parents 589d3ac + f9c2c67 commit e9b58b0

File tree

22 files changed

+391
-70
lines changed

22 files changed

+391
-70
lines changed

Diff for: documents/new-version-docs.md

+4-15
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
# Add a New Version Documents
22

3-
`NEW_VERSION`: The version that you want to add eg: `v2.6.x`
4-
`CURRENT_VERSION`: Current latest version eg: `v2.5.x`
5-
`PREV_VERSION`: The previous version eg: `v2.4.x`
3+
> **_NOTE:_**
4+
If milvus releases v2.6.x, you should create the document version v2.5.x, because the latest version of document routing does not have version numbers.
65

7-
if you want to add a new version documents eg: `v2.6.x`
6+
- Run `pnpm run generate:docs`
7+
- Input docs version. Example: `v2.6.x`
88

9-
Please refer to the following steps:
109

11-
- Make sure that the corresponding version of the directory is already in the `web-content`
12-
13-
- Generate the English documentation in the `localization` directory
14-
- Copy the generated 'en' directory to 'zh', 'ja', 'ko', 'fr', 'de', 'it', 'pt', 'es', and the other 8 languages
15-
16-
- milvus.io/src/pages/docs
17-
- Copy an existing version directory `PREV_VERSION` to `CURRENT_VERSION`. eg: copy v2.4.x v2.5.x
18-
- Modify the `createDocHomeProps` method's version parameters in the files within the `CURRENT_VERSION` directory.
19-
- Create a `CURRENT_VERSION` directory in the zh, ja, ko, fr, de, it, pt, and es directories. Copy from the existing directory and update the version parameters in `createDocHomeProps`.
20-
- Update `SHOW_LANGUAGE_SELECTOR_VERSIONS` param in `src/components/localization/const`, Control which versions display language selectors

Diff for: i18n-watcher/cache/demo.json

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"title": "Milvus makes it easy to add similarity search to your applications.",
3-
"desc": "Store, index, and manage massive embedding vectors generated by deep neural networks and other machine learning (ML) models.",
2+
"title": "Milvus Demo Hub: Explore AI-Powered Vector Search in Action",
3+
"desc": "Curious about vector search? Try these hands-on demos to see how Milvus powers AI-driven image search, multimodal retrieval, RAG (Retrieval-Augmented Generation), and chemical structure search.",
44
"demos": {
55
"multimodal": {
66
"title": "Multimodal Image Search",
@@ -35,5 +35,9 @@
3535
"waiting": "Before you go..."
3636
},
3737
"tryDemo": "Try Demo",
38-
"watchDemo": "Watch Demo"
38+
"watchDemo": "Watch Demo",
39+
"meta": {
40+
"title": "Milvus Demo Hub: Explore AI-Powered Vector Search in Action",
41+
"desc": "Try these hands-on demos to see how Milvus powers AI-driven image search, multimodal retrieval, RAG, and chemical structure search."
42+
}
3943
}

Diff for: i18n-watcher/cache/faq.json

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"title": "AI Quick Reference",
3+
"desc": "Looking for fast answers or a quick refresher on AI-related topics? The AI Quick Reference has everything you need—straightforward explanations, practical solutions, and insights on the latest trends like LLMs, vector databases, RAG, and more to supercharge your AI projects!",
4+
"search": "Search",
5+
"detail": {
6+
"home": "Home",
7+
"name": "AI Reference",
8+
"readMore": "Read More",
9+
"keepReading": "Keep Reading",
10+
"recommend": "Recommended Tech Blogs & Tutorials",
11+
"allBlog": "Check all the blog posts →",
12+
"adv": {
13+
"title": "Need a VectorDB for Your GenAI Apps?",
14+
"content": "Zilliz Cloud is a managed vector database built on Milvus perfect for building GenAI applications.",
15+
"ctaLabel": "Try Free"
16+
}
17+
},
18+
"noData": "No search result: {{keyword}}"
19+
}

Diff for: i18n-watcher/cache/header.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,20 @@
2222
"deepSearcher": "Deep Searcher"
2323
},
2424
"blog": "Blog",
25-
"community": "Community",
25+
"community": {
26+
"label": "Community",
27+
"discord": "Discord",
28+
"github": "GitHub",
29+
"more": "More Channels"
30+
},
2631
"start": "Try Managed Milvus",
2732
"star": "Star",
2833
"contact": "Contact Us",
2934
"footer": {
3035
"resource": {
3136
"managed": "Managed Milvus",
32-
"contact": "Contact Us"
37+
"contact": "Contact Us",
38+
"faq": "AI Quick Reference "
3339
},
3440
"tools": {
3541
"sizing": "Milvus Sizing Tool",

Diff for: package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"prepare": "husky",
1313
"i18n:watch": "node i18n-watcher/index.js",
1414
"i18n:scan": "node i18n-watcher/scan.js",
15-
"i18n:sync": "NODE_ENV=development node i18n-watcher/translate-changes.js"
15+
"i18n:sync": "NODE_ENV=development node i18n-watcher/translate-changes.js",
16+
"generate:docs": "node scripts/generate-docs.js"
1617
},
1718
"dependencies": {
1819
"@docsearch/css": "^3.6.0",

Diff for: scripts/generate-docs.js

+225
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
const fs = require('fs');
2+
const path = require('path');
3+
const readline = require('readline');
4+
5+
const rl = readline.createInterface({
6+
input: process.stdin,
7+
output: process.stdout,
8+
});
9+
10+
const getIndexTemplate = (
11+
version,
12+
lang
13+
) => `import { LanguageEnum } from '@/types/localization';
14+
import { createDocHomeProps } from '@/components/localization/CreateDocHomeProps';
15+
import { DocHomepage } from '@/components/localization/DocHome';
16+
17+
export default DocHomepage;
18+
19+
export const getStaticProps = async () => {
20+
const getPageStaticProps = createDocHomeProps(${lang}, '${version}');
21+
return getPageStaticProps();
22+
};
23+
`;
24+
25+
const getDetailTemplate = (
26+
version,
27+
lang
28+
) => `import { GetStaticProps } from 'next';
29+
import { LanguageEnum } from '@/types/localization';
30+
import { DocDetailPage } from '@/components/localization/DocDetail';
31+
import { createDocDetailProps } from '@/components/localization/CreateDocDetailProps';
32+
33+
export default DocDetailPage;
34+
35+
export const getStaticPaths = () => {
36+
const { getPageStaticPaths } = createDocDetailProps(
37+
${lang},
38+
'${version}'
39+
);
40+
return getPageStaticPaths();
41+
};
42+
43+
export const getStaticProps: GetStaticProps = async context => {
44+
const { getPageStaticProps } = createDocDetailProps(
45+
${lang},
46+
'${version}'
47+
);
48+
return getPageStaticProps(context);
49+
};
50+
`;
51+
52+
async function generateDocs() {
53+
try {
54+
// input docs version
55+
const version = await new Promise(resolve => {
56+
rl.question('Please input new docs version: ', answer => {
57+
resolve(answer.trim());
58+
});
59+
});
60+
61+
if (!version) {
62+
throw new Error('Version cannot be empty!');
63+
}
64+
65+
const docsDir = path.join(process.cwd(), 'src', 'pages', 'docs', version);
66+
const arDocsDir = path.join(
67+
process.cwd(),
68+
'src',
69+
'pages',
70+
'docs',
71+
'ar',
72+
version
73+
);
74+
const deDocsDir = path.join(
75+
process.cwd(),
76+
'src',
77+
'pages',
78+
'docs',
79+
'de',
80+
version
81+
);
82+
const esDocsDir = path.join(
83+
process.cwd(),
84+
'src',
85+
'pages',
86+
'docs',
87+
'es',
88+
version
89+
);
90+
const frDocsDir = path.join(
91+
process.cwd(),
92+
'src',
93+
'pages',
94+
'docs',
95+
'fr',
96+
version
97+
);
98+
const idDocsDir = path.join(
99+
process.cwd(),
100+
'src',
101+
'pages',
102+
'docs',
103+
'id',
104+
version
105+
);
106+
const itDocsDir = path.join(
107+
process.cwd(),
108+
'src',
109+
'pages',
110+
'docs',
111+
'it',
112+
version
113+
);
114+
const jaDocsDir = path.join(
115+
process.cwd(),
116+
'src',
117+
'pages',
118+
'docs',
119+
'ja',
120+
version
121+
);
122+
const koDocsDir = path.join(
123+
process.cwd(),
124+
'src',
125+
'pages',
126+
'docs',
127+
'ko',
128+
version
129+
);
130+
const ptDocsDir = path.join(
131+
process.cwd(),
132+
'src',
133+
'pages',
134+
'docs',
135+
'pt',
136+
version
137+
);
138+
const ruDocsDir = path.join(
139+
process.cwd(),
140+
'src',
141+
'pages',
142+
'docs',
143+
'ru',
144+
version
145+
);
146+
const zhDocsDir = path.join(
147+
process.cwd(),
148+
'src',
149+
'pages',
150+
'docs',
151+
'zh',
152+
version
153+
);
154+
const zhHantDocsDir = path.join(
155+
process.cwd(),
156+
'src',
157+
'pages',
158+
'docs',
159+
'zh-hant',
160+
version
161+
);
162+
163+
const dirs = [
164+
docsDir,
165+
arDocsDir,
166+
deDocsDir,
167+
esDocsDir,
168+
frDocsDir,
169+
idDocsDir,
170+
itDocsDir,
171+
jaDocsDir,
172+
koDocsDir,
173+
ptDocsDir,
174+
ruDocsDir,
175+
zhDocsDir,
176+
zhHantDocsDir,
177+
];
178+
179+
const langs = [
180+
'LanguageEnum.ENGLISH',
181+
'LanguageEnum.ARABIC',
182+
'LanguageEnum.GERMAN',
183+
'LanguageEnum.SPANISH',
184+
'LanguageEnum.FRANCE',
185+
'LanguageEnum.INDONESIAN',
186+
'LanguageEnum.ITALIAN',
187+
'LanguageEnum.JAPANESE',
188+
'LanguageEnum.KOREAN',
189+
'LanguageEnum.PORTUGUESE',
190+
'LanguageEnum.RUSSIAN',
191+
'LanguageEnum.CHINESE',
192+
'LanguageEnum.CHINESE_TW',
193+
];
194+
195+
for (let i = 0; i < dirs.length; i++) {
196+
const dir = dirs[i];
197+
const lang = langs[i];
198+
199+
if (fs.existsSync(dir)) {
200+
throw new Error(
201+
`Lang: ${lang}, version: ${version}: docs already exists!`
202+
);
203+
}
204+
205+
// Create dir
206+
fs.mkdirSync(dir, { recursive: true });
207+
// Create index.tsx
208+
const indexTemplate = getIndexTemplate(version, lang);
209+
fs.writeFileSync(path.join(dir, 'index.tsx'), indexTemplate);
210+
// Create [id].tsx
211+
const detailTemplate = getDetailTemplate(version, lang);
212+
fs.writeFileSync(path.join(dir, '[id].tsx'), detailTemplate);
213+
}
214+
215+
console.log(
216+
`Successfully created the document directory and files for version ${version}!`
217+
);
218+
} catch (error) {
219+
console.error('Error:', error.message);
220+
} finally {
221+
rl.close();
222+
}
223+
}
224+
225+
generateDocs();

Diff for: src/docs

Submodule docs updated 12847 files

Diff for: src/i18n/ar/demo.json

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"title": "Milvus يجعل من السهل إضافة البحث عن التشابه إلى تطبيقاتك.",
3-
"desc": "تخزين وفهرسة وإدارة متجهات التضمين الضخمة التي تم إنشاؤها بواسطة الشبكات العصبية العميقة ونماذج التعلم الآلي الأخرى (ML).",
2+
"title": "مركز ميلفوس التجريبي: استكشف البحث المتجه المدعوم بالذكاء الاصطناعي أثناء العمل",
3+
"desc": "هل لديك فضول حول البحث المتجه؟ جرّب هذه العروض التوضيحية العملية لترى كيف يقوم ميلفوس بتشغيل البحث عن الصور القائم على الذكاء الاصطناعي، والاسترجاع متعدد الوسائط، و RAG (الاسترجاع المعزز)، والبحث عن التركيب الكيميائي.",
44
"demos": {
55
"multimodal": {
66
"title": "البحث عن صور متعددة الوسائط",
@@ -35,5 +35,9 @@
3535
"waiting": "قبل أن تذهب..."
3636
},
3737
"tryDemo": "جرب العرض التوضيحي",
38-
"watchDemo": "شاهد العرض التوضيحي"
38+
"watchDemo": "شاهد العرض التوضيحي",
39+
"meta": {
40+
"title": "مركز ميلفوس التجريبي: استكشف البحث المتجه المدعوم بالذكاء الاصطناعي أثناء العمل",
41+
"desc": "جرّب هذه العروض التوضيحية العملية لترى كيف تقوم شركة Milvus بتشغيل البحث عن الصور القائم على الذكاء الاصطناعي والاسترجاع متعدد الوسائط و RAG والبحث عن التركيب الكيميائي."
42+
}
3943
}

Diff for: src/i18n/cn/demo.json

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"title": "Milvus 使添加相似性搜索到您的应用程序变得容易。",
3-
"desc": "存储、索引和管理由深度神经网络和其他机器学习(ML)模型生成的大量嵌入向量",
2+
"title": "Milvus 演示中心:探索人工智能矢量搜索的实际应用",
3+
"desc": "对矢量搜索感到好奇?试试这些实践演示,了解 Milvus 如何为人工智能驱动的图像搜索、多模态检索、RAG(检索增强生成)和化学结构搜索提供支持",
44
"demos": {
55
"multimodal": {
66
"title": "多模态图像搜索",
@@ -35,5 +35,9 @@
3535
"waiting": "在您离开之前..."
3636
},
3737
"tryDemo": "试用演示",
38-
"watchDemo": "观看演示"
38+
"watchDemo": "观看演示",
39+
"meta": {
40+
"title": "Milvus 演示中心:探索人工智能矢量搜索的实际应用",
41+
"desc": "尝试这些实际操作演示,了解 Milvus 如何为人工智能驱动的图像搜索、多模态检索、RAG 和化学结构搜索提供支持。"
42+
}
3943
}

Diff for: src/i18n/de/demo.json

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"title": "Milvus macht es einfach, Ähnlichkeitssuche zu Ihren Anwendungen hinzuzufügen.",
3-
"desc": "Speichern, indizieren und verwalten Sie massive Embedding-Vektoren, die von tiefen neuronalen Netzwerken und anderen Machine-Learning (ML)-Modellen generiert werden.",
2+
"title": "Milvus Demo Hub: Erleben Sie AI-gestützte Vektorsuche in Aktion",
3+
"desc": "Neugierig auf die Vektorsuche? Probieren Sie diese praktischen Demos aus, um zu sehen, wie Milvus die KI-gesteuerte Bildsuche, das multimodale Retrieval, RAG (Retrieval-Augmented Generation) und die Suche nach chemischen Strukturen unterstützt.",
44
"demos": {
55
"multimodal": {
66
"title": "Multimodale Bildersuche",
@@ -35,5 +35,9 @@
3535
"waiting": "Bevor Sie gehen..."
3636
},
3737
"tryDemo": "Demo ausprobieren",
38-
"watchDemo": "Demo ansehen"
38+
"watchDemo": "Demo ansehen",
39+
"meta": {
40+
"title": "Milvus Demo Hub: Erleben Sie AI-gestützte Vektorsuche in Aktion",
41+
"desc": "Probieren Sie diese praktischen Demos aus, um zu sehen, wie Milvus die KI-gesteuerte Bildsuche, das multimodale Retrieval, RAG und die Suche nach chemischen Strukturen unterstützt."
42+
}
3943
}

0 commit comments

Comments
 (0)