Skip to main content

Internal Service: generate_article_files

Generates all static files for an AI article at the ROOT level of the site.

Function Signature

Parameters

content_result Structure

Returns

Generated Files

URL Structure

All AI articles are placed at ROOT level for better AI SEO:
  • Business articles: /{slug}/
  • Product articles: /{slug}/
No more /ai_blog/ prefix.

Canonical URLs

Critical: All public-facing URLs use source_url (customer’s real domain), NOT ai_site_url. This ensures search engines index the correct domain.

Template Dependencies

Uses templates from children/templates/:
  • generate_article_html() - HTML with proper meta tags
  • generate_article_llms_txt() - AI-optimized text content
  • slugify() - URL-safe slug generation

Code Location