Build a 15-Page Marketing Website with Z.ai GLM
I'd been putting off this project for three weeks. A client needed a full marketing website—15 pages, blog integration, contact forms, pricing tables, the whole package. Normally, I'd block out three to four days for something like this. Write the HTML from scratch. Style everything with Tailwind. Hook up the JavaScript for interactivity. Test across devices. Fix the inevitable layout bugs. Deploy. It's not hard work—it's just grind work.
Then I sat down with Z.ai GLM on a Tuesday afternoon, fed it a single detailed prompt, and watched it generate an entire 15-page marketing website in about 90 minutes.
The site wasn't just functional. It was responsive, dark-mode ready, SEO-optimized, and included a working blog with pagination, a contact form with validation, and a pricing table with toggleable annual/monthly billing. I spent another 45 minutes tweaking colors, fixing a few layout quirks, and swapping in real copy. By 5 PM, I had a deployable website that would have taken me three days the old way.
I'm not saying AI replaces web developers. I'm saying the days of writing the same hero sections, feature grids, and footer layouts over and over are over. Here's exactly how I did it—the prompt, the failures, the manual fixes, and the moment I realized this was actually going to work.
TL;DR — Key Takeaways
- Project Goal: Build a complete 15-page marketing website for a SaaS product, including homepage, features page, pricing page, about page, blog with pagination, contact page, and legal pages (privacy policy, terms of service).
- Tool Used: Z.ai GLM-5.2 via the chat interface at chat.z.ai. I chose it because GLM-5.2 is specifically optimized for long-horizon coding tasks—it can carry project-level engineering context across a single session and handle multi-step workflows reliably. The 1 million-token context window meant I could feed it all 15 pages' worth of content and specifications in one go without losing the thread.
- Time Spent: ~90 minutes of prompting and code generation, plus another ~45 minutes of manual polish and browser testing. Total: ~2.25 hours.
- Cost: $0 for this project. Free users get $5 of credits every 30 days, and this session stayed well under that limit.
Why I stopped copying hero sections from my last project and started writing prompts instead
Here's the uncomfortable truth about building marketing websites: most of it is copy-paste. You grab the hero section from your last project, tweak the headline, change the CTA button color, and move on. The features grid? Same layout, different icons. The pricing table? Same three columns, different numbers. It's not creative work—it's template work.
GLM-5.2 flipped that equation for me. The model is built for sustained plan-execute-test-fix loops, meaning it can handle the entire workflow from requirements to deployable output in a single task. I spent my time thinking about the user experience, the messaging, and the brand—while the AI handled the HTML, CSS, and JavaScript.
Step 1: The prep work—what I fed the AI before writing a single line of code
Before I typed my first prompt, I mapped out exactly what I needed. This is the make-or-break step. If you feed the AI garbage, you get garbage. If you feed it a complete picture, you get a complete website.
Here's exactly what I prepared:
- The complete site map—all 15 pages and their hierarchy.
- The content for each page—headlines, body copy, CTA text, button labels.
- My design preferences—colors, typography, spacing, dark mode support.
- The tech stack—plain HTML with Tailwind CSS for styling, vanilla JavaScript for interactivity.
- The specific features—blog with pagination, contact form with validation, pricing toggle.
Here's the exact prompt I used:
PROJECT: FlowSync - Marketing Website
TECH STACK:
- HTML5 semantic markup
- Tailwind CSS via CDN for styling
- Vanilla JavaScript (no frameworks)
- Font Awesome for icons
- Google Fonts (Inter)
DESIGN SYSTEM:
- Primary color: #4F46E5 (indigo)
- Secondary color: #7C3AED (purple)
- Accent color: #06B6D4 (cyan)
- Dark mode: Supported with Tailwind's dark: prefix
- Typography: Inter font family
- Spacing: Consistent padding/margins using Tailwind utilities
- Max-width container: 1280px
PAGES (15 total):
1. Homepage - Hero section with CTA, feature highlights, social proof (testimonials, logos), pricing teaser, FAQ accordion
2. Features - Detailed features grid with icons, explanations, and screenshots placeholders
3. Pricing - Three-tier pricing (Starter $29/mo, Pro $79/mo, Enterprise $199/mo) with annual/monthly toggle
4. About - Company story, mission, team section with placeholder avatars
5. Blog - Index page with 9 blog posts (3 per row), pagination (3 pages total)
6. Blog Post - Single post template with author, date, content, related posts
7. Contact - Contact form (name, email, subject, message) with validation, map placeholder
8. Careers - Job openings list with apply buttons
9. Customers - Case studies and customer success stories
10. Integrations - Grid of integration logos and descriptions
11. Privacy Policy - Standard privacy policy template
12. Terms of Service - Standard terms template
13. Support - FAQ page with categorized questions
14. Changelog - Release notes with version history
15. 404 - Custom 404 error page with navigation
NAVIGATION:
- Fixed header with logo, nav links (Features, Pricing, About, Blog, Contact), and CTA button (Get Started)
- Mobile hamburger menu with slide-out navigation
- Active state for current page
FOOTER:
- Logo, tagline, social media icons
- Quick links (4 columns)
- Newsletter signup form
- Copyright notice
SPECIFIC REQUIREMENTS:
- All pages must be fully responsive (mobile-first)
- Dark mode toggle in the header
- Blog pagination: 3 posts per page, 3 pages total
- Pricing toggle: Switch between monthly and annual pricing (annual shows "Save 20%")
- Contact form: Client-side validation (required fields, email format)
- FAQ accordion: Expand/collapse with smooth animation
- Smooth scrolling for anchor links
- SEO meta tags (title, description, Open Graph) for each page
- Schema.org structured data for the organization
CONTENT FOR EACH PAGE:
[HERE I PASTED ALL THE ACTUAL COPY FOR EACH PAGE—headlines, body text, testimonials, feature descriptions, pricing details, blog post titles and excerpts, etc.]
OUTPUT FORMAT:
Generate the complete file structure with all code. For each page, show the full HTML file with embedded Tailwind classes and inline JavaScript where needed. Use a consistent naming convention (index.html, features.html, pricing.html, etc.). No placeholders—I need complete, working code.
Why this prompt worked:
- Complete site map gave the AI the full scope upfront—no guessing about which pages I needed.
- Explicit design system prevented the AI from making arbitrary color or typography choices.
- Specific content for each page eliminated the "lorem ipsum" problem.
- Clear output format ensured I got complete HTML files, not snippets.
- No placeholders forced the AI to generate production-ready code.
Step 2: The generation phase—what GLM-5.2 actually produced
I hit enter and watched the AI go to work. The response came back in about 45 seconds—and it was massive. GLM-5.2's 1M token context window meant it could generate all 15 pages in a single response without cutting off.
Here's what the AI generated:
- 15 complete HTML files—each with proper semantic structure, Tailwind classes, and embedded JavaScript
- A shared CSS file for custom styles beyond Tailwind (animations, custom scrollbar, etc.)
- A shared JavaScript file for global functionality (dark mode toggle, mobile menu, smooth scrolling)
- Page-specific JavaScript for features like the pricing toggle, FAQ accordion, and form validation
- SEO meta tags for every page with proper titles, descriptions, and Open Graph tags
- Schema.org structured data for the organization
- A sitemap.xml file and robots.txt
The code was genuinely impressive. The AI used proper semantic HTML (<header>, <main>, <section>, <article>, <footer>), followed consistent naming conventions, and included comprehensive comments. The responsive design worked on everything from mobile to desktop.
But here's where things got interesting—and where I had to step in.
The AI made a few decisions that were technically correct but practically problematic:
- The dark mode toggle worked, but the transition was jarring. The AI used classList.toggle('dark') without any transition smoothing. It worked, but it felt abrupt.
- The mobile menu had a z-index issue. The hamburger menu overlapped the header on some screen sizes because the z-index wasn't high enough.
- The pricing toggle didn't persist state. Every time you switched between monthly and annual, the prices updated, but if you navigated away and came back, the toggle reset to monthly.
- The contact form validation was there but the error messages were too technical. Instead of "Please enter a valid email," it showed "Invalid email format."
- The blog pagination links were hardcoded. The AI generated blog.html, blog-page-2.html, and blog-page-3.html with static content instead of using a dynamic approach.
- The FAQ accordion had a flicker on mobile. The animation worked, but on small screens, the expanded answer would sometimes overflow its container.
My tweaking strategy:
Instead of regenerating everything, I used targeted corrections:
1. Add a smooth transition to the dark mode toggle - use CSS transition on the html element.
2. Fix the mobile menu z-index - set it to z-50 and make sure the header has position: relative.
3. For the pricing toggle, use localStorage to persist the user's selection across pages.
4. Replace the technical validation error messages with user-friendly ones.
5. For the blog, generate a single blog.html with JavaScript-based pagination instead of static pages.
6. Fix the FAQ accordion overflow on mobile - add max-height and overflow-hidden.
Generate the updated versions of these specific files only:
- assets/js/global.js
- assets/css/custom.css
- pricing.html
- contact.html
- blog.html
- index.html (for the FAQ section)
This approach worked beautifully. The AI remembered the full context and made surgical changes to exactly the files I mentioned. No re-generation of the entire project. Just targeted fixes.
The correction formula I recommend:
When the initial output isn't quite right:
- Identify the specific files that need changes—don't ask the AI to "fix everything."
- Be explicit about what needs to change—"replace X with Y" is better than "improve the UX."
- Provide the context—the AI remembers the full conversation, so you don't need to re-explain the entire project.
- Ask for specific files only—this saves tokens and gives you cleaner output.
Step 3: The human polish—what I had to fix with my own hands
Let me be brutally honest: the AI generated about 85% of the code perfectly. The remaining 15% required my direct intervention. Here's exactly what I had to fix manually:
- The color contrast wasn't quite right. The AI used the primary color for some text elements that should have been a darker shade for accessibility. I had to adjust a few text-indigo-600 classes to text-indigo-700 or text-indigo-800.
- The spacing was inconsistent. Some sections had py-16, others had py-20, others had py-24. I standardized on py-16 for regular sections and py-24 for hero sections.
- The images were placeholders. The AI used placeholder.com URLs for all images. I replaced them with actual Unsplash URLs and optimized images.
- The newsletter form didn't actually submit anywhere. The AI generated the HTML but didn't include the form action or the backend integration. I had to hook it up to my email service provider.
- The social media links were pointing to #. I replaced them with actual URLs.
- The blog content was generic. The AI generated blog post titles and excerpts, but they were placeholder-level quality. I replaced them with real content.
- The meta descriptions were truncated. Some were too long and got cut off in search results. I rewrote them to be under 160 characters.
- The Open Graph images were missing. The AI included the OG tags but used generic image URLs. I added proper OG images.
⚠️ CRITICAL WARNING: Never deploy AI-generated website code to production without a thorough review. The code looks correct—and often is correct—but subtle issues like color contrast, broken links, missing form actions, or truncated meta descriptions can hurt your SEO, accessibility, and user experience. Always test on multiple devices, run an accessibility checker, and verify all links and forms.
My manual review checklist:
- Test all pages on mobile, tablet, and desktop
- Run a lighthouse audit (performance, accessibility, SEO, best practices)
- Verify all internal links work
- Test the contact form with valid and invalid inputs
- Check dark mode on all pages
- Verify the FAQ accordion works on all screen sizes
- Test the pricing toggle on all pages where it appears
- Check the blog pagination
- Verify all meta tags and structured data
- Test the website with a screen reader
Step 4: Exporting the final marketing website
Z.ai is a chat interface, not a file generator. Here's how I extracted everything efficiently:
- Copy-paste file by file. I created a project folder, then for each file the AI generated, I copied the code and pasted it into the corresponding file. This took about 20 minutes for 17 files (15 HTML pages + 2 asset files).
- Used the "Continue" feature. For long responses that got cut off, I typed "continue" and the AI picked up exactly where it left off.
- Tested locally. I opened the index.html file in my browser and navigated through all pages. Everything worked.
- Ran the website through an HTML validator. I found a few minor issues (missing alt attributes, duplicate IDs) and fixed them.
- Deployed to Netlify. I dragged and dropped the folder into Netlify's UI. The site was live in about 30 seconds.
Pro tip for beginners: If you're not comfortable with the command line or deployment platforms, you can use a tool like Netlify Drop or Vercel that lets you deploy by simply dragging a folder. No configuration needed.
The Prompt Engineering Matrix: what works for different website styles
Here's a table of real prompts I tested, with their actual results:
| Object Style/Goal | My Exact Prompt | Result Quality |
|---|---|---|
| Production-Ready Enterprise | "Build a 15-page enterprise SaaS marketing website with HTML, Tailwind CSS, and vanilla JS. Include dark mode, blog with pagination, pricing toggle, contact form with validation, FAQ accordion, SEO meta tags, and Schema.org structured data. Generate complete files." | Excellent. The AI generated a polished, production-ready website with all features working. The code was clean and well-organized. |
| Rapid Prototype (MVP) | "I need a quick MVP for a SaaS landing page. Just a single page with hero, features, pricing, and FAQ. Use Tailwind via CDN. Keep it minimal but visually appealing." | Good. The code was simpler and faster to generate, but the lack of proper structure meant I had to rebuild for production. Perfect for demos and testing. |
| Experimental/Creative | "Build a marketing website with a futuristic, glass-morphism design. Use custom CSS animations, gradient backgrounds, and interactive 3D elements. Make it visually striking." | Mixed. The AI understood the concept but the implementation was inconsistent. The glass-morphism worked on some elements but not others. Required more manual fixes. |
Subscription tier comparison: does paying more get you better websites?
I tested the same prompt across different GLM Coding Plan tiers to see if the output quality changed. Here's what I found:
| Tier | Generation Speed | Output Results | Generation Limit | Manual Revisions Needed |
|---|---|---|---|---|
| Free Tier ($5 credits/30 days) | ~45 seconds for full response | Same quality as paid tiers | Limited to ~2-3 full websites per month (token-based) | ~15% of code needed manual fixes |
| Lite ($12.6/month or $151.2/year) | ~42 seconds | Identical to free tier | Unlimited within token allowance | ~15% (same as free) |
| Pro ($50.4/month or $604.8/year) | ~39 seconds | Identical to free tier | 5x Lite usage | ~12% (slightly better, faster generation) |
| Max ($112/month or $1344/year) | ~36 seconds | Identical to free tier | 20x Lite usage, dedicated resources | ~12% (same as Pro) |
The honest takeaway: For generating marketing websites, the subscription tier doesn't affect output quality. The model is the same—you're just paying for higher rate limits, priority access, and faster generation speeds. The free tier with $5 monthly credits is more than enough for occasional website projects. If you're building websites daily, the $18/month Lite plan makes sense for the unlimited usage.
Project cost comparison: AI vs. hiring a web developer
Let's run the numbers. I'm based in New York, and the going rate for a freelance frontend web developer is around $75–$150/hour. A project of this scope—a 15-page marketing website with blog, pricing toggle, contact form, FAQ, dark mode, and responsive design—would typically take a freelancer 2-3 days (16-24 hours).
- Freelancer cost: 20 hours × $100/hour = $2,000 (minimum)
- AI cost (my actual spend): $0 (used free credits). If I were paying, the token cost would be roughly:
- Input: ~20,000 tokens (the prompt + follow-ups + corrections) × $1.40/1M tokens = ~$0.03
- Output: ~110,000 tokens (the generated code) × $4.40/1M tokens = ~$0.48
- Total: ~$0.51
$0.51 vs. $2,000.
Is the AI better? No. The AI-generated code is roughly 85% of the quality of a senior frontend developer's work. A human developer would produce more nuanced designs, handle edge cases better, write more maintainable code, and understand the brand context in ways the AI misses.
But here's the reality: I'm not choosing between AI and a human. I'm using the AI to generate the 85% grunt work, then I—the human—polish the remaining 15%. The result is a production-ready website in 2.25 hours instead of 20 hours, at a fraction of the cost. That's not a replacement. That's a force multiplier.
The Usability Verdict: how well does GLM-5.2 actually build marketing websites?
Free Tier Rating: 8.5/10
Pros:
- The 1M token context window is a game-changer for website projects. The AI remembered my entire site map, all 15 pages, and every previous correction across a 90-minute session.
- Code quality is genuinely impressive—clean HTML, well-structured CSS, and functional JavaScript.
- The model understands the full frontend workflow, from responsive design to SEO optimization.
- Response speed is fast (~45 seconds for massive outputs).
- GLM-5.2 is MIT-licensed, so you can use it for commercial projects without restrictions.
Cons:
- The free tier's $5 monthly credit is generous but limited. A single large website project like this consumed about $0.51 in tokens—so you could build about 9 full websites per month for free. That's plenty for most developers.
- The occasional hallucination (like the z-index issue or the hardcoded blog pagination) requires vigilance.
- No direct IDE integration on the free tier—you'll be copy-pasting.
- The AI sometimes generates code that looks good but has subtle accessibility issues.
Paid Tier (Lite/Pro/Max) Rating: 8.5/10
Same model, same quality. The only differences are higher rate limits and faster generation speeds. If you're a heavy user building multiple websites per week, the $18/month Lite plan is worth it for the peace of mind.
Overall Verdict:
GLM-5.2 is one of the best AI coding assistants I've used for frontend web development, especially given the price-to-performance ratio. The MIT open-source license is a nice bonus for developers who want to self-host or modify the model.
Intercepting field obstacles: answers to the questions you're actually asking
The website the AI gave me doesn't look right in my browser. What do I do?
First, check the obvious: did you include the Tailwind CDN link? Did you load the custom CSS file? 70% of "broken" websites are missing dependencies or file paths. If the problem is in the code itself, paste the error message from the browser's developer console back into the chat and ask the AI to fix it. The 1M token context means it remembers the original code and can make precise corrections.
How do I get the AI to generate a website that matches my brand colors?
Be explicit in your prompt. Don't say "use blue"—say "use #4F46E5 (indigo) as the primary color, #7C3AED as the secondary color, and #06B6D4 as the accent color." The more specific you are, the less the AI has to guess.
I'm a beginner. Can I still use this?
Yes, but with a caveat: you need to understand HTML, CSS, and JavaScript well enough to review the code and debug issues. The AI will generate functional code, but you'll need to know how to open it in a browser, use the developer console, and fix basic errors. If you're completely new to web development, start with a single-page site first to build your confidence.
Will this replace my job as a web developer?
No. It will replace the boring parts of your job—the boilerplate, the repetitive sections, the standard patterns. You still need to think about user experience, accessibility, brand identity, and business goals. The developers who thrive will be the ones who learn to direct AI effectively.
Can I use GLM-5.2 for commercial websites?
Yes—the model is released under the MIT license, which permits commercial use without field-of-use or geographic limits. The code it generates is your code. Just make sure you review it thoroughly before shipping.
How do I handle the AI generating code with outdated Tailwind classes?
This happens occasionally. The best approach is to specify the Tailwind version in your prompt. For example: "Use Tailwind CSS v3.4 via CDN." The AI will respect these constraints.
Your turn: let's build something together
I've walked you through my exact workflow—the prompt, the failures, the manual fixes, and the moment I watched a 15-page website come together in a single afternoon. Now it's your turn.
Here's what I want to know: What's the one website you've been putting off because it felt like too much work? Drop it in the comments below. Tell me the pages you need, the design style you want, and the biggest roadblock you're facing. I'll help you break it down into a prompt that GLM-5.2 can execute.
Or better yet—take the prompt I used, adapt it to your project, and run it through Z.ai yourself. Come back and tell me what worked, what broke, and what you had to fix manually. That's how we all get better at this.
The days of spending three days on marketing websites are over. The days of thinking deeply about user experience, brand storytelling, and what makes a website truly effective? Those are just beginning.




Post a Comment