Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/check-developer-center-language.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/');
Expand Down
3 changes: 1 addition & 2 deletions src/developerCenter/shell/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 3 additions & 6 deletions src/developerCenter/shell/config.cjs
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
const runtimeConfig = require('../../../static/developer-center-runtime.json');
const stagingModels = ['stg', 'staging'].includes(runtimeConfig.environment);

const SECTION_ROUTES = {
home: '/',
hardware: '/hardware',
software: '/software',
examples: '/examples/',
};

const MODEL_BROWSER_ROUTE = '/models/';

const EXTERNAL_ROUTES = {
models: 'https://huggingface.co/simaai',
community: 'https://community.sima.ai',
};

Expand Down Expand Up @@ -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',
Expand Down
7 changes: 1 addition & 6 deletions static/developer-center-shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -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},
],
Expand Down Expand Up @@ -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,
};
}
Expand Down
4 changes: 2 additions & 2 deletions static/developer-center-shell.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
{
"key": "models",
"label": "Models",
"href": "https://huggingface.co/simaai",
"external": true
"href": "/models/",
"external": false
},
{
"key": "examples",
Expand Down
Loading