diff --git a/scripts/post-build.js b/scripts/post-build.js index fe867a2..d940972 100644 --- a/scripts/post-build.js +++ b/scripts/post-build.js @@ -50,11 +50,31 @@ if (process.env.NODE_ENV === 'production' && process.env.DEPLOY_TARGET === 'gith // Move logos directory to web-novit/logos moveDirectory('logos', 'web-novit/logos', '/logos/ → /web-novit/logos/'); - // Move video directory to web-novit/video - moveDirectory('video', 'web-novit/video', '/video/ → /web-novit/video/'); + // Move root-level assets to web-novit directory + const rootAssets = [ + 'novit-logo-official.png', + 'novit-icon-only.svg', + 'favicon.png', + 'robots.txt', + 'site.webmanifest', + 'sitemap.xml' + ]; + + rootAssets.forEach(asset => { + const fromPath = path.join(outDir, asset); + const toPath = path.join(webNovitDir, asset); + + if (fs.existsSync(fromPath)) { + try { + fs.copyFileSync(fromPath, toPath); + console.log(`✅ Copied /${asset} → /web-novit/${asset}`); + } catch (error) { + console.log(`⚠️ Failed to copy ${asset}:`, error.message); + } + } + }); - // Keep root files at root for GitHub Pages - console.log('✅ Root files maintained for GitHub Pages compatibility'); + console.log('✅ Root assets moved to web-novit directory for GitHub Pages compatibility'); console.log('🎉 GitHub Pages structure ready!'); } else { diff --git a/src/app/[locale]/academia/page.tsx b/src/app/[locale]/academia/page.tsx index 7587e03..d7ce1a6 100644 --- a/src/app/[locale]/academia/page.tsx +++ b/src/app/[locale]/academia/page.tsx @@ -7,7 +7,7 @@ import remarkGfm from 'remark-gfm'; import Image from 'next/image'; import Link from 'next/link'; import { ArrowLeft, BookOpen, Users, Award, Target } from 'lucide-react'; -import { getAssetPath } from '@/config/constants'; +import { getNavigationPath } from '@/config/constants'; import BackgroundVideo from '@/components/ui/BackgroundVideo'; interface AcademiaFrontmatter { @@ -203,7 +203,7 @@ export default async function AcademiaPage({ {/* Back Navigation */}
diff --git a/src/app/[locale]/carreras/page.tsx b/src/app/[locale]/carreras/page.tsx index 9b9e4ed..cddd393 100644 --- a/src/app/[locale]/carreras/page.tsx +++ b/src/app/[locale]/carreras/page.tsx @@ -7,7 +7,7 @@ import remarkGfm from 'remark-gfm'; import Image from 'next/image'; import Link from 'next/link'; import { ArrowLeft, Briefcase, Users, Star, Target } from 'lucide-react'; -import { getAssetPath } from '@/config/constants'; +import { getNavigationPath } from '@/config/constants'; import BackgroundVideo from '@/components/ui/BackgroundVideo'; interface CarrerasFrontmatter { @@ -203,7 +203,7 @@ export default async function CarrerasPage({ {/* Back Navigation */}
diff --git a/src/components/layout/Footer.tsx b/src/components/layout/Footer.tsx index e94edb5..659481a 100644 --- a/src/components/layout/Footer.tsx +++ b/src/components/layout/Footer.tsx @@ -14,7 +14,7 @@ import { ArrowUp, Check } from 'lucide-react'; -import { getAssetPath } from '@/config/constants'; +import { getAssetPath, getNavigationPath } from '@/config/constants'; import { ServiceContent } from '@/lib/contentLoader'; interface FooterProps { @@ -176,7 +176,7 @@ export default function Footer({ locale: localeParam, services = [] }: FooterPro ].map((item) => (
  • {t(`company_links.${item.key}`)} @@ -275,13 +275,13 @@ export default function Footer({ locale: localeParam, services = [] }: FooterPro
    {t('privacy_policy')} {t('terms_of_use')} diff --git a/src/components/layout/Header.tsx b/src/components/layout/Header.tsx index 2c86c78..1216b4d 100644 --- a/src/components/layout/Header.tsx +++ b/src/components/layout/Header.tsx @@ -5,7 +5,7 @@ import Image from 'next/image'; import { Menu, X } from 'lucide-react'; import { useLocale } from 'next-intl'; -import { getAssetPath } from '@/config/constants'; +import { getAssetPath, getNavigationPath } from '@/config/constants'; import PremiumQuoteModal from '@/components/ui/PremiumQuoteModal'; import LanguageSwitcher from '@/components/ui/LanguageSwitcher'; import TransitionLink from '@/components/ui/TransitionLink'; @@ -28,22 +28,22 @@ export default function Header({ locale: localeParam, navigationContent }: Heade // Default navigation if no content provided (fallback) const defaultNavigation = [ - { label: 'Inicio', href: getAssetPath(`/${locale}/#home`), isHome: true }, - { label: 'Qué hacemos', href: getAssetPath(`/${locale}/#services`) }, - { label: 'Casos de Éxito', href: getAssetPath(`/${locale}/#${locale === 'en' ? 'success-stories' : locale === 'pt' ? 'casos-sucesso' : 'casos-exito'}`) }, - { label: 'Academia Novit', href: getAssetPath(`/${locale}/academia`) }, - { label: 'Carreras', href: getAssetPath(`/${locale}/carreras`) }, + { label: 'Inicio', href: getNavigationPath(`/${locale}/#home`), isHome: true }, + { label: 'Qué hacemos', href: getNavigationPath(`/${locale}/#services`) }, + { label: 'Casos de Éxito', href: getNavigationPath(`/${locale}/#${locale === 'en' ? 'success-stories' : locale === 'pt' ? 'casos-sucesso' : 'casos-exito'}`) }, + { label: 'Academia Novit', href: getNavigationPath(`/${locale}/academia`) }, + { label: 'Carreras', href: getNavigationPath(`/${locale}/carreras`) }, ]; const navigation = navigationContent ? [ - { label: navigationContent.data.home, href: getAssetPath(`/${locale}/#home`), isHome: true }, - { label: navigationContent.data.services, href: getAssetPath(`/${locale}/#services`) }, + { label: navigationContent.data.home, href: getNavigationPath(`/${locale}/#home`), isHome: true }, + { label: navigationContent.data.services, href: getNavigationPath(`/${locale}/#services`) }, { label: navigationContent.data.stories, - href: getAssetPath(`/${locale}/#${locale === 'en' ? 'success-stories' : locale === 'pt' ? 'casos-sucesso' : 'casos-exito'}`) + href: getNavigationPath(`/${locale}/#${locale === 'en' ? 'success-stories' : locale === 'pt' ? 'casos-sucesso' : 'casos-exito'}`) }, - { label: navigationContent.data.academy, href: getAssetPath(`/${locale}/academia`) }, - { label: navigationContent.data.careers, href: getAssetPath(`/${locale}/carreras`) }, + { label: navigationContent.data.academy, href: getNavigationPath(`/${locale}/academia`) }, + { label: navigationContent.data.careers, href: getNavigationPath(`/${locale}/carreras`) }, ] : defaultNavigation; useEffect(() => { diff --git a/src/components/sections/CasesGrid.tsx b/src/components/sections/CasesGrid.tsx index e79505d..4c3c172 100644 --- a/src/components/sections/CasesGrid.tsx +++ b/src/components/sections/CasesGrid.tsx @@ -10,7 +10,7 @@ import { CasesHeaderContent, StoryContent } from '@/lib/contentLoader'; import { ArrowUpRight, Tag } from 'lucide-react'; import { calculateYearsOfExperience } from '@/utils/experience'; -import { getAssetPath } from '@/config/constants'; +import { getAssetPath, getNavigationPath } from '@/config/constants'; import BackgroundVideo from '@/components/ui/BackgroundVideo'; // Function to convert StoryContent to CaseStudy format @@ -138,7 +138,7 @@ function CaseCard({ caseStudy, index, locale: localeParam, headerContent }: { {/* Action Button */}
    {headerContent?.data.view_case || 'Ver caso completo'} diff --git a/src/components/ui/FloatingCTA.tsx b/src/components/ui/FloatingCTA.tsx index c5afe46..c28f10d 100644 --- a/src/components/ui/FloatingCTA.tsx +++ b/src/components/ui/FloatingCTA.tsx @@ -4,7 +4,7 @@ import { useState } from 'react'; import { MessageCircle, X, Send } from 'lucide-react'; import Link from 'next/link'; import { useTranslations, useLocale } from 'next-intl'; -import { getAssetPath } from '@/config/constants'; +import { getNavigationPath } from '@/config/constants'; export default function FloatingCTA() { const [isOpen, setIsOpen] = useState(false); @@ -157,7 +157,7 @@ export default function FloatingCTA() { />