Compare commits

..

No commits in common. "121c28773dfc8cfa3c5e63f502c253d1c343e230" and "3f61dd2bf6aba5dc3ff4a8335e9e63a4937ed359" have entirely different histories.

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

View File

@ -106,25 +106,25 @@ export default defineConfig({
label: 'Tutorials',
translations: { 'vi-VN': 'Hướng dẫn nhập môn', 'zh-CN': '教程', 'fr-FR': 'Tutoriels', 'cs-CZ': 'Tutoriály' },
collapsed: false,
items: [{ autogenerate: { directory: 'tutorials' } }],
autogenerate: { directory: 'tutorials' },
},
{
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' },
collapsed: true,
items: [{ autogenerate: { directory: 'how-to' } }],
autogenerate: { directory: 'how-to' },
},
{
label: 'Explanation',
translations: { 'vi-VN': 'Giải thích', 'zh-CN': '概念说明', 'fr-FR': 'Explications', 'cs-CZ': 'Vysvětlení' },
collapsed: true,
items: [{ autogenerate: { directory: 'explanation' } }],
autogenerate: { directory: 'explanation' },
},
{
label: 'Reference',
translations: { 'vi-VN': 'Tham chiếu', 'zh-CN': '参考', 'fr-FR': 'Référence', 'cs-CZ': 'Reference' },
collapsed: true,
items: [{ autogenerate: { directory: 'reference' } }],
autogenerate: { directory: 'reference' },
},
// 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 { getEntry, render } from 'astro:content';
import { getEntry } from 'astro:content';
import { translatedLocales } from '../lib/locales.mjs';
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 }}>