feat: Add subdirectory hosting support and fix asset path resolution

- Update README with comprehensive subdirectory hosting instructions and BASE_URL configuration guide
- Convert absolute asset paths to relative paths in index.html for proper subdirectory deployment
- Update all worker script imports to use relative paths instead of absolute paths
- Fix favicon and image references to work correctly when hosted in nested directories
- Normalize whitespace and formatting across worker files for consistency
- Update vite.config.ts to properly handle BASE_URL configuration for subdirectory deployments
- Ensure all tool pages and logic files maintain compatibility with subdirectory hosting
- Enable BentoPDF to be deployed at any URL path (e.g., example.com/tools/bentopdf/) without breaking asset loading
This commit is contained in:
abdullahalam123
2025-12-04 23:53:00 +05:30
parent 19425d98f9
commit b279c05281
39 changed files with 206 additions and 181 deletions

View File

@@ -5,11 +5,11 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>BentoPDF - The Privacy First PDF Toolkit</title>
<link rel="icon" type="image/svg+xml" href="/images/favicon.svg" />
<link rel="icon" type="image/png" href="/images/favicon.png" />
<link rel="apple-touch-icon" href="/images/favicon.png" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link href="/src/css/styles.css" rel="stylesheet" />
<link rel="icon" type="image/svg+xml" href="images/favicon.svg" />
<link rel="icon" type="image/png" href="images/favicon.png" />
<link rel="apple-touch-icon" href="images/favicon.png" />
<link rel="icon" href="favicon.ico" sizes="any" />
<link href="src/css/styles.css" rel="stylesheet" />
</head>
<body class="antialiased">
@@ -502,7 +502,7 @@
<!-- GDPR Compliance -->
<div class="flex flex-col items-center text-center">
<div class="w-20 h-20 md:w-24 md:h-24 rounded-full bg-blue-600 flex items-center justify-center mb-4">
<img src="/images/gdpr.svg" alt="GDPR compliance" class="w-full h-full" />
<img src="images/gdpr.svg" alt="GDPR compliance" class="w-full h-full" />
</div>
<h3 class="text-lg md:text-xl font-bold text-white mb-3">
GDPR compliance
@@ -515,7 +515,7 @@
<div class="flex flex-col items-center text-center">
<div class="w-20 h-20 md:w-24 md:h-24 rounded-full bg-blue-600 flex items-center justify-center mb-4">
<img src="/images/ccpa.svg" alt="CCPA compliance" class="w-full h-full" />
<img src="images/ccpa.svg" alt="CCPA compliance" class="w-full h-full" />
</div>
<h3 class="text-lg md:text-xl font-bold text-white mb-3">
CCPA compliance
@@ -528,7 +528,7 @@
<div class="flex flex-col items-center text-center">
<div class="w-20 h-20 md:w-24 md:h-24 rounded-full bg-blue-600 flex items-center justify-center mb-4">
<img src="/images/hipaa.svg" alt="HIPAA compliance" class="w-full h-full" />
<img src="images/hipaa.svg" alt="HIPAA compliance" class="w-full h-full" />
</div>
<h3 class="text-lg md:text-xl font-bold text-white mb-3">
HIPAA compliance