const fs = require('fs'); const path = require('path'); const filePaths = [ 'components/sections/PostsGrid.tsx', 'components/sections/FeaturedPost.tsx', 'components/sections/AboutStory.tsx', 'components/layout/GlobalSearch.tsx', 'components/shop/ProductGallery.tsx', 'app/kontakt/page.tsx', 'app/realizacje/page.tsx', 'app/blog/page.tsx', 'app/blog/[slug]/page.tsx', 'app/o-nas/page.tsx' ]; filePaths.forEach(filePath => { const absolutePath = path.join(process.cwd(), filePath); if (!fs.existsSync(absolutePath)) return; let content = fs.readFileSync(absolutePath, 'utf8'); // about story content = content.replace(/https:\/\/images\.unsplash\.com\/photo-1621905251189-08b45d6a269e[^"']*/g, '/images/about/about-story.webp'); // product gallery and search content = content.replace(/https:\/\/images\.unsplash\.com\/photo-1581094794329-c8112a89af12[^"']*/g, '/images/hero/shop-section-image.webp'); content = content.replace(/https:\/\/images\.unsplash\.com\/photo-1584622650111-993a426fbf0a[^"']*/g, '/images/hero/shop-section-image.webp'); // blog post placeholders content = content.replace(/https:\/\/images\.unsplash\.com\/photo-1516321318423-f06f85e504b3[^"']*/g, '/images/hero/hero-section-image.webp'); // backgrounds content = content.replace(/https:\/\/images\.unsplash\.com\/photo-1516387938699-a93567ec168e[^"']*/g, '/images/hero/hero-section-image.webp'); content = content.replace(/https:\/\/images\.unsplash\.com\/photo-1503387762-592deb58ef4e[^"']*/g, '/images/hero/hero-section-image.webp'); content = content.replace(/https:\/\/images\.unsplash\.com\/photo-1504307651254-35680f356f12[^"']*/g, '/images/about/about-story.webp'); fs.writeFileSync(absolutePath, content, 'utf8'); }); console.log('Replaced unsplash links');