Website Homepage Copy Generator

Website Homepage Copy Generator

Generate compelling copy for the most important page on your website.

Homepage Details

Generated Homepage Copy

Your generated homepage copy will appear here...

${copy.about}

Call to Action

${copy.final_cta}

Button Text: ${copy.cta_button}

`; copy.textForPdf = `HEADLINE\n${copy.headline}\n\nSUB-HEADLINE\n${copy.subheadline}\n\nKEY BENEFITS\n${templates.benefits.join('\n')}\n\nABOUT US\n${copy.about}\n\nCALL TO ACTION\n${copy.final_cta}\n\nBUTTON TEXT\n${copy.cta_button}`; lastCopy = copy; renderCopy(copy); }; const renderCopy = (copy) => { homepageOutput.innerHTML = copy.html; pdfButtonContainer.classList.remove('hidden'); }; const handlePdfDownload = () => { if (!lastCopy) return; const { jsPDF } = window.jspdf; const pdf = new jsPDF({ orientation: 'p', unit: 'pt', format: 'a4' }); const margin = 60; const pageWidth = pdf.internal.pageSize.getWidth(); pdf.setFontSize(24); pdf.setFont('Helvetica', 'bold'); pdf.text("Website Homepage Copy", pageWidth / 2, margin, { align: 'center' }); pdf.setFontSize(12); pdf.setFont('Helvetica', 'normal'); pdf.text(`For: ${nameEl.value}`, pageWidth / 2, margin + 25, { align: 'center' }); pdf.setFontSize(11); const textLines = pdf.splitTextToSize(lastCopy.textForPdf, pageWidth - margin * 2); pdf.text(textLines, margin, margin + 70); const today = new Date().toLocaleDateString('en-US'); const pageCount = pdf.internal.getNumberOfPages(); for (let i = 1; i <= pageCount; i++) { pdf.setPage(i); const pageHeight = pdf.internal.pageSize.getHeight(); pdf.setFontSize(9); pdf.setTextColor(150); pdf.text(`Generated on ${today}`, margin, pageHeight - 30); pdf.text(`Page ${i} of ${pageCount}`, pageWidth - margin, pageHeight - 30, { align: 'right' }); } pdf.save('homepage-copy.pdf'); }; generateBtn.addEventListener('click', generateCopy); downloadPdfBtn.addEventListener('click', handlePdfDownload); // Initial generation on load generateCopy(); });
Scroll to Top