🌟 Useful ai tools for blog framework like Hexo, Hugo, etc, as long as you manage your blog with markdown format. 简体中文
- 🎯 Generate seo content (title, description, keywords) for blog posts in markdown format
- 📝 Generate ai summary for blog posts
- 🌍 Translate blog posts to multiple languages
- 🛠️ Support blog framework like Hexo, Hugo, etc.
- 🌐 Support multiple language
- 🧠 Support multiple AI model like OpenAI, Qwen, Llama, etc. As long as the model provides openai-compatible API.
Tips: You can get free LLM model (Qwen, Gemini, Llama, etc.) from Cloudflare or Openrouter
pip install blog-ai-tool
Download the example config file and modify it to your needs. Put the config file in your blog root directory (the same level as as your blog config file), then run the command.
# Using default config file
python -m blog-ai-tool
# Using custom config file
python -m blog-ai-tool --config my-config.toml
# Override specific settings
python -m blog-ai-tool --directory content/posts --model gpt-4
Disclaimer: AI may destory your blog, please use git to backup your blog before use. Also, its not recommended to use this tool without reviewing the generated content. Always check the generated content before publishing. The best time to use this tool is right after you have written the blog post, before publishing.
from blog-ai-tool import HugoBlogProcessor, load_config
# Load configuration
config = load_config("blog-ai-tool.toml")
# Initialize processor
processor = HugoBlogProcessor(
api_key="your-api-key",
base_url="https://api.openai.com/v1",
model="gpt-4",
language="auto",
config=config
)
# Process a single file
processor.process_markdown("path/to/post.md")
We sincerely welcome any contributions to this project. Please feel free to submit your ideas and suggestions.
This project is built with uv, you can install the dependencies and run the project with the following command:
uv venv # create virtual environment
uv sync # install dependencies
uv run blog-ai-tool/main.py # run the project
MIT