diff --git a/scripts/check-developer-center-language.js b/scripts/check-developer-center-language.js index 402dde6..b7cf2ef 100644 --- a/scripts/check-developer-center-language.js +++ b/scripts/check-developer-center-language.js @@ -254,7 +254,7 @@ assert.equal(shellConfig.activeSectionForPath('/software/ja/getting-started/'), assert.equal(shellConfig.withSiteRoot('/ja/hardware', '/docs/'), '/docs/ja/hardware'); const rootedNavbarItems = shellConfig.navbarItems('/docs/'); assert.equal(rootedNavbarItems.find((item) => item.key === 'hardware').href, '/docs/hardware'); -assert.equal(rootedNavbarItems.find((item) => item.key === 'models').href, 'https://huggingface.co/simaai'); +assert.equal(rootedNavbarItems.find((item) => item.key === 'models').href, '/docs/models/'); assert.equal(shellConfig.deploymentSiteRoot('/zh-Hant/', 'zh-Hant'), '/'); assert.equal(shellConfig.deploymentSiteRoot('/docs/zh-Hant/', 'zh-Hant'), '/docs/'); assert.equal(shellConfig.deploymentSiteRoot('/docs/', 'en'), '/docs/'); diff --git a/src/developerCenter/shell/README.md b/src/developerCenter/shell/README.md index 3124f74..5b5391d 100644 --- a/src/developerCenter/shell/README.md +++ b/src/developerCenter/shell/README.md @@ -6,8 +6,7 @@ This directory owns the shared Developer Center behavior for the canonical The shell defines: - canonical section routes for Hardware, Software, and Examples -- Models links to `/models/` in staging and Hugging Face in other environments, - using the generated `developer-center-runtime.json` environment +- the Models link to the Model Browser at `/models/` - external destination for Community - common theme persistence keys and cookie behavior - global documentation-language persistence and localized section routes diff --git a/src/developerCenter/shell/config.cjs b/src/developerCenter/shell/config.cjs index 5899497..9a1f099 100644 --- a/src/developerCenter/shell/config.cjs +++ b/src/developerCenter/shell/config.cjs @@ -1,6 +1,3 @@ -const runtimeConfig = require('../../../static/developer-center-runtime.json'); -const stagingModels = ['stg', 'staging'].includes(runtimeConfig.environment); - const SECTION_ROUTES = { home: '/', hardware: '/hardware', @@ -8,8 +5,9 @@ const SECTION_ROUTES = { examples: '/examples/', }; +const MODEL_BROWSER_ROUTE = '/models/'; + const EXTERNAL_ROUTES = { - models: 'https://huggingface.co/simaai', community: 'https://community.sima.ai', }; @@ -233,9 +231,8 @@ const navigationItems = [ { key: 'models', label: 'Models', - href: stagingModels ? '/models/' : EXTERNAL_ROUTES.models, + href: MODEL_BROWSER_ROUTE, tone: 'black', - external: !stagingModels, }, { key: 'examples', diff --git a/static/developer-center-shell.js b/static/developer-center-shell.js index 50ddd6f..45f5591 100644 --- a/static/developer-center-shell.js +++ b/static/developer-center-shell.js @@ -4,7 +4,7 @@ {key: 'quickstart', label: 'Quick Start Guide', href: '/tools/qsg/index.html', external: true}, {key: 'hardware', label: 'Hardware', href: '/hardware', external: false}, {key: 'software', label: 'Software', href: '/software', external: false}, - {key: 'models', label: 'Models', href: 'https://huggingface.co/simaai', external: true}, + {key: 'models', label: 'Models', href: '/models/', external: false}, {key: 'examples', label: 'Examples', href: '/examples/', external: false}, {key: 'community', label: 'Community', href: 'https://community.sima.ai', external: true}, ], @@ -971,11 +971,6 @@ return { ...base, - navItems: base.navItems.map((item) => ( - item.key === 'models' && ['stg', 'staging'].includes(runtimeConfig.environment) - ? {...item, href: '/models/', external: false} - : item - )), search: runtimeConfig.search || base.search || null, }; } diff --git a/static/developer-center-shell.json b/static/developer-center-shell.json index e13dadd..e40df76 100644 --- a/static/developer-center-shell.json +++ b/static/developer-center-shell.json @@ -32,8 +32,8 @@ { "key": "models", "label": "Models", - "href": "https://huggingface.co/simaai", - "external": true + "href": "/models/", + "external": false }, { "key": "examples",