Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions website/docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ const SITE_URL = 'https://bvm-core.pages.dev';
export default defineConfig({
head: [
['meta', { name: 'viewport', content: 'width=device-width,initial-scale=1' }],
['link', { rel: 'icon', type: 'image/svg+xml', href: '/logo.svg' }],
['link', { rel: 'icon', type: 'image/svg+xml', href: '/favicon.svg' }],
['link', { rel: 'icon', type: 'image/png', sizes: '32x32', href: '/favicon-32.png' }],
['link', { rel: 'icon', type: 'image/png', sizes: '16x16', href: '/favicon-16.png' }],
['link', { rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png' }],
['link', { rel: 'manifest', href: '/site.webmanifest' }],
['meta', { property: 'og:site_name', content: 'BVM' }],
['meta', { property: 'og:type', content: 'website' }],
['meta', { property: 'og:image', content: `${SITE_URL}/logo.svg` }],
['meta', { name: 'twitter:card', content: 'summary' }],
['meta', { name: 'twitter:image', content: `${SITE_URL}/logo.svg` }],
['meta', { property: 'og:image', content: `${SITE_URL}/og.png` }],
['meta', { name: 'twitter:card', content: 'summary_large_image' }],
['meta', { name: 'twitter:image', content: `${SITE_URL}/og.png` }],
],
cleanUrls: true,
lastUpdated: true,
Expand Down
109 changes: 109 additions & 0 deletions website/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ hero:
- theme: alt
text: 中文
link: /zh/
- theme: alt
text: Troubleshooting
link: /guide/troubleshooting
- theme: alt
text: View on GitHub
link: https://github.com/EricLLLLLL/bvm
Expand Down Expand Up @@ -86,6 +89,44 @@ const copy = (text, type) => {
</div>
</div>

<div class="compare-section">
<h2>Install methods (choose the best fit)</h2>
<table class="compare-table">
<thead>
<tr>
<th>Method</th>
<th>Best for</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Shell</strong> (macOS/Linux)</td>
<td>Most users</td>
<td>Fastest mirror + auto setup</td>
</tr>
<tr>
<td><strong>PowerShell</strong> (Windows)</td>
<td>Windows dev</td>
<td>Same flow as Unix installer</td>
</tr>
<tr>
<td><strong>NPM</strong></td>
<td>Already using Node</td>
<td>Runs postinstall; reopen terminal may be needed</td>
</tr>
</tbody>
</table>
</div>

<div class="callout-section">
<div class="callout-card">
<div class="callout-title">Having trouble with global isolation?</div>
<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>
<a class="callout-link" href="/guide/troubleshooting">Open Troubleshooting →</a>
</div>
</div>

<div class="demo-section">
<h2>Install methods (animated)</h2>
<video class="demo-video" controls playsinline preload="metadata" src="/media/bvm-install-methods.mp4"></video>
Expand Down Expand Up @@ -186,6 +227,74 @@ const copy = (text, type) => {
background: var(--vp-c-text-3);
}

.compare-section {
margin-top: 3.5rem;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
gap: 1rem;
}

.compare-table {
width: 100%;
max-width: 900px;
border-collapse: collapse;
border: 1px solid var(--vp-c-divider);
border-radius: 12px;
overflow: hidden;
background: var(--vp-c-bg-alt);
}

.compare-table th,
.compare-table td {
padding: 0.75rem 0.9rem;
border-bottom: 1px solid var(--vp-c-divider);
vertical-align: top;
}

.compare-table th {
text-align: left;
background: var(--vp-c-bg-soft);
font-size: 0.9rem;
}

.compare-table td {
font-size: 0.95rem;
color: var(--vp-c-text-1);
}

.callout-section {
margin-top: 2rem;
display: flex;
justify-content: center;
}

.callout-card {
width: 100%;
max-width: 900px;
border: 1px solid var(--vp-c-divider);
background: var(--vp-c-bg-soft);
border-radius: 12px;
padding: 1rem 1.1rem;
}

.callout-title {
font-weight: 700;
color: var(--vp-c-text-1);
margin-bottom: 0.35rem;
}

.callout-body {
color: var(--vp-c-text-2);
margin-bottom: 0.6rem;
}

.callout-link {
color: var(--vp-c-brand-1);
font-weight: 600;
}

.demo-section {
margin-top: 3.5rem;
display: flex;
Expand Down
31 changes: 31 additions & 0 deletions website/docs/public/_headers
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Default: no aggressive caching for HTML
/*
Cache-Control: public, max-age=0, must-revalidate

# VitePress hashed assets (immutable)
/assets/*
Cache-Control: public, max-age=31536000, immutable

# Large media (immutable)
/media/*
Cache-Control: public, max-age=31536000, immutable

# Icons and manifests (immutable)
/favicon*
Cache-Control: public, max-age=31536000, immutable

/apple-touch-icon.png
Cache-Control: public, max-age=31536000, immutable

/icon-*.png
Cache-Control: public, max-age=31536000, immutable

/site.webmanifest
Cache-Control: public, max-age=31536000, immutable

/logo.svg
Cache-Control: public, max-age=31536000, immutable

/og.png
Cache-Control: public, max-age=31536000, immutable

Binary file added website/docs/public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/docs/public/favicon-16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/docs/public/favicon-32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/docs/public/favicon.ico
Binary file not shown.
20 changes: 20 additions & 0 deletions website/docs/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/docs/public/icon-192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/docs/public/icon-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
95 changes: 84 additions & 11 deletions website/docs/public/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/docs/public/og.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions website/docs/public/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "BVM",
"short_name": "BVM",
"icons": [
{
"src": "/icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#f472b6",
"background_color": "#0b1220",
"display": "standalone"
}

Loading