@@ -5,39 +5,65 @@ const sharedSidebar = {
55 '/en/' : [
66 {
77 text : 'Overview' ,
8- items : [ { text : 'Home' , link : '/en/' } ] ,
8+ items : [
9+ { text : 'Home' , link : '/en/' } ,
10+ { text : 'Quick Start' , link : '/en/guide/getting-started' } ,
11+ { text : 'Algorithms' , link : '/en/guide/algorithms' } ,
12+ ] ,
913 } ,
1014 {
11- text : 'Guide ' ,
15+ text : 'API Reference ' ,
1216 items : [
13- { text : 'Getting Started' , link : '/en/guide/getting-started' } ,
14- { text : 'Algorithms' , link : '/en/guide/algorithms' } ,
17+ { text : 'Go Library' , link : '/en/api/go' } ,
18+ { text : 'Rust Crate' , link : '/en/api/rust' } ,
19+ { text : 'C++ Header' , link : '/en/api/cpp' } ,
20+ ] ,
21+ } ,
22+ {
23+ text : 'Benchmarks' ,
24+ items : [
25+ { text : 'Performance Results' , link : '/en/benchmarks/results' } ,
26+ { text : 'How to Run' , link : '/en/benchmarks/how-to-run' } ,
1527 ] ,
1628 } ,
1729 {
1830 text : 'Reference' ,
1931 items : [
2032 { text : 'Project Structure' , link : '/en/guide/project-structure' } ,
33+ { text : 'Contributing' , link : '/en/guide/contributing' } ,
2134 { text : 'Specs (SSOT)' , link : 'https://github.com/LessUp/encoding/tree/master/specs' } ,
2235 ] ,
2336 } ,
2437 ] ,
2538 '/zh/' : [
2639 {
2740 text : '概览' ,
28- items : [ { text : '首页' , link : '/zh/' } ] ,
29- } ,
30- {
31- text : '指南' ,
3241 items : [
42+ { text : '首页' , link : '/zh/' } ,
3343 { text : '快速开始' , link : '/zh/guide/getting-started' } ,
3444 { text : '算法详解' , link : '/zh/guide/algorithms' } ,
3545 ] ,
3646 } ,
47+ {
48+ text : 'API 参考' ,
49+ items : [
50+ { text : 'Go 库' , link : '/zh/api/go' } ,
51+ { text : 'Rust 包' , link : '/zh/api/rust' } ,
52+ { text : 'C++ 头文件' , link : '/zh/api/cpp' } ,
53+ ] ,
54+ } ,
55+ {
56+ text : '基准测试' ,
57+ items : [
58+ { text : '性能结果' , link : '/zh/benchmarks/results' } ,
59+ { text : '如何运行' , link : '/zh/benchmarks/how-to-run' } ,
60+ ] ,
61+ } ,
3762 {
3863 text : '参考' ,
3964 items : [
4065 { text : '项目结构' , link : '/zh/guide/project-structure' } ,
66+ { text : '参与贡献' , link : '/zh/guide/contributing' } ,
4167 { text : '规范文档 (SSOT)' , link : 'https://github.com/LessUp/encoding/tree/master/specs' } ,
4268 ] ,
4369 } ,
@@ -49,7 +75,9 @@ const sharedNav = (lang: string) => [
4975 { text : lang === 'zh' ? '概览' : 'Overview' , link : lang === 'zh' ? '/zh/' : '/en/' } ,
5076 { text : lang === 'zh' ? '快速开始' : 'Get Started' , link : lang === 'zh' ? '/zh/guide/getting-started' : '/en/guide/getting-started' } ,
5177 { text : lang === 'zh' ? '算法' : 'Algorithms' , link : lang === 'zh' ? '/zh/guide/algorithms' : '/en/guide/algorithms' } ,
52- { text : lang === 'zh' ? '参考' : 'Reference' , link : lang === 'zh' ? '/zh/guide/project-structure' : '/en/guide/project-structure' } ,
78+ { text : lang === 'zh' ? 'API' : 'API' , link : lang === 'zh' ? '/zh/api/go' : '/en/api/go' } ,
79+ { text : lang === 'zh' ? '性能' : 'Benchmarks' , link : lang === 'zh' ? '/zh/benchmarks/results' : '/en/benchmarks/results' } ,
80+ { text : lang === 'zh' ? '贡献' : 'Contributing' , link : lang === 'zh' ? '/zh/guide/contributing' : '/en/guide/contributing' } ,
5381 { text : 'Changelog' , link : 'https://github.com/LessUp/encoding/blob/master/CHANGELOG.md' } ,
5482]
5583
@@ -72,7 +100,7 @@ export default defineConfig({
72100 [ 'meta' , { property : 'og:title' , content : 'Encoding | Compression Algorithms Collection' } ] ,
73101 [ 'meta' , { property : 'og:description' , content : 'Classic compression algorithms in C++, Go, and Rust for learning, comparison and cross-language verification' } ] ,
74102 [ 'meta' , { property : 'og:url' , content : 'https://lessup.github.io/encoding/' } ] ,
75- [ 'meta' , { name : 'twitter:card' , content : 'summary ' } ] ,
103+ [ 'meta' , { name : 'twitter:card' , content : 'summary_large_image ' } ] ,
76104 [ 'meta' , { name : 'twitter:title' , content : 'Encoding | Compression Algorithms Collection' } ] ,
77105 [ 'meta' , { name : 'twitter:description' , content : 'Classic compression algorithms in C++, Go, and Rust for learning, comparison and cross-language verification' } ] ,
78106 [ 'link' , { rel : 'icon' , type : 'image/svg+xml' , href : '/encoding/logo.svg' } ] ,
@@ -159,11 +187,28 @@ export default defineConfig({
159187 { icon : 'github' , link : 'https://github.com/LessUp/encoding' } ,
160188 ] ,
161189
162- // Search (shared )
190+ // Search (localized )
163191 search : {
164192 provider : 'local' ,
165193 options : {
166194 locales : {
195+ root : {
196+ translations : {
197+ button : {
198+ buttonText : 'Search' ,
199+ buttonAriaLabel : 'Search docs' ,
200+ } ,
201+ modal : {
202+ noResultsText : 'No results found' ,
203+ resetButtonTitle : 'Reset search' ,
204+ footer : {
205+ selectText : 'select' ,
206+ navigateText : 'navigate' ,
207+ closeText : 'close' ,
208+ } ,
209+ } ,
210+ } ,
211+ } ,
167212 zh : {
168213 translations : {
169214 button : {
0 commit comments