Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
669e0b3
feat: add AGPL source link in footer + add vercel.json for WASM headers
May 29, 2026
7313b1b
fix: add project name to vercel.json
May 29, 2026
5734cd9
fix: simplify vercel.json headers to valid syntax
May 29, 2026
0a619db
chore: add Cloudflare Pages deployment config
May 29, 2026
e36c9d3
feat: skip large WASM files for Cloudflare Pages deploy
May 29, 2026
c68e82e
feat: default EN redirect + SEO domain fix + unified AdSlot
May 30, 2026
d87f36e
feat: WASM R2 CDN support for libreoffice files
May 30, 2026
2a7a74e
fix: add _redirects for Cloudflare Pages SPA fallback
May 30, 2026
1d6fde0
fix: hide footer + force EN redirect (no browser language detection)
May 30, 2026
09c1990
fix: use standalone output for Vercel auto-deploy (free tier doesn't …
May 30, 2026
621da8e
fix: separate JS/WASM paths for CDN loading + auto chunk discovery
May 30, 2026
58e254b
fix: load WASM from raw.githubusercontent.com CDN
May 30, 2026
1698f14
trigger: force CF Pages rebuild for WASM CDN fix
May 30, 2026
98e8f45
fix: remove local WASM files, load from CDN (raw.githubusercontent.com)
May 30, 2026
7cb8a1e
fix: add fetch retry + serial large file download for unstable networks
May 30, 2026
47c8df9
fix: enforce application/javascript MIME type for Worker scripts (Saf…
May 31, 2026
88281b9
fix: add NotoSansSC CJK font loading for WASM engine initialization
May 31, 2026
4780c7c
trigger: rebuild CF Pages
May 31, 2026
5a24457
fix: add /inst symlink in WASM FS for LibreOffice font path
May 31, 2026
b16b3f4
fix: write fonts synchronously via FS.writeFile (fix WASM run depende…
May 31, 2026
079265e
fix: add openGraph/twitter/canonical metadata for SEO
May 31, 2026
e737d9a
fix(seo): optimize metaDescription + keywords for all 107 tools in en.ts
Jun 2, 2026
ffdfa36
fix(seo): optimize metaDescription + keywords for all 110 tools in zh.ts
Jun 2, 2026
4675ec8
fix(seo): optimize metaDescription + keywords for all tools in zh-TW.ts
Jun 2, 2026
0deb96f
fix(seo): expand keywords to 8-12 for all tools in ar/de/es/fr/id/it/…
Jun 2, 2026
7e1955d
feat: add .env.example and wrangler.toml ad config docs
Jun 2, 2026
8063e7b
trigger: redeploy after old deployments cleanup
Jun 2, 2026
200204b
trigger: redeploy after cleanup
Jun 2, 2026
e25498a
feat: rebrand PDFCraft → Craftisle PDF
Jun 2, 2026
cc15c9e
fix: sitemap — add missing pages (/workflow, /terms, /tools/category/…
Jun 4, 2026
4e43b54
chore: remove GitHub link from header (desktop + mobile)
Jun 4, 2026
3a48ce4
fix: remove outputDirectory from vercel.json, add .vercelignore for s…
Jun 4, 2026
1447178
fix: repair og:image localhost → production URL, add llms.txt, add AI…
Jun 5, 2026
f82f526
chore: trigger Cloudflare Pages rebuild (og:image fix)
Jun 5, 2026
52326e1
fix(geo): add JSON-LD structured data to all pages for GEO
Jun 5, 2026
51b5545
chore: force Cloudflare Pages rebuild 1780629602
Jun 5, 2026
d98878d
fix: add metadataBase to layout.tsx to resolve og:image localhost issue
Jun 5, 2026
24b0074
fix: add env fallback in next.config.js for Cloudflare Pages
Jun 5, 2026
e190bba
fix(site.ts): hardcode url to production, remove env var fallback
Jun 5, 2026
98ad536
fix(package.json): force NEXT_PUBLIC_APP_URL in build command
Jun 5, 2026
bc5293c
fix: add metadataBase to generateBaseMetadata return value
Jun 5, 2026
90154ee
fix: add missing metadata.terms translations to all locales
Jun 5, 2026
e6352d0
chore: force Cloudflare Pages rebuild 1780633054
Jun 5, 2026
e8803d6
fix: add metadataBase to all generateMetadata early-return branches
Jun 5, 2026
0814bbb
fix: add metadataBase to category page generateMetadata
Jun 5, 2026
2a936ea
fix: add generateTermsMetadata and use it in terms page
Jun 5, 2026
e232ed7
fix: add generateTermsMetadata to seo/index.ts exports
Jun 5, 2026
9f59c00
ui: remove contact CTA section from FAQ page
Jun 5, 2026
5652a01
ui: replace header logo with gem diamond icon
Jun 5, 2026
f029e84
fix: remove infinite-loop redirect rule causing Cloudflare build warning
Jun 5, 2026
573935a
feat: enable LanguageSelector in Header for locale switching
Jun 7, 2026
593b387
feat: add Monetag ads support via NEXT_PUBLIC_ADVER_ENABLE
Jun 8, 2026
062e61f
feat: hardcode NEXT_PUBLIC_ADVER_ENABLE=true in build command
Jun 8, 2026
7bcdcd3
docs: add ads configuration guide (ADS_CONFIG.md)
Jun 8, 2026
8da1561
fix: remove unused Method 2 from ADS_CONFIG.md
Jun 8, 2026
a4a6cbe
chore: add .npmrc for Cloudflare build
Jun 9, 2026
d3aa1b0
fix(ads): change COEP from require-corp to credentialless to allow Mo…
Jun 9, 2026
cd83a05
fix(i18n): fix tTools() syntax errors and double-prefix i18n keys
Jun 10, 2026
10834a3
debug(add-attachments): add console logs and attachment verification …
Jun 10, 2026
5a774d5
SEO: expand keywords to 30-40 long-tail keywords for all 13 languages…
Jun 18, 2026
3e89a65
SEO: keywords expansion completed for all 13 languages (67 tools x 30…
Jun 18, 2026
041df6c
SEO: optimize en.ts content fields (description/howToUse/useCases/faq…
Jun 18, 2026
8c31c6c
feat: zh.ts full SEO content expansion (4 fields, 72 tools)
Jun 18, 2026
107e3cf
feat: all 12 language files - SEO content expansion (reuse en.ts cont…
Jun 18, 2026
4aaea7e
feat: wire up ro.ts (Romanian) in index.ts
Jun 18, 2026
77fc564
feat: translate fr/de/ja tool content (concurrent, 72 tools each)
Jun 18, 2026
7885069
feat: translate all 12 non-English languages (concurrent, 72 tools each)
Jun 18, 2026
c119b1f
feat: optimize en.ts metaDescription length (72 tools, 100→150-160 ch…
Jun 18, 2026
359d9ea
feat: full SEO optimization - translate tool content + optimize metaD…
Jun 18, 2026
7d1a751
feat: translate metaDescription for all 12 non-EN languages
Jun 18, 2026
0c348ce
feat: update OG image with proper dimensions (1200x630)
Jun 18, 2026
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
16 changes: 16 additions & 0 deletions .codegraph/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# CodeGraph data files
# These are local to each machine and should not be committed

# Database
*.db
*.db-wal
*.db-shm

# Cache
cache/

# Logs
*.log

# Hook markers
.dirty
24 changes: 24 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# PDFCraft Environment Variables
# Copy this file to .env.local and fill in the values

# -----------------------------------------------------------------------------
# Core
# -----------------------------------------------------------------------------
NEXT_PUBLIC_APP_URL=https://pdfcraft.com

# -----------------------------------------------------------------------------
# Ads (Google AdSense) — Single switch for entire project
# -----------------------------------------------------------------------------
# Set your AdSense client ID to enable ads on ALL pages:
# pdfcraft.com (homepage, tools, blog, docs...)
# All tool detail pages
# Leave empty to hide ads everywhere.
NEXT_PUBLIC_ADSENSE_CLIENT=

# -----------------------------------------------------------------------------
# Deployment (Cloudflare Pages)
# -----------------------------------------------------------------------------
# For Cloudflare Pages deployment, set NEXT_PUBLIC_ADSENSE_CLIENT
# in the Cloudflare Pages dashboard under:
# Settings → Variables and Secrets → Add variable
# (Build-time environment variables are injected during `npm run build`)
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,7 @@ public/libreoffice-wasm/soffice.data
# Tauri / Cargo (local build output)
src-tauri/target/

scripts/
*.translate.ts
*.bak
*.sh
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enable-pre-post-scripts=true
Empty file added .trigger-deploy
Empty file.
14 changes: 14 additions & 0 deletions .vercelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
node_modules
.next
.git
*.md
.DS_Store
.idea
.vscode
coverage
dist
build
.src-tauri
bentopdf-main
public/libreoffice-wasm/soffice.wasm
public/libreoffice-wasm/soffice.data
85 changes: 85 additions & 0 deletions ADS_CONFIG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Ads Configuration Guide

## Overview

This document explains how to enable/disable ads in the PDFCraft project. Ads are controlled via **build-time environment variables** that get baked into the static build output.

## Current Configuration

Ads are controlled by two environment variables:

| Variable | Purpose | Example Value |
|----------|---------|---------------|
| `NEXT_PUBLIC_ADVER_ENABLE` | Master switch for all ads | `true` / `false` |
| `NEXT_PUBLIC_ADSENSE_CLIENT` | Google AdSense client ID | `ca-pub-xxxxxxxxxxxxxxx` |

## How to Enable/Disable Ads

The build command in `package.json` has `NEXT_PUBLIC_ADVER_ENABLE=true` hardcoded:

```json
"build": "NEXT_PUBLIC_APP_URL=https://pdf.craftisle.com NEXT_PUBLIC_ADVER_ENABLE=true NODE_ENV=production next build"
```

**To disable ads:**
1. Open `package.json`
2. Change `NEXT_PUBLIC_ADVER_ENABLE=true` to `NEXT_PUBLIC_ADVER_ENABLE=false`
3. Commit and push → Cloudflare Pages will auto-redeploy

**To enable ads:**
1. Open `package.json`
2. Ensure `NEXT_PUBLIC_ADVER_ENABLE=true` is set
3. Commit and push → Cloudflare Pages will auto-redeploy

---

## Ad Components Location

### Monetag Vignette Banner
- **File**: `src/app/layout.tsx` (lines 76-83)
- **Condition**: `process.env.NEXT_PUBLIC_ADVER_ENABLE === 'true'`
- **Script**: `/monetag-vignette.js` (placed in `public/`)

### Google AdSense
- **File**: `src/app/layout.tsx` (lines 65-72)
- **Condition**: `process.env.NEXT_PUBLIC_ADSENSE_CLIENT` is truthy
- **Script**: Google AdSense auto-loads via `adsbygoogle.js`

---

## How to Verify Ads Are Working

After deployment, verify ads are injected:

```bash
# Check for Monetag script
curl -s https://pdf.craftisle.com | grep -i "monetag-vignette"

# Check for AdSense script
curl -s https://pdf.craftisle.com | grep -i "adsbygoogle"
```

Or manually:
1. Open `https://pdf.craftisle.com`
2. Right-click → **View Page Source**
3. Search for `monetag-vignette` and `adsbygoogle`

---

## Important Notes

1. **Static export limitation**: Since this project uses `output: 'export'`, environment variables are baked in at build time. Changing them requires a **rebuild**.
2. **No runtime config**: You cannot change ad settings without rebuilding and redeploying.
3. **Cloudflare cache**: After redeployment, wait ~30 seconds for cache to clear, or do a hard refresh (Cmd+Shift+R).

---

## Quick Reference

| Task | Action |
|------|--------|
| Disable all ads | Set `NEXT_PUBLIC_ADVER_ENABLE=false` in `package.json` → commit → push |
| Enable Monetag ads | Set `NEXT_PUBLIC_ADVER_ENABLE=true` in `package.json` → commit → push |
| Enable AdSense | Ensure `NEXT_PUBLIC_ADSENSE_CLIENT` is set in build env |
| Verify ads injected | `curl https://pdf.craftisle.com \| grep monetag` |
| Force rebuild on Cloudflare | Dashboard → Deployments → Retry latest deployment |

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions messages/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
"convertPdf": "تحويل PDF",
"freePdfTools": "أدوات PDF مجانية",
"onlinePdfEditor": "محرر PDF عبر الإنترنت"
},
"terms": {
"title": "شروط الخدمة",
"description": "شروط الخدمة لأدوات PDF المجانية من Craftisle."
}
},
"common": {
Expand Down
4 changes: 4 additions & 0 deletions messages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
"convertPdf": "PDF konvertieren",
"freePdfTools": "kostenlose PDF-Werkzeuge",
"onlinePdfEditor": "Online-PDF-Editor"
},
"terms": {
"title": "Nutzungsbedingungen",
"description": "Nutzungsbedingungen für Craftisle PDF kostenlose PDF-Tools."
}
},
"common": {
Expand Down
Loading