fix: markdown to pdf spacing and added mermaid diagram support
This commit is contained in:
@@ -4,6 +4,7 @@ import { defineConfig } from 'vitepress'
|
||||
export default defineConfig({
|
||||
title: "BentoPDF Docs",
|
||||
description: "Documentation for BentoPDF - The free, open-source, privacy-first PDF toolkit",
|
||||
base: '/docs/',
|
||||
|
||||
themeConfig: {
|
||||
// https://vitepress.dev/reference/default-theme-config
|
||||
@@ -58,7 +59,7 @@ export default defineConfig({
|
||||
},
|
||||
|
||||
socialLinks: [
|
||||
{ icon: 'github', link: 'https://github.com/bentopdf/bentopdf' },
|
||||
{ icon: 'github', link: 'https://github.com/alam00000/bentopdf' },
|
||||
{ icon: 'discord', link: 'https://discord.gg/Bgq3Ay3f2w' }
|
||||
],
|
||||
|
||||
|
||||
@@ -112,18 +112,18 @@ Add entries to all locale files in `public/locales/`:
|
||||
|
||||
## Translation
|
||||
|
||||
See [TRANSLATION.md](https://github.com/bentopdf/bentopdf/blob/main/TRANSLATION.md) for adding new languages.
|
||||
See [TRANSLATION.md](https://github.com/alam00000/bentopdf/blob/main/TRANSLATION.md) for adding new languages.
|
||||
|
||||
## Contributor License Agreement
|
||||
|
||||
Before your PR can be merged, you'll need to sign our CLA:
|
||||
|
||||
- [Individual CLA (ICLA)](https://github.com/bentopdf/bentopdf/blob/main/ICLA.md)
|
||||
- [Corporate CLA (CCLA)](https://github.com/bentopdf/bentopdf/blob/main/CCLA.md)
|
||||
- [Individual CLA (ICLA)](https://github.com/alam00000/bentopdf/blob/main/ICLA.md)
|
||||
- [Corporate CLA (CCLA)](https://github.com/alam00000/bentopdf/blob/main/CCLA.md)
|
||||
|
||||
## Getting Help
|
||||
|
||||
- [GitHub Issues](https://github.com/bentopdf/bentopdf/issues)
|
||||
- [GitHub Issues](https://github.com/alam00000/bentopdf/issues)
|
||||
- [Discord Community](https://discord.gg/Bgq3Ay3f2w)
|
||||
|
||||
## License
|
||||
|
||||
@@ -16,10 +16,10 @@ Visit [bentopdf.com](https://bentopdf.com) to use BentoPDF instantly—no instal
|
||||
|
||||
```bash
|
||||
# Pull and run the Docker image
|
||||
docker run -d -p 3000:80 ghcr.io/bentopdf/bentopdf:latest
|
||||
docker run -d -p 3000:8080 ghcr.io/alam00000/bentopdf:latest
|
||||
|
||||
# Or use Docker Compose
|
||||
curl -O https://raw.githubusercontent.com/bentopdf/bentopdf/main/docker-compose.yml
|
||||
curl -O https://raw.githubusercontent.com/alam00000/bentopdf/main/docker-compose.yml
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
@@ -29,7 +29,7 @@ Then open `http://localhost:3000` in your browser.
|
||||
|
||||
```bash
|
||||
# Clone the repository
|
||||
git clone https://github.com/bentopdf/bentopdf.git
|
||||
git clone https://github.com/alam00000/bentopdf.git
|
||||
cd bentopdf
|
||||
|
||||
# Install dependencies
|
||||
|
||||
@@ -11,7 +11,7 @@ Host BentoPDF using Apache HTTP Server.
|
||||
## Step 1: Build the Project
|
||||
|
||||
```bash
|
||||
git clone https://github.com/bentopdf/bentopdf.git
|
||||
git clone https://github.com/alam00000/bentopdf.git
|
||||
cd bentopdf
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
@@ -7,9 +7,9 @@ The easiest way to self-host BentoPDF in a production environment.
|
||||
```bash
|
||||
docker run -d \
|
||||
--name bentopdf \
|
||||
-p 3000:80 \
|
||||
-p 3000:8080 \
|
||||
--restart unless-stopped \
|
||||
ghcr.io/bentopdf/bentopdf:latest
|
||||
ghcr.io/alam00000/bentopdf:latest
|
||||
```
|
||||
|
||||
## Docker Compose
|
||||
@@ -17,17 +17,15 @@ docker run -d \
|
||||
Create `docker-compose.yml`:
|
||||
|
||||
```yaml
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
bentopdf:
|
||||
image: ghcr.io/bentopdf/bentopdf:latest
|
||||
image: ghcr.io/alam00000/bentopdf:latest
|
||||
container_name: bentopdf
|
||||
ports:
|
||||
- "3000:80"
|
||||
- "3000:8080"
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:80"]
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
@@ -50,10 +48,10 @@ RUN npm ci
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:alpine
|
||||
FROM nginxinc/nginx-unprivileged:alpine
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
EXPOSE 80
|
||||
EXPOSE 8080
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
```
|
||||
|
||||
@@ -61,7 +59,7 @@ Build and run:
|
||||
|
||||
```bash
|
||||
docker build -t bentopdf:custom .
|
||||
docker run -d -p 3000:80 bentopdf:custom
|
||||
docker run -d -p 3000:8080 bentopdf:custom
|
||||
```
|
||||
|
||||
## Environment Variables
|
||||
@@ -76,15 +74,13 @@ Example:
|
||||
```bash
|
||||
docker run -d \
|
||||
-e SIMPLE_MODE=true \
|
||||
-p 3000:80 \
|
||||
ghcr.io/bentopdf/bentopdf:latest
|
||||
-p 3000:8080 \
|
||||
ghcr.io/alam00000/bentopdf:latest
|
||||
```
|
||||
|
||||
## With Traefik (Reverse Proxy)
|
||||
|
||||
```yaml
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
traefik:
|
||||
image: traefik:v2.10
|
||||
@@ -103,20 +99,19 @@ services:
|
||||
- ./letsencrypt:/letsencrypt
|
||||
|
||||
bentopdf:
|
||||
image: ghcr.io/bentopdf/bentopdf:latest
|
||||
image: ghcr.io/alam00000/bentopdf:latest
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.bentopdf.rule=Host(`pdf.example.com`)"
|
||||
- "traefik.http.routers.bentopdf.entrypoints=websecure"
|
||||
- "traefik.http.routers.bentopdf.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.services.bentopdf.loadbalancer.server.port=8080"
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
## With Caddy (Reverse Proxy)
|
||||
|
||||
```yaml
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
caddy:
|
||||
image: caddy:2
|
||||
@@ -128,7 +123,7 @@ services:
|
||||
- caddy_data:/data
|
||||
|
||||
bentopdf:
|
||||
image: ghcr.io/bentopdf/bentopdf:latest
|
||||
image: ghcr.io/alam00000/bentopdf:latest
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
@@ -139,7 +134,7 @@ Caddyfile:
|
||||
|
||||
```
|
||||
pdf.example.com {
|
||||
reverse_proxy bentopdf:80
|
||||
reverse_proxy bentopdf:8080
|
||||
}
|
||||
```
|
||||
|
||||
@@ -148,7 +143,7 @@ pdf.example.com {
|
||||
```yaml
|
||||
services:
|
||||
bentopdf:
|
||||
image: ghcr.io/bentopdf/bentopdf:latest
|
||||
image: ghcr.io/alam00000/bentopdf:latest
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
|
||||
@@ -142,9 +142,9 @@ AddType image/webp .webp
|
||||
# ============================================
|
||||
# 5. REDIRECTS & ROUTING
|
||||
# ============================================
|
||||
# Canonical WWW (update domain name)
|
||||
RewriteCond %{HTTP_HOST} ^yourdomain\.com [NC]
|
||||
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [L,R=301]
|
||||
# Canonical WWW
|
||||
RewriteCond %{HTTP_HOST} ^bentopdf\.com [NC]
|
||||
RewriteRule ^(.*)$ https://www.bentopdf.com/$1 [L,R=301]
|
||||
|
||||
# Force HTTPS
|
||||
RewriteCond %{HTTPS} off
|
||||
@@ -161,15 +161,27 @@ RewriteCond %{REQUEST_FILENAME} -d
|
||||
RewriteRule ^ - [L]
|
||||
|
||||
# Language routes
|
||||
RewriteRule ^(de|en)$ /$1/ [R=301,L]
|
||||
RewriteRule ^(de|en|zh|vi)/(.*)$ /$2 [L]
|
||||
RewriteRule ^(de|en|zh|vi)/?$ / [L]
|
||||
|
||||
# SPA Fallback
|
||||
# ============================================
|
||||
# 5.5. DOCS ROUTING (VitePress)
|
||||
# ============================================
|
||||
RewriteCond %{REQUEST_URI} ^/docs
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME}\.html -f
|
||||
RewriteRule ^(.*)$ $1.html [L]
|
||||
|
||||
# ============================================
|
||||
# 6. SPA FALLBACK
|
||||
# ============================================
|
||||
# SPA Fallback (exclude /docs)
|
||||
RewriteCond %{REQUEST_URI} !^/docs
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^ /index.html [L]
|
||||
|
||||
ErrorDocument 404 /index.html
|
||||
ErrorDocument 404 /index.html
|
||||
```
|
||||
|
||||
## Subdirectory .htaccess Example
|
||||
|
||||
@@ -7,19 +7,18 @@ BentoPDF can be self-hosted on your own infrastructure. This guide covers variou
|
||||
The fastest way to self-host BentoPDF:
|
||||
|
||||
```bash
|
||||
docker run -d -p 3000:80 ghcr.io/bentopdf/bentopdf:latest
|
||||
docker run -d -p 3000:8080 ghcr.io/alam00000/bentopdf:latest
|
||||
```
|
||||
|
||||
Or with Docker Compose:
|
||||
|
||||
```yaml
|
||||
# docker-compose.yml
|
||||
version: '3.8'
|
||||
services:
|
||||
bentopdf:
|
||||
image: ghcr.io/bentopdf/bentopdf:latest
|
||||
image: ghcr.io/alam00000/bentopdf:latest
|
||||
ports:
|
||||
- "3000:80"
|
||||
- "3000:8080"
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
@@ -31,7 +30,7 @@ docker compose up -d
|
||||
|
||||
```bash
|
||||
# Clone and build
|
||||
git clone https://github.com/bentopdf/bentopdf.git
|
||||
git clone https://github.com/alam00000/bentopdf.git
|
||||
cd bentopdf
|
||||
npm install
|
||||
npm run build
|
||||
@@ -60,7 +59,7 @@ SIMPLE_MODE=true npm run build
|
||||
docker run -p 3000:8080 bentopdf/bentopdf-simple:latest
|
||||
```
|
||||
|
||||
See [SIMPLE_MODE.md](https://github.com/bentopdf/bentopdf/blob/main/SIMPLE_MODE.md) for full details.
|
||||
See [SIMPLE_MODE.md](https://github.com/alam00000/bentopdf/blob/main/SIMPLE_MODE.md) for full details.
|
||||
|
||||
### Base URL
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
## One-Click Deploy
|
||||
|
||||
[](https://app.netlify.com/start/deploy?repository=https://github.com/bentopdf/bentopdf)
|
||||
[](https://app.netlify.com/start/deploy?repository=https://github.com/alam00000/bentopdf)
|
||||
|
||||
## Manual Deployment
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Host BentoPDF on your own server using Nginx.
|
||||
## Step 1: Build the Project
|
||||
|
||||
```bash
|
||||
git clone https://github.com/bentopdf/bentopdf.git
|
||||
git clone https://github.com/alam00000/bentopdf.git
|
||||
cd bentopdf
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
## One-Click Deploy
|
||||
|
||||
[](https://vercel.com/new/clone?repository-url=https://github.com/bentopdf/bentopdf)
|
||||
[](https://vercel.com/new/clone?repository-url=https://github.com/alam00000/bentopdf)
|
||||
|
||||
## Manual Deployment
|
||||
|
||||
### Step 1: Fork the Repository
|
||||
|
||||
Fork [bentopdf/bentopdf](https://github.com/bentopdf/bentopdf) to your GitHub account.
|
||||
Fork [bentopdf/bentopdf](https://github.com/alam00000/bentopdf) to your GitHub account.
|
||||
|
||||
### Step 2: Import to Vercel
|
||||
|
||||
|
||||
Reference in New Issue
Block a user