Files
klz-cables.com/scripts/analyze-home-detailed.js
2025-12-30 12:10:13 +01:00

76 lines
2.8 KiB
JavaScript

const pages = require('../data/processed/pages.json');
const cheerio = require('cheerio');
// Get home page (corporate-3-landing-2)
const homePage = pages.find(p => p.slug === 'corporate-3-landing-2');
const $ = cheerio.load(homePage.contentHtml);
console.log('=== HOME PAGE (corporate-3-landing-2) DETAILED ANALYSIS ===\n');
// Analyze each vc-row
$('.vc-row').each((i, row) => {
const $row = $(row);
const $cols = $row.find('> .vc-column');
const colCount = $cols.length;
console.log(`Row ${i + 1}:`);
console.log(` Columns: ${colCount}`);
console.log(` Classes: ${$row.attr('class')}`);
// Check for specific patterns
const hasH1 = $row.find('h1').length > 0;
const hasH2 = $row.find('h2').length > 0;
const hasH3 = $row.find('h3').length > 0;
const hasH4 = $row.find('h4').length > 0;
const hasH6 = $row.find('h6').length > 0;
const hasP = $row.find('p').length > 0;
const hasImg = $row.find('img').length > 0;
const hasNested = $row.find('.vc-row').length;
if (hasH1) console.log(` Has H1: ${$row.find('h1').text().substring(0, 50)}...`);
if (hasH2) console.log(` Has H2: ${$row.find('h2').text().substring(0, 50)}...`);
if (hasH3) console.log(` Has H3: ${$row.find('h3').text().substring(0, 50)}...`);
if (hasH4) console.log(` Has H4: ${$row.find('h4').text().substring(0, 50)}...`);
if (hasH6) console.log(` Has H6: ${$row.find('h6').text()}`);
if (hasP) console.log(` Has P: ${$row.find('p').length} paragraphs`);
if (hasImg) console.log(` Has Images: ${hasImg}`);
if (hasNested) console.log(` Has Nested Rows: ${hasNested}`);
// Check column structure
if (colCount > 0) {
$cols.each((j, col) => {
const $col = $(col);
const colClasses = $col.attr('class') || '';
const colH3 = $col.find('h3').text().trim();
const colH4 = $col.find('h4').text().trim();
const colH6 = $col.find('h6').text().trim();
const colP = $col.find('p').text().trim().substring(0, 30);
console.log(` Column ${j + 1}: ${colClasses}`);
if (colH3) console.log(` H3: ${colH3}`);
if (colH4) console.log(` H4: ${colH4}`);
if (colH6) console.log(` H6: ${colH6}`);
if (colP) console.log(` P: ${colP}...`);
});
}
console.log('');
});
// Also check team page for testimonials
console.log('\n=== TEAM PAGE TESTIMONIALS ANALYSIS ===\n');
const teamPage = pages.find(p => p.slug === 'team');
const $team = cheerio.load(teamPage.contentHtml);
$team('.vc-row').each((i, row) => {
const $row = $team(row);
const text = $row.text();
if (text.includes('„') || text.includes('“') || text.includes('Expertise') || text.includes('Experience')) {
console.log(`Row ${i + 1}:`);
console.log(` Content: ${text.substring(0, 100)}...`);
console.log(` Has quotes: ${text.includes('„') || text.includes('“')}`);
console.log('');
}
});