AI-powered platform that fetches, rewrites, and publishes news in markdown for static sites.
AutoJourno-AI is an intelligent, autonomous news article generation engine that fetches real-time news from global sources, rewrites them in a human-like markdown format, and organizes them neatly for static publishing via Hugo. This system is designed for developers, journalists, media startups, and digital publication platforms.
- Automated News Fetching: Gathers the latest news using APIs based on keywords, categories, or regions.
- AI-Powered Rewriting: Leverages a Small Language Model (SLM) to transform headlines and summaries into unique, well-structured articles.
- Template-Based Formatting: Uses Jinja2 templates to ensure all articles have consistent markdown structure and Hugo front matter.
- Seamless Hugo Integration: Automatically pushes generated articles into a Hugo project's content directory for instant deployment.
The system follows a simple, four-step pipeline to automate content creation:
[Fetch News (news_fetcher.py)] → [Rewrite with SLM (slm_writer.py)] → [Generate Article (generate_article.py)] → [Publish to Hugo (hugo_publisher.py)]
autojourno-ai/
├── main.py # Entry point for running the full pipeline
├── requirements.txt # Python dependencies
├── config.ini # Configuration file for API keys and settings
├── data/ # (Optional) Placeholder for storing input or fetched data
├── layouts/page/ # Hugo-specific layout overrides (if used)
├── models/
│ └── slm_writer.py # SLM (Small Language Model) for rewriting fetched news
├── output/
│ └── *.md # Generated markdown articles
├── templates/
│ └── article_template.md.j2 # Jinja2 template for formatting news content
├── utils/
│ ├── generate_article.py # Converts fetched news to formatted articles
│ ├── hugo_publisher.py # Pushes articles into Hugo’s content folder
│ └── news_fetcher.py # News scraping using APIs (e.g., NewsAPI)
├── venv/ # Local Python virtual environment
└── hugo.zip # Static Hugo site template (can be extracted for deployment)- Python 3.10+
pipandvenv- Hugo (for static site generation)
- A News API Key (e.g., from NewsAPI.org)
-
Clone the repository:
git clone [https://github.com/yourusername/autojourno-ai.git](https://github.com/yourusername/autojourno-ai.git) cd autojourno-ai -
Create and activate the virtual environment:
# For macOS/Linux python3 -m venv venv source venv/bin/activate # For Windows python -m venv venv venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Configure the system:
- Rename
config.ini.exampletoconfig.ini(or create it). - Add your API key and other settings:
[news_api] api_key = YOUR_NEWS_API_KEY_HERE keywords = AI, technology, SpaceX, startups [hugo] content_path = my-hugo-site/content/news/
- Rename
Execute the main script to run all modules in sequence:
python main.pyYou can also run each step of the process independently.
-
Fetch news from the API:
python utils/news_fetcher.py
-
Generate markdown articles from fetched data:
python utils/generate_article.py
-
Publish generated articles to your Hugo site:
python utils/hugo_publisher.py
Generated articles will appear in the output/ directory with URL-friendly filenames:
output/
├── elon-musks-spacex-might-invest-2-billion-in-musks-xai.md
├── study-warns-of-significant-risks-in-using-ai-therapy-chatbots.md
└── meta-acquires-voice-startup-play-ai.md
Each .md file is formatted and ready to be placed in your Hugo site’s content/news/ folder.
To deploy your news site with the generated content:
-
Unzip the Hugo template:
unzip hugo.zip -d my-hugo-site cd my-hugo-site -
Ensure articles are in place: The
hugo_publisher.pyscript will have already moved the articles intomy-hugo-site/content/news/. -
Serve or build the site with Hugo:
# Serve locally for testing hugo server # Build the static site for deployment hugo
The final site will be in the
public/directory, ready to be deployed to Netlify, Vercel, GitHub Pages, or any static host.
- News Aggregator Sites: Automate content creation from top headlines.
- Tech Newsletters: Generate markdown-ready content to plug into email platforms.
- Personal AI Blog: Auto-blog on specific topics or industries.
- SEO Optimization: Generate trending content quickly to improve site ranking.
This project is released under a Custom License. Please see the LICENSE file for more details.
Balasubrahmanya A G
- Computer Science & Engineering Student
- Tech Enthusiast
- 📧 Email: subrahmanyaprasad23balu@gmail.com
- 🔗 LinkedIn: https://www.linkedin.com/in/balasubrahmanya-a-g-77965628b/