Compare commits

..

1 Commits

Author SHA1 Message Date
Loic Duong d9504a7185
Merge 3f61dd2bf6 into e600181ab8 2026-06-21 21:41:38 +07:00
6 changed files with 1431 additions and 763 deletions

2155
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -66,12 +66,6 @@
"markdownlint-cli2" "markdownlint-cli2"
] ]
}, },
"overrides": {
"esbuild": "^0.28.1",
"markdownlint-cli2": {
"markdown-it": "^14.2.0"
}
},
"dependencies": { "dependencies": {
"@clack/core": "^1.3.1", "@clack/core": "^1.3.1",
"@clack/prompts": "^1.4.0", "@clack/prompts": "^1.4.0",
@ -88,10 +82,10 @@
"yaml": "^2.7.0" "yaml": "^2.7.0"
}, },
"devDependencies": { "devDependencies": {
"@astrojs/sitemap": "^3.7.3", "@astrojs/sitemap": "^3.6.0",
"@astrojs/starlight": "^0.40.0", "@astrojs/starlight": "^0.37.5",
"@eslint/js": "^9.33.0", "@eslint/js": "^9.33.0",
"astro": "^6.4.6", "astro": "^5.16.0",
"c8": "^10.1.3", "c8": "^10.1.3",
"eslint": "^9.33.0", "eslint": "^9.33.0",
"eslint-config-prettier": "^10.1.8", "eslint-config-prettier": "^10.1.8",

View File

@ -106,25 +106,25 @@ export default defineConfig({
label: 'Tutorials', label: 'Tutorials',
translations: { 'vi-VN': 'Hướng dẫn nhập môn', 'zh-CN': '教程', 'fr-FR': 'Tutoriels', 'cs-CZ': 'Tutoriály' }, translations: { 'vi-VN': 'Hướng dẫn nhập môn', 'zh-CN': '教程', 'fr-FR': 'Tutoriels', 'cs-CZ': 'Tutoriály' },
collapsed: false, collapsed: false,
items: [{ autogenerate: { directory: 'tutorials' } }], autogenerate: { directory: 'tutorials' },
}, },
{ {
label: 'How-To Guides', label: 'How-To Guides',
translations: { 'vi-VN': 'Hướng dẫn tác vụ', 'zh-CN': '操作指南', 'fr-FR': 'Guides pratiques', 'cs-CZ': 'Praktické návody' }, translations: { 'vi-VN': 'Hướng dẫn tác vụ', 'zh-CN': '操作指南', 'fr-FR': 'Guides pratiques', 'cs-CZ': 'Praktické návody' },
collapsed: true, collapsed: true,
items: [{ autogenerate: { directory: 'how-to' } }], autogenerate: { directory: 'how-to' },
}, },
{ {
label: 'Explanation', label: 'Explanation',
translations: { 'vi-VN': 'Giải thích', 'zh-CN': '概念说明', 'fr-FR': 'Explications', 'cs-CZ': 'Vysvětlení' }, translations: { 'vi-VN': 'Giải thích', 'zh-CN': '概念说明', 'fr-FR': 'Explications', 'cs-CZ': 'Vysvětlení' },
collapsed: true, collapsed: true,
items: [{ autogenerate: { directory: 'explanation' } }], autogenerate: { directory: 'explanation' },
}, },
{ {
label: 'Reference', label: 'Reference',
translations: { 'vi-VN': 'Tham chiếu', 'zh-CN': '参考', 'fr-FR': 'Référence', 'cs-CZ': 'Reference' }, translations: { 'vi-VN': 'Tham chiếu', 'zh-CN': '参考', 'fr-FR': 'Référence', 'cs-CZ': 'Reference' },
collapsed: true, collapsed: true,
items: [{ autogenerate: { directory: 'reference' } }], autogenerate: { directory: 'reference' },
}, },
// TEA docs moved to standalone module site; keep BMM sidebar focused. // TEA docs moved to standalone module site; keep BMM sidebar focused.
{ {

View File

@ -1,8 +0,0 @@
import { defineCollection } from 'astro:content';
import { docsLoader, i18nLoader } from '@astrojs/starlight/loaders';
import { docsSchema, i18nSchema } from '@astrojs/starlight/schema';
export const collections = {
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
i18n: defineCollection({ loader: i18nLoader(), schema: i18nSchema() }),
};

View File

@ -0,0 +1,7 @@
import { defineCollection } from 'astro:content';
import { docsSchema, i18nSchema } from '@astrojs/starlight/schema';
export const collections = {
docs: defineCollection({ schema: docsSchema() }),
i18n: defineCollection({ type: 'data', schema: i18nSchema() }),
};

View File

@ -1,10 +1,10 @@
--- ---
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro'; import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
import { getEntry, render } from 'astro:content'; import { getEntry } from 'astro:content';
import { translatedLocales } from '../lib/locales.mjs'; import { translatedLocales } from '../lib/locales.mjs';
const entry = await getEntry('docs', '404'); const entry = await getEntry('docs', '404');
const { Content } = await render(entry); const { Content } = await entry.render();
--- ---
<StarlightPage frontmatter={{ title: entry.data.title, template: entry.data.template }}> <StarlightPage frontmatter={{ title: entry.data.title, template: entry.data.template }}>