feat: Add VitePress docs, EPUB to PDF tool, Phosphor icons, and licensing updates
- Set up VitePress documentation site (docs:dev, docs:build, docs:preview) - Added Getting Started, Tools Reference, Contributing, and Commercial License pages - Created self-hosting guides for Docker, Vercel, Netlify, Cloudflare, AWS, Hostinger, Nginx, Apache - Updated README with documentation link, sponsors section, and docs contribution guide - Added EPUB to PDF converter using LibreOffice WASM - Migrated to Phosphor Icons for consistent iconography - Added donation ribbon banner on landing page - Removed 'Like My Work?' section (replaced by ribbon) - Updated licensing.html with delivery model, AGPL notice, invoicing, and no-refund policy - Added Commercial License documentation page - Updated translations table (Chinese added, marked non-English as In Progress) - Added sponsors.yml workflow for auto-generating sponsor avatars
This commit is contained in:
92
docs/self-hosting/netlify.md
Normal file
92
docs/self-hosting/netlify.md
Normal file
@@ -0,0 +1,92 @@
|
||||
# Deploy to Netlify
|
||||
|
||||
[Netlify](https://netlify.com) provides excellent static site hosting with a generous free tier.
|
||||
|
||||
## One-Click Deploy
|
||||
|
||||
[](https://app.netlify.com/start/deploy?repository=https://github.com/bentopdf/bentopdf)
|
||||
|
||||
## Manual Deployment
|
||||
|
||||
### Step 1: Connect Repository
|
||||
|
||||
1. Log in to [Netlify](https://app.netlify.com)
|
||||
2. Click "Add new site" → "Import an existing project"
|
||||
3. Connect your GitHub account
|
||||
4. Select your BentoPDF fork
|
||||
|
||||
### Step 2: Configure Build Settings
|
||||
|
||||
| Setting | Value |
|
||||
|---------|-------|
|
||||
| Build command | `npm run build` |
|
||||
| Publish directory | `dist` |
|
||||
| Node version | 18+ |
|
||||
|
||||
### Step 3: Deploy
|
||||
|
||||
Click "Deploy site" and wait for the build.
|
||||
|
||||
## Configuration File
|
||||
|
||||
Create `netlify.toml` in your project root:
|
||||
|
||||
```toml
|
||||
[build]
|
||||
command = "npm run build"
|
||||
publish = "dist"
|
||||
|
||||
[build.environment]
|
||||
NODE_VERSION = "18"
|
||||
|
||||
# SPA routing
|
||||
[[redirects]]
|
||||
from = "/*"
|
||||
to = "/index.html"
|
||||
status = 200
|
||||
|
||||
# Cache WASM files
|
||||
[[headers]]
|
||||
for = "*.wasm"
|
||||
[headers.values]
|
||||
Cache-Control = "public, max-age=31536000, immutable"
|
||||
Content-Type = "application/wasm"
|
||||
```
|
||||
|
||||
## Environment Variables
|
||||
|
||||
Set these in Site settings → Environment variables:
|
||||
|
||||
| Variable | Description |
|
||||
|----------|-------------|
|
||||
| `SIMPLE_MODE` | Set to `true` for minimal build |
|
||||
|
||||
## Custom Domain
|
||||
|
||||
1. Go to Site settings → Domain management
|
||||
2. Click "Add custom domain"
|
||||
3. Follow DNS configuration instructions
|
||||
|
||||
## Large Media
|
||||
|
||||
For large WASM files, consider enabling [Netlify Large Media](https://docs.netlify.com/large-media/overview/):
|
||||
|
||||
```bash
|
||||
netlify lm:setup
|
||||
git lfs track "*.wasm"
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Build Fails
|
||||
|
||||
Check Node version compatibility:
|
||||
|
||||
```toml
|
||||
[build.environment]
|
||||
NODE_VERSION = "20"
|
||||
```
|
||||
|
||||
### Slow Initial Load
|
||||
|
||||
Enable asset optimization in Site settings → Build & deploy → Asset optimization.
|
||||
Reference in New Issue
Block a user