mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-10-03 18:23:51 +08:00
feat(docs): enhance documentation site with internationalization and layout updates
- Updated the demo API to support locale-based content rendering. - Refactored the main layout to accommodate language-specific metadata and routing. - Introduced new components for blog and documentation pages, ensuring proper language handling. - Added styles for improved UI consistency across different sections. - Removed deprecated layout files and streamlined the structure for better maintainability.
This commit is contained in:
@@ -243,8 +243,9 @@ function createSeries(count: number, step: number, end: number): OverviewTokenUs
|
||||
const wave = 0.72 + ((index * 17) % 31) / 50;
|
||||
return {
|
||||
bucket_start_ms: end - (count - index) * step,
|
||||
input_tokens: Math.round(18_000 * wave),
|
||||
cache_read_tokens: Math.round(62_000 * wave),
|
||||
// input : cache_read = 1 : 99,使默认口径缓存命中率恰为 99%
|
||||
input_tokens: Math.round(800 * wave),
|
||||
cache_read_tokens: Math.round(79_200 * wave),
|
||||
cache_write_tokens: Math.round(7_500 * wave),
|
||||
output_tokens: Math.round(12_500 * wave),
|
||||
};
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
import { installDemoApi } from "./api";
|
||||
|
||||
installDemoApi();
|
||||
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const locale = params.get("locale") === "en-US" ? "en-US" : "zh-CN";
|
||||
const theme = params.get("theme") === "default-light" ? "default-light" : "default-dark";
|
||||
|
||||
document.documentElement.dataset.platform = "macos";
|
||||
localStorage.setItem("cursor-byok.locale", "zh-CN");
|
||||
localStorage.setItem("cursor-byok.theme", "default-dark");
|
||||
localStorage.setItem("cursor-byok.locale", locale);
|
||||
localStorage.setItem("cursor-byok.theme", theme);
|
||||
|
||||
void import("../index");
|
||||
|
||||
Reference in New Issue
Block a user