Skip to content

Commit 6d5244a

Browse files
committed
fix: resolve VitePress i18n routing issues
- Convert docs/index.md to redirect page - Recreate docs/en/index.md with full content - Fix directory name in getting-started.md (encoding → compress-kit)
1 parent a34e781 commit 6d5244a

5 files changed

Lines changed: 36 additions & 103 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"tool_name": "Bash",
3+
"tool_input_preview": "{\"command\":\"npm run docs:build 2>&1\",\"timeout\":120000,\"description\":\"验证 VitePress 构建\"}",
4+
"error": "Exit code 1\n\n> docs:build\n> vitepress build docs\n\n\n vitepress v1.6.4\n\n- building client + server bundles...\n\n\n(!) Found dead link /guide/getting-started in file index.md\n(!) Found dead link /guide/algorithms in file index.md\n(!) Found dead link /api/go in file index.md\n(!) Found dead link /benchmarks/results in file index.md\n(!) Found dead link /guide/contributing in file index.md\n\nIf this is expected, you can disable this check via config. Refer: https://vitepress.dev/reference/site-config#ign...",
5+
"timestamp": "2026-04-27T11:49:24.225Z",
6+
"retry_count": 1
7+
}

docs/en/guide/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ choco install mingw golang rust python3 make
4646

4747
```bash
4848
git clone https://github.com/LessUp/compress-kit.git
49-
cd encoding
49+
cd compress-kit
5050
```
5151

5252
### Build All Implementations

docs/en/index.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,18 @@ A key feature of CompressKit — encode in any language, decode in any other:
8181
diff input.bin restored.bin # No output = identical
8282
```
8383

84+
## Performance Highlights
85+
86+
<BenchmarkChart />
87+
8488
## Documentation Structure
8589

8690
| Section | Description |
8791
|---------|-------------|
88-
| [Getting Started](/en/guide/getting-started) | Environment setup, build instructions, basic usage |
89-
| [Algorithm Guide](/en/guide/algorithms) | Detailed explanations, comparisons, and use cases |
90-
| [API Reference](/en/api/go) | Complete API documentation for Go, Rust, and C++ |
92+
| [Getting Started](/en/guide/getting-started) | Environment setup, build instructions |
93+
| [Algorithm Guide](/en/guide/algorithms) | Detailed explanations and comparisons |
94+
| [API Reference](/en/api/go) | Library APIs for all languages |
9195
| [Benchmarks](/en/benchmarks/results) | Performance results and methodology |
92-
| [Contributing](/en/guide/contributing) | How to contribute to the project |
9396

9497
## Community
9598

docs/index.md

Lines changed: 20 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,31 @@
11
---
22
layout: home
3-
4-
hero:
5-
name: CompressKit
6-
text: Compression Algorithms
7-
tagline: Production-ready compression algorithms in C++17, Go, and Rust. Learn, compare, and verify across languages with identical binary formats.
8-
image:
9-
src: /logo.svg
10-
alt: CompressKit Logo
11-
actions:
12-
- theme: brand
13-
text: Get Started
14-
link: /en/guide/getting-started
15-
- theme: alt
16-
text: View on GitHub
17-
link: https://github.com/LessUp/compress-kit
18-
- theme: alt
19-
text: 中文
20-
link: /zh/
21-
22-
features:
23-
- icon: 🌐
24-
title: Multi-Language Comparison
25-
details: Every algorithm implemented in C++17, Go, and Rust. Compare performance, code style, and engineering practices across languages.
26-
- icon: 📦
27-
title: Cross-Language Compatible
28-
details: All implementations share identical binary formats. Encode in C++, decode in Go, verify in Rust — seamless interoperability.
29-
- icon: 📚
30-
title: Learning-Focused Documentation
31-
details: Understand the theory behind each algorithm with clear explanations and working code examples in three languages.
32-
- icon:
33-
title: Production-Ready Verification
34-
details: Complete CI/CD with automated builds, cross-language correctness tests, and continuous benchmarking pipelines.
353
---
364

37-
<StatsBar />
38-
39-
## Explore Algorithms
40-
41-
<AlgorithmGrid />
42-
43-
## Quick Comparison
44-
45-
| Algorithm | Compression | Speed | Best For |
46-
|-----------|-------------|-------|----------|
47-
| **Huffman** | Medium | Fast | General text/data |
48-
| **Arithmetic** | High | Medium | Maximum compression needs |
49-
| **Range Coder** | High | Fast | Balanced performance |
50-
| **RLE** | Variable | Very Fast | Highly repetitive data |
51-
52-
## Quick Start
53-
54-
```bash
55-
# Clone the repository
56-
git clone https://github.com/LessUp/compress-kit.git
57-
cd compress-kit
58-
59-
# Build all implementations
60-
make build
61-
62-
# Run tests
63-
make test
5+
<script setup>
6+
import { onMounted } from 'vue'
7+
import { useRouter } from 'vitepress'
648

65-
# Run benchmarks
66-
make bench
67-
```
9+
const router = useRouter()
6810

69-
## Cross-Language Verification
11+
onMounted(() => {
12+
// Redirect to English version
13+
router.go('/en/')
14+
})
15+
</script>
7016

71-
A key feature of CompressKit — encode in any language, decode in any other:
72-
73-
```bash
74-
# Encode with C++
75-
./algorithms/huffman/cpp/huffman_cpp encode input.bin encoded.huf
76-
77-
# Decode with Go
78-
./algorithms/huffman/go/huffman_go decode encoded.huf restored.bin
79-
80-
# Verify correctness
81-
diff input.bin restored.bin # No output = identical
82-
```
83-
84-
## Performance Highlights
85-
86-
<BenchmarkChart />
87-
88-
## Documentation Structure
89-
90-
| Section | Description |
91-
|---------|-------------|
92-
| [Getting Started](/en/guide/getting-started) | Environment setup, build instructions |
93-
| [Algorithm Guide](/en/guide/algorithms) | Detailed explanations and comparisons |
94-
| [API Reference](/en/api/go) | Library APIs for all languages |
95-
| [Benchmarks](/en/benchmarks/results) | Performance results and methodology |
96-
97-
## Community
98-
99-
- 💬 [GitHub Discussions](https://github.com/LessUp/compress-kit/discussions)
100-
- 🐛 [GitHub Issues](https://github.com/LessUp/compress-kit/issues)
101-
- 🤝 [Contributing Guide](/en/guide/contributing)
17+
<div class="redirect-notice">
18+
<p>Redirecting to <a href="/en/">English documentation</a>...</p>
19+
<p><a href="/zh/">中文文档</a></p>
20+
</div>
10221

10322
<style>
104-
:root {
105-
--vp-home-hero-name-color: transparent;
106-
--vp-home-hero-name-background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 50%, #10b981 100%);
23+
.redirect-notice {
24+
text-align: center;
25+
padding: 4rem 2rem;
26+
}
27+
.redirect-notice p {
28+
margin: 1rem 0;
29+
font-size: 1.1rem;
10730
}
10831
</style>

docs/zh/guide/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ choco install mingw golang rust python3 make
4646

4747
```bash
4848
git clone https://github.com/LessUp/compress-kit.git
49-
cd encoding
49+
cd compress-kit
5050
```
5151

5252
### 构建所有实现

0 commit comments

Comments
 (0)