Automated AI content engine — fetches AI compliance news from authoritative sources, categorizes and expands them using OpenAI, and pushes MDX articles to any target site repository.
AI Article Generator is a content automation engine that runs on GitHub Actions or locally. It:
- Fetches AI compliance news from the FrontOfAI Briefing API and configurable RSS feeds (FTC, EEOC, Google News alerts for EU AI Act, LL144, AI hiring bias, etc.)
- Categorizes each story using OpenAI (GPT-4o) — classifies as news vs. enforcement, assigns impact score, tags, and structured metadata
- Generates MDX articles — 800-1200 word news articles, enforcement action summaries, weekly roundups, and monthly trend analyses
- Publishes to any GitHub repository — clones the target repo, copies MDX files, commits, and pushes
AI Article Generator Your Site Repo
│ │
├─ Fetch FrontOfAI API │
├─ Fetch regulatory RSS feeds │
├─ OpenAI categorize + expand │
├─ Generate blog roundups │
├─ Generate trend analysis │
│ │
└── Push MDX files ──────────────────────► content/*.mdx
│
▼
Vercel/Netlify auto-deploys
git clone https://github.com/subodhkc/AI-Article-Generator.git
cd AI-Article-Generator
npm installCopy .env.example to .env and fill in:
cp .env.example .envOPENAI_API_KEY— Your OpenAI API key (for GPT-4o content generation)TARGET_REPO_TOKEN— GitHub personal access token withreposcope (for pushing to your target site repo)
Edit config/sites.json to point to your repository:
{
"sites": [
{
"name": "my-blog",
"repo": "your-username/your-blog-repo",
"branch": "main",
"contentPath": "src/content",
"baseUrl": "https://yoursite.com",
"siteName": "Your Site Name",
"author": "Your Name",
"authorRole": "AI Analyst",
"logoPath": "/images/logo.png",
"sponsorLink": "",
"sponsorText": "",
"internalLinks": ["/blog", "/guides", "/tools"],
"categories": ["news", "enforcement", "blog", "trends"],
"frontofaiCategories": ["governance-regulation", "security-riskwatch"],
"categoryMapping": {
"governance-regulation": "Compliance",
"security-riskwatch": "AI Security",
"enforcement": "Enforcement"
},
"minImpactScore": 6,
"enabled": true
}
]
}npm testThis fetches 2 stories, generates articles, and writes them to output/ without pushing to your repo.
npm run news # Fetch + categorize + generate news articles
npm run weekly # Generate weekly roundup blog post
npm run trends # Generate monthly trend analysis| Field | Required | Description |
|---|---|---|
name |
Yes | Unique identifier for the site (used in CLI --site= flag) |
repo |
Yes | GitHub repo in owner/repo format |
branch |
Yes | Branch to push to (e.g. main) |
contentPath |
Yes | Path in target repo where MDX files go (e.g. src/content) |
baseUrl |
No | Your site's base URL (used in prompts) |
siteName |
No | Your site's display name (injected into prompts via {{siteName}}) |
author |
No | Author name in frontmatter (default: AI Content Engine) |
authorRole |
No | Author role in frontmatter |
logoPath |
No | Path to logo image for frontmatter |
sponsorLink |
No | Sponsor URL — if set with sponsorText, a contextual CTA is added to articles |
sponsorText |
No | Sponsor link text (e.g. "Get a professional AI compliance audit") |
internalLinks |
No | Array of internal link paths for articles to reference (e.g. ["/blog", "/guides"]) |
categories |
No | Content categories to generate (default: news, enforcement, blog, trends) |
frontofaiCategories |
No | FrontOfAI API categories to fetch (default: governance-regulation, security-riskwatch) |
categoryMapping |
No | Map source categories to your site's categories |
contentSubdir |
No | If set, all articles go in this subdirectory instead of news/ and enforcement/ |
promptsDir |
No | Custom prompts directory (falls back to prompts/ default) |
minImpactScore |
No | Minimum impact score (1-10) for stories (default: 6) |
enabled |
Yes | Set to true to include this site in generation runs |
Contains FrontOfAI API settings and RSS feed definitions. Add your own RSS feeds:
{
"name": "My Custom Feed",
"url": "https://example.com/rss.xml",
"keywords": ["AI", "compliance", "regulation"],
"category": "news"
}To restrict a feed to specific sites only, add a "sites": ["site-name"] array.
All prompts in prompts/ support placeholder tokens that get replaced with your site config values:
| Placeholder | Replaced with |
|---|---|
{{siteName}} |
Your site's display name |
{{baseUrl}} |
Your site's base URL |
{{author}} |
Author name |
{{authorRole}} |
Author role |
{{sponsorLink}} |
Contextual sponsor CTA line (only if sponsorLink + sponsorText are set) |
{{internalLinks}} |
Comma-separated markdown links from internalLinks array |
To fully customize prompts for a specific site, set promptsDir in sites.json and create a directory with your own .txt prompt files. The engine checks your custom directory first, then falls back to the default prompts/ directory.
- Generated from FrontOfAI API and RSS feeds
- 800-1200 words
- Categorized with impact score, tags, source attribution
autoGenerated: truein frontmatter
- Stories classified as enforcement by OpenAI
- Structured frontmatter: entity, violation, framework, penalty, region, status
- Generated every Monday
- 1000-1500 words
- Summarizes top 15 stories from the past week
- Grouped by theme (regulatory, enforcement, industry)
- Generated on the 1st of each month
- 1500-2500 words
- Analyzes patterns across 30+ stories from the past month
- Identifies 3-5 key trends with evidence
Four workflows are included:
| Workflow | Schedule | Description |
|---|---|---|
news-tracker.yml |
Every 4 hours | Fetch FrontOfAI + RSS, categorize, generate news/enforcement articles |
weekly-content.yml |
Every Monday 9:00 UTC | Generate weekly roundup blog post |
monthly-trends.yml |
1st of month 10:00 UTC | Generate monthly trend analysis |
test-dry-run.yml |
Manual only | Dry run — generates 2 articles without pushing |
In your fork's Settings > Secrets and variables > Actions, add:
OPENAI_API_KEY— Your OpenAI API keyTARGET_REPO_TOKEN— GitHub token with write access to your target site repo(s)
All workflows can also be triggered manually via the GitHub Actions UI.
- Uses ONLY source material from FrontOfAI API and RSS feeds — no fabrication
- All AI-generated content is labeled with
autoGenerated: truein frontmatter - Cites primary sources with links
- Does not overwrite existing articles (skips if file exists)
- URL:
https://frontofai.com/api/briefing/v1/stories - Free, no auth, 30 req/min
- 39+ authoritative AI news sources
- Categories:
governance-regulation,security-riskwatch
- FTC press releases
- EEOC newsroom
- Google News alerts for LL144, EU AI Act, AI hiring bias, AI audit, AI app security, prompt injection, OWASP LLM Top 10, and more
This tool is designed to be self-service, but if you need help with:
- Custom integration with your existing CMS or site framework
- Custom prompts tuned for your industry or audience
- Additional RSS sources or data feeds
- Multi-site deployment at scale
- Vercel/Netlify auto-deploy configuration
Contact Subodh KC for consulting and custom setup services.
- Add site config to
config/sites.json - Create a GitHub token with write access to the new repo
- Add the token as a GitHub secret (or reuse
TARGET_REPO_TOKEN) - Run
node scripts/publish.mjs --mode=news --site=your-site-name
MIT — see LICENSE