diff --git a/almeira-web-deploy.zip b/almeira-web-deploy.zip index 775f339..dab8333 100644 Binary files a/almeira-web-deploy.zip and b/almeira-web-deploy.zip differ diff --git a/package-hostinger.sh b/package-hostinger.sh index 21825d4..fd77232 100755 --- a/package-hostinger.sh +++ b/package-hostinger.sh @@ -46,6 +46,23 @@ if [ -f ".env.local" ]; then cp .env.local "$DEPLOY_DIR/.env.production.example" fi +# 7.5. Modificar package.json para evitar que Hostinger intente hacer build +echo "Configurando package.json para producción en Hostinger..." +node -e " +const fs = require('fs'); +const path = require('path'); +const pkgPath = path.join('$DEPLOY_DIR', 'package.json'); +if (fs.existsSync(pkgPath)) { + const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8')); + pkg.scripts = { + ...pkg.scripts, + build: 'echo \"Application is already built standalone. Skipping build.\"', + start: 'NODE_ENV=production node server.js' + }; + fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2)); +} +" + # 8. Comprimir en un archivo zip ZIP_FILE="almeira-web-deploy.zip" echo "Comprimiendo aplicación en $ZIP_FILE..." diff --git a/src/app/[slug]/page.tsx b/src/app/[slug]/page.tsx index 269fc80..ef93920 100644 --- a/src/app/[slug]/page.tsx +++ b/src/app/[slug]/page.tsx @@ -6,6 +6,20 @@ import { Calendar, User, ArrowLeft } from 'lucide-react'; import Link from 'next/link'; import { decodeHtmlEntities } from '@/lib/utils'; import DOMPurify from 'isomorphic-dompurify'; +import { Metadata, ResolvingMetadata } from 'next'; + +function formatTextToHtml(text: string) { + if (!text) return ''; + // Si ya contiene etiquetas estructurales de HTML (párrafos, saltos, divs, listas), lo devolvemos tal cual + if (/<\/?(?:p|br|div|h[1-6]|ul|ol|li|table)[^>]*>/i.test(text)) { + return text; + } + // Convertimos texto plano con saltos de línea a párrafos y
, permitiendo que etiquetas inline como o