diff --git a/docs/viz/9-message-schemas/circle-annotation.md b/docs/viz/9-message-schemas/circle-annotation.md index 632d3400..f5745cb3 100644 --- a/docs/viz/9-message-schemas/circle-annotation.md +++ b/docs/viz/9-message-schemas/circle-annotation.md @@ -9,7 +9,7 @@ title: CircleAnnotation ## 父级架构 -`CircleAnnotation` 出现在 [`ImageAnnotations`](/image-annotations) 消息模式中。 +`CircleAnnotation` 出现在 [`ImageAnnotations`](../message-schemas/image-annotations) 消息模式中。 ## 字段定义 diff --git a/docusaurus.config.js b/docusaurus.config.js index 4186f5a8..8c0acbe5 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -6,6 +6,11 @@ import { themes } from 'prism-react-renderer'; +const defaultExclude = ['**/_*.{js,jsx,ts,tsx,md,mdx}', '**/_*/**', '**/*.test.{js,jsx,ts,tsx}', '**/__tests__/**']; + +// some docs are not translated, so we need to exclude them in en +const excludeInEn = ['**/viz/8-extensions/**', '**/viz/9-message-schemas/**']; + /** @type {import('@docusaurus/types').Config} */ const config = { title: 'coScene', @@ -60,6 +65,8 @@ const config = { // editUrl: 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/', showLastUpdateAuthor: true, showLastUpdateTime: true, + exclude: + process.env.DOCUSAURUS_CURRENT_LOCALE === 'en' ? [...defaultExclude, ...excludeInEn] : defaultExclude, }, blog: false, // blog: { diff --git a/i18n/en/code.json b/i18n/en/code.json index 6a8f297a..60fa2fe4 100644 --- a/i18n/en/code.json +++ b/i18n/en/code.json @@ -503,9 +503,6 @@ "home.catalogue.frame-rate-optimization": { "message": "Frame Rate Optimization" }, - "home.catalogue.extensions": { - "message": "Extensions" - }, "home.catalogue.options": { "message": "Visualization Options" }, @@ -602,4 +599,4 @@ "home.catalogue.apt-source-install": { "message": "Installing coScene Software via APT" } -} \ No newline at end of file +} diff --git a/src/components/homeCatalogue/catalogue.ts b/src/components/homeCatalogue/catalogue.ts index 488bd1bb..c6c49ef6 100644 --- a/src/components/homeCatalogue/catalogue.ts +++ b/src/components/homeCatalogue/catalogue.ts @@ -52,11 +52,13 @@ export const CATALOGUE = [ docLink: '/viz/frame-rate-optimization', title: translate({ id: 'home.catalogue.frame-rate-optimization', message: '帧率优化选项' }), }, - { docLink: '/category/extensions', title: translate({ id: 'home.catalogue.extensions', message: '插件' }) }, - { - docLink: '/viz/message-schemas', - title: translate({ id: 'home.catalogue.message-schemas', message: '消息架构' }), - }, + ...(typeof process !== 'undefined' && process.env.DOCUSAURUS_CURRENT_LOCALE === 'zh' ? [ + { docLink: '/category/extensions', title: translate({ id: 'home.catalogue.extensions', message: '插件' }) }, + { + docLink: '/viz/message-schemas', + title: translate({ id: 'home.catalogue.message-schemas', message: '消息架构' }), + }, + ] : []), ], }, {