Skip to content

Commit 673eee8

Browse files
authored
Fix website mobile menu locale preview (#339)
1 parent 7df3adb commit 673eee8

3 files changed

Lines changed: 19 additions & 5 deletions

File tree

website/README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,23 @@ yarn
1111
## Local Development
1212

1313
```bash
14-
yarn start
14+
npm run dev
1515
```
1616

17-
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
17+
This command starts the Docusaurus hot-reload development server for one locale.
18+
19+
To preview language switching locally, use:
20+
21+
```bash
22+
npm run start
23+
```
24+
25+
`npm run start` builds all locales and serves the production build, so the locale dropdown routes (`/es`, `/zh-CN`) resolve the same way they do on the deployed site.
1826

1927
## Build
2028

2129
```bash
22-
yarn build
30+
npm run build
2331
```
2432

2533
This command generates static content into the `build` directory and can be served using any static contents hosting service.

website/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
"sync:docs": "tsx scripts/sync-docs-i18n.ts",
88
"generate:llms": "tsx scripts/gen-llms-full.ts",
99
"migrate:blog": "tsx scripts/migrate-blog.ts",
10-
"prestart": "npm run sync:docs && npm run generate:llms",
11-
"start": "docusaurus start",
10+
"predev": "npm run sync:docs && npm run generate:llms",
11+
"dev": "docusaurus start",
12+
"prestart": "npm run build",
13+
"start": "docusaurus serve",
1214
"prebuild": "npm run sync:docs && npm run generate:llms",
1315
"build": "docusaurus build",
1416
"swizzle": "docusaurus swizzle",

website/src/css/custom.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,10 @@ div[class*='codeBlockContainer'] .token.punctuation {
557557
}
558558

559559
@media (max-width: 996px) {
560+
.navbar {
561+
backdrop-filter: none;
562+
}
563+
560564
.navbar-sidebar {
561565
background: var(--paper);
562566
}

0 commit comments

Comments
 (0)