Skip to content

Commit 6eab8ea

Browse files
committed
docs: complete GitHub Pages whitepaper redesign
- Add paper-style homepage with abstract, stats bar, and architecture diagram - Configure dropdown navigation menus with collapsible sidebars - Add feature comparison matrix and academic reference formatting - Enhance ADR documents with metadata tables - Fix language redirect with meta refresh fallback - Add custom 404 page and OG image for social sharing - Add JSON-LD structured data for SEO - Configure llms.txt to exclude language switch pages
1 parent e91ba54 commit 6eab8ea

16 files changed

Lines changed: 1232 additions & 188 deletions

File tree

docs/.vitepress/config.mts

Lines changed: 124 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,36 @@ export default withMermaid(defineConfig({
1717
cleanUrls: true,
1818
ignoreDeadLinks: false,
1919

20+
// Rewrites to fix llms.txt "Untitled" entries
21+
rewrites: {
22+
'en/index.md': 'en/index.md',
23+
'zh/index.md': 'zh/index.md'
24+
},
25+
2026
head: [
2127
['link', { rel: 'icon', href: '/favicon.svg', type: 'image/svg+xml' }],
2228
['meta', { name: 'theme-color', content: '#0e7c6b' }],
2329
['meta', { property: 'og:type', content: 'website' }],
24-
['meta', { property: 'og:site_name', content: 'fqc' }]
30+
['meta', { property: 'og:site_name', content: 'fqc' }],
31+
['meta', { property: 'og:image', content: '/og-image.svg' }],
32+
['meta', { property: 'og:image:width', content: '1200' }],
33+
['meta', { property: 'og:image:height', content: '630' }],
34+
['meta', { name: 'twitter:card', content: 'summary_large_image' }],
35+
['meta', { name: 'twitter:image', content: '/og-image.svg' }],
36+
// JSON-LD structured data
37+
['script', { type: 'application/ld+json' }, JSON.stringify({
38+
'@context': 'https://schema.org',
39+
'@type': 'SoftwareSourceCode',
40+
name: 'fqc',
41+
description: 'Block-indexed FASTQ compression tool for bioinformatics',
42+
programmingLanguage: 'Rust',
43+
license: 'https://spdx.org/licenses/GPL-3.0-or-later.html',
44+
codeRepository: 'https://github.com/LessUp/fq-compressor-rust',
45+
author: {
46+
'@type': 'Person',
47+
name: 'LessUp'
48+
}
49+
})]
2550
],
2651

2752
sitemap: {
@@ -38,13 +63,43 @@ export default withMermaid(defineConfig({
3863
description: '基于 Rust 的块索引 FASTQ 压缩工具',
3964
themeConfig: {
4065
nav: [
41-
{ text: '快速开始', link: '/zh/guide/quick-start', activeMatch: '/zh/guide/' },
42-
{ text: 'CLI 参考', link: '/zh/guide/cli', activeMatch: '/zh/guide/' },
43-
{ text: '架构', link: '/zh/architecture/', activeMatch: '/zh/architecture/' },
44-
{ text: '算法', link: '/zh/algorithms/', activeMatch: '/zh/algorithms/' },
45-
{ text: '基准测试', link: '/zh/benchmarks/performance-report', activeMatch: '/zh/benchmarks/' },
46-
{ text: '发布说明', link: '/zh/release-notes', activeMatch: '/zh/release-notes/' },
47-
{ text: '参考文献', link: '/zh/references/', activeMatch: '/zh/references/' },
66+
{
67+
text: '指南',
68+
activeMatch: '/zh/guide/',
69+
items: [
70+
{ text: '快速开始', link: '/zh/guide/quick-start' },
71+
{ text: '安装', link: '/zh/guide/installation' },
72+
{ text: '压缩模式', link: '/zh/guide/modes' },
73+
{ text: 'CLI 参考', link: '/zh/guide/cli' }
74+
]
75+
},
76+
{
77+
text: '架构',
78+
activeMatch: '/zh/architecture/',
79+
items: [
80+
{ text: '概述', link: '/zh/architecture/' },
81+
{ text: '决策记录', link: '/zh/architecture/decisions/' },
82+
{ text: '性能路线图', link: '/zh/architecture/performance-roadmap' }
83+
]
84+
},
85+
{
86+
text: '算法',
87+
activeMatch: '/zh/algorithms/',
88+
items: [
89+
{ text: '概述', link: '/zh/algorithms/' },
90+
{ text: 'ABC 深度解析', link: '/zh/algorithms/abc-deep-dive' }
91+
]
92+
},
93+
{
94+
text: '参考',
95+
activeMatch: '/zh/(reference|benchmarks|references|release-notes)',
96+
items: [
97+
{ text: '二进制格式规范', link: '/zh/reference/format-spec' },
98+
{ text: '基准测试', link: '/zh/benchmarks/performance-report' },
99+
{ text: '参考文献', link: '/zh/references/' },
100+
{ text: '发布说明', link: '/zh/release-notes' }
101+
]
102+
}
48103
],
49104
sidebar: {
50105
'/zh/guide/': [
@@ -63,8 +118,16 @@ export default withMermaid(defineConfig({
63118
text: '架构',
64119
items: [
65120
{ text: '概述', link: '/zh/architecture/' },
66-
{ text: '性能路线图', link: '/zh/architecture/performance-roadmap' },
67-
{ text: '决策记录', link: '/zh/architecture/decisions/' }
121+
{
122+
text: '决策记录',
123+
collapsed: true,
124+
items: [
125+
{ text: 'ADR-001: 块索引归档格式', link: '/zh/architecture/decisions/001-block-indexed-format' },
126+
{ text: 'ADR-002: 三种执行模式', link: '/zh/architecture/decisions/002-three-execution-modes' },
127+
{ text: 'ADR-003: 组件级编码', link: '/zh/architecture/decisions/003-component-encoding' }
128+
]
129+
},
130+
{ text: '性能路线图', link: '/zh/architecture/performance-roadmap' }
68131
]
69132
}
70133
],
@@ -112,13 +175,43 @@ export default withMermaid(defineConfig({
112175
description: 'A block-indexed FASTQ compression tool in Rust',
113176
themeConfig: {
114177
nav: [
115-
{ text: 'Quick Start', link: '/en/guide/quick-start', activeMatch: '/en/guide/' },
116-
{ text: 'CLI Reference', link: '/en/guide/cli', activeMatch: '/en/guide/' },
117-
{ text: 'Architecture', link: '/en/architecture/', activeMatch: '/en/architecture/' },
118-
{ text: 'Algorithms', link: '/en/algorithms/', activeMatch: '/en/algorithms/' },
119-
{ text: 'Benchmarks', link: '/en/benchmarks/performance-report', activeMatch: '/en/benchmarks/' },
120-
{ text: 'Release Notes', link: '/en/release-notes', activeMatch: '/en/release-notes/' },
121-
{ text: 'References', link: '/en/references/', activeMatch: '/en/references/' },
178+
{
179+
text: 'Guide',
180+
activeMatch: '/en/guide/',
181+
items: [
182+
{ text: 'Quick Start', link: '/en/guide/quick-start' },
183+
{ text: 'Installation', link: '/en/guide/installation' },
184+
{ text: 'Compression Modes', link: '/en/guide/modes' },
185+
{ text: 'CLI Reference', link: '/en/guide/cli' }
186+
]
187+
},
188+
{
189+
text: 'Architecture',
190+
activeMatch: '/en/architecture/',
191+
items: [
192+
{ text: 'Overview', link: '/en/architecture/' },
193+
{ text: 'Decision Records', link: '/en/architecture/decisions/' },
194+
{ text: 'Performance Roadmap', link: '/en/architecture/performance-roadmap' }
195+
]
196+
},
197+
{
198+
text: 'Algorithms',
199+
activeMatch: '/en/algorithms/',
200+
items: [
201+
{ text: 'Overview', link: '/en/algorithms/' },
202+
{ text: 'ABC Deep Dive', link: '/en/algorithms/abc-deep-dive' }
203+
]
204+
},
205+
{
206+
text: 'Reference',
207+
activeMatch: '/en/(reference|benchmarks|references|release-notes)',
208+
items: [
209+
{ text: 'Binary Format Spec', link: '/en/reference/format-spec' },
210+
{ text: 'Benchmarks', link: '/en/benchmarks/performance-report' },
211+
{ text: 'References', link: '/en/references/' },
212+
{ text: 'Release Notes', link: '/en/release-notes' }
213+
]
214+
}
122215
],
123216
sidebar: {
124217
'/en/guide/': [
@@ -137,8 +230,16 @@ export default withMermaid(defineConfig({
137230
text: 'Architecture',
138231
items: [
139232
{ text: 'Overview', link: '/en/architecture/' },
140-
{ text: 'Performance Roadmap', link: '/en/architecture/performance-roadmap' },
141-
{ text: 'Architecture Decisions', link: '/en/architecture/decisions/' }
233+
{
234+
text: 'Decision Records',
235+
collapsed: true,
236+
items: [
237+
{ text: 'ADR-001: Block-Indexed Format', link: '/en/architecture/decisions/001-block-indexed-format' },
238+
{ text: 'ADR-002: Three Execution Modes', link: '/en/architecture/decisions/002-three-execution-modes' },
239+
{ text: 'ADR-003: Component Encoding', link: '/en/architecture/decisions/003-component-encoding' }
240+
]
241+
},
242+
{ text: 'Performance Roadmap', link: '/en/architecture/performance-roadmap' }
142243
]
143244
}
144245
],
@@ -199,7 +300,10 @@ export default withMermaid(defineConfig({
199300
},
200301

201302
vite: {
202-
plugins: [llmstxt()]
303+
plugins: [llmstxt({
304+
// Exclude language switch intermediate pages
305+
ignoreFiles: ['en.md', 'zh.md']
306+
})]
203307
},
204308

205309
mermaid: {

docs/.vitepress/theme/NotFound.vue

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
<script setup lang="ts">
2+
import { useData } from 'vitepress'
3+
const { site } = useData()
4+
</script>
5+
6+
<template>
7+
<div class="not-found">
8+
<div class="not-found-content">
9+
<h1 class="code">404</h1>
10+
<h2 class="title">Page Not Found</h2>
11+
<p class="desc">
12+
The page you're looking for doesn't exist in the fqc documentation.
13+
</p>
14+
<div class="actions">
15+
<a href="/en/" class="action primary">English Docs</a>
16+
<a href="/zh/" class="action">中文文档</a>
17+
<a href="https://github.com/LessUp/fq-compressor-rust" class="action">GitHub</a>
18+
</div>
19+
</div>
20+
</div>
21+
</template>
22+
23+
<style scoped>
24+
.not-found {
25+
display: flex;
26+
justify-content: center;
27+
align-items: center;
28+
min-height: calc(100vh - 64px);
29+
padding: 2rem;
30+
}
31+
32+
.not-found-content {
33+
text-align: center;
34+
max-width: 480px;
35+
}
36+
37+
.code {
38+
font-size: 8rem;
39+
font-weight: 700;
40+
line-height: 1;
41+
margin: 0;
42+
color: var(--vp-c-brand-1);
43+
opacity: 0.5;
44+
}
45+
46+
.title {
47+
font-size: 2rem;
48+
font-weight: 600;
49+
margin: 1rem 0;
50+
color: var(--vp-c-text-1);
51+
}
52+
53+
.desc {
54+
font-size: 1rem;
55+
color: var(--vp-c-text-2);
56+
margin-bottom: 2rem;
57+
}
58+
59+
.actions {
60+
display: flex;
61+
flex-wrap: wrap;
62+
justify-content: center;
63+
gap: 0.75rem;
64+
}
65+
66+
.action {
67+
display: inline-block;
68+
padding: 0.5rem 1rem;
69+
font-size: 0.875rem;
70+
font-weight: 500;
71+
border-radius: 6px;
72+
text-decoration: none;
73+
border: 1px solid var(--vp-c-border);
74+
color: var(--vp-c-text-1);
75+
transition: all 0.15s ease;
76+
}
77+
78+
.action:hover {
79+
border-color: var(--vp-c-brand-1);
80+
color: var(--vp-c-brand-1);
81+
}
82+
83+
.action.primary {
84+
background: var(--vp-c-brand-1);
85+
border-color: var(--vp-c-brand-1);
86+
color: white;
87+
}
88+
89+
.action.primary:hover {
90+
background: var(--vp-c-brand-2);
91+
}
92+
93+
@media (max-width: 640px) {
94+
.code {
95+
font-size: 5rem;
96+
}
97+
98+
.title {
99+
font-size: 1.5rem;
100+
}
101+
}
102+
</style>

docs/.vitepress/theme/index.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1+
import { h } from 'vue'
12
import DefaultTheme from 'vitepress/theme'
3+
import NotFound from './NotFound.vue'
24
import './style.css'
35

4-
export default DefaultTheme
6+
export default {
7+
...DefaultTheme,
8+
Layout: () => {
9+
return h(DefaultTheme.Layout, null, {
10+
'not-found': () => h(NotFound)
11+
})
12+
}
13+
}

0 commit comments

Comments
 (0)