Skip to content

Commit a1fcdca

Browse files
authored
Merge pull request #8 from EricLLLLLL/test
docs: refresh website assets (og/favicon) and homepage
2 parents e1365ef + 3bbf268 commit a1fcdca

19 files changed

Lines changed: 543 additions & 17 deletions

website/docs/.vitepress/config.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@ const SITE_URL = 'https://bvm-core.pages.dev';
55
export default defineConfig({
66
head: [
77
['meta', { name: 'viewport', content: 'width=device-width,initial-scale=1' }],
8-
['link', { rel: 'icon', type: 'image/svg+xml', href: '/logo.svg' }],
8+
['link', { rel: 'icon', type: 'image/svg+xml', href: '/favicon.svg' }],
9+
['link', { rel: 'icon', type: 'image/png', sizes: '32x32', href: '/favicon-32.png' }],
10+
['link', { rel: 'icon', type: 'image/png', sizes: '16x16', href: '/favicon-16.png' }],
11+
['link', { rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png' }],
12+
['link', { rel: 'manifest', href: '/site.webmanifest' }],
913
['meta', { property: 'og:site_name', content: 'BVM' }],
1014
['meta', { property: 'og:type', content: 'website' }],
11-
['meta', { property: 'og:image', content: `${SITE_URL}/logo.svg` }],
12-
['meta', { name: 'twitter:card', content: 'summary' }],
13-
['meta', { name: 'twitter:image', content: `${SITE_URL}/logo.svg` }],
15+
['meta', { property: 'og:image', content: `${SITE_URL}/og.png` }],
16+
['meta', { name: 'twitter:card', content: 'summary_large_image' }],
17+
['meta', { name: 'twitter:image', content: `${SITE_URL}/og.png` }],
1418
],
1519
cleanUrls: true,
1620
lastUpdated: true,

website/docs/index.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ hero:
1515
- theme: alt
1616
text: 中文
1717
link: /zh/
18+
- theme: alt
19+
text: Troubleshooting
20+
link: /guide/troubleshooting
1821
- theme: alt
1922
text: View on GitHub
2023
link: https://github.com/EricLLLLLL/bvm
@@ -86,6 +89,44 @@ const copy = (text, type) => {
8689
</div>
8790
</div>
8891

92+
<div class="compare-section">
93+
<h2>Install methods (choose the best fit)</h2>
94+
<table class="compare-table">
95+
<thead>
96+
<tr>
97+
<th>Method</th>
98+
<th>Best for</th>
99+
<th>Notes</th>
100+
</tr>
101+
</thead>
102+
<tbody>
103+
<tr>
104+
<td><strong>Shell</strong> (macOS/Linux)</td>
105+
<td>Most users</td>
106+
<td>Fastest mirror + auto setup</td>
107+
</tr>
108+
<tr>
109+
<td><strong>PowerShell</strong> (Windows)</td>
110+
<td>Windows dev</td>
111+
<td>Same flow as Unix installer</td>
112+
</tr>
113+
<tr>
114+
<td><strong>NPM</strong></td>
115+
<td>Already using Node</td>
116+
<td>Runs postinstall; reopen terminal may be needed</td>
117+
</tr>
118+
</tbody>
119+
</table>
120+
</div>
121+
122+
<div class="callout-section">
123+
<div class="callout-card">
124+
<div class="callout-title">Having trouble with global isolation?</div>
125+
<div class="callout-body">If tools still come from <code>~/.bun</code>, run <code>bvm setup</code> and verify <code>which bun</code> points to BVM shims.</div>
126+
<a class="callout-link" href="/guide/troubleshooting">Open Troubleshooting →</a>
127+
</div>
128+
</div>
129+
89130
<div class="demo-section">
90131
<h2>Install methods (animated)</h2>
91132
<video class="demo-video" controls playsinline preload="metadata" src="/media/bvm-install-methods.mp4"></video>
@@ -186,6 +227,74 @@ const copy = (text, type) => {
186227
background: var(--vp-c-text-3);
187228
}
188229

230+
.compare-section {
231+
margin-top: 3.5rem;
232+
width: 100%;
233+
display: flex;
234+
flex-direction: column;
235+
align-items: center;
236+
gap: 1rem;
237+
}
238+
239+
.compare-table {
240+
width: 100%;
241+
max-width: 900px;
242+
border-collapse: collapse;
243+
border: 1px solid var(--vp-c-divider);
244+
border-radius: 12px;
245+
overflow: hidden;
246+
background: var(--vp-c-bg-alt);
247+
}
248+
249+
.compare-table th,
250+
.compare-table td {
251+
padding: 0.75rem 0.9rem;
252+
border-bottom: 1px solid var(--vp-c-divider);
253+
vertical-align: top;
254+
}
255+
256+
.compare-table th {
257+
text-align: left;
258+
background: var(--vp-c-bg-soft);
259+
font-size: 0.9rem;
260+
}
261+
262+
.compare-table td {
263+
font-size: 0.95rem;
264+
color: var(--vp-c-text-1);
265+
}
266+
267+
.callout-section {
268+
margin-top: 2rem;
269+
display: flex;
270+
justify-content: center;
271+
}
272+
273+
.callout-card {
274+
width: 100%;
275+
max-width: 900px;
276+
border: 1px solid var(--vp-c-divider);
277+
background: var(--vp-c-bg-soft);
278+
border-radius: 12px;
279+
padding: 1rem 1.1rem;
280+
}
281+
282+
.callout-title {
283+
font-weight: 700;
284+
color: var(--vp-c-text-1);
285+
margin-bottom: 0.35rem;
286+
}
287+
288+
.callout-body {
289+
color: var(--vp-c-text-2);
290+
margin-bottom: 0.6rem;
291+
}
292+
293+
.callout-link {
294+
color: var(--vp-c-brand-1);
295+
font-weight: 600;
296+
}
297+
189298
.demo-section {
190299
margin-top: 3.5rem;
191300
display: flex;

website/docs/public/_headers

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Default: no aggressive caching for HTML
2+
/*
3+
Cache-Control: public, max-age=0, must-revalidate
4+
5+
# VitePress hashed assets (immutable)
6+
/assets/*
7+
Cache-Control: public, max-age=31536000, immutable
8+
9+
# Large media (immutable)
10+
/media/*
11+
Cache-Control: public, max-age=31536000, immutable
12+
13+
# Icons and manifests (immutable)
14+
/favicon*
15+
Cache-Control: public, max-age=31536000, immutable
16+
17+
/apple-touch-icon.png
18+
Cache-Control: public, max-age=31536000, immutable
19+
20+
/icon-*.png
21+
Cache-Control: public, max-age=31536000, immutable
22+
23+
/site.webmanifest
24+
Cache-Control: public, max-age=31536000, immutable
25+
26+
/logo.svg
27+
Cache-Control: public, max-age=31536000, immutable
28+
29+
/og.png
30+
Cache-Control: public, max-age=31536000, immutable
31+
31.9 KB
Loading

website/docs/public/favicon-16.png

961 Bytes
Loading

website/docs/public/favicon-32.png

1.16 KB
Loading

website/docs/public/favicon.ico

14.7 KB
Binary file not shown.

website/docs/public/favicon.svg

Lines changed: 20 additions & 0 deletions
Loading

website/docs/public/icon-192.png

39.3 KB
Loading

website/docs/public/icon-512.png

227 KB
Loading

0 commit comments

Comments
 (0)