Freshman21 is a Jekyll blog theme, base on theme Freshman.
A tribute to WordPress Theme Twenty-Twelve and Twenty-eleven.
Enjoy.
-
master branch: the simplest template, original version.
-
gh-pages branch: master branch with google analytics js template, BackToTop js script, readmore module.
Clone master branch:
git clone https://github.com/yulijia/freshman21.git -b master --single-branch
Clone gh-pages branch:
git clone https://github.com/yulijia/freshman21.git -b gh-pages --single-branch
# please make sure you have already installed git tools and ruby tools(gem)
# make sure use pyenv activate environment
$ gem install sass webrick
$ gem install jekyll jekyll-paginate
$ pip install simiki
- Provide single column and two columns layout
- Powerful configure file
- Comments by Disqus
- Support LaTeX (by MathJax)
- Syntax highlighting
Single column, please see my own blog
Two columns, please see the theme website
An automated blog content generation pipeline that integrates with Logseq for idea capture and uses multiple AI agents to handle different stages of content creation.
- Logseq Integration: Automatically sync content from Logseq to blog drafts
- AI-Powered Content Generation: Multiple specialized agents for research, writing, editing, and social media
- Human Review Process: All AI-generated content goes through human review before publishing
- Multi-Platform Distribution: Automatically generate social media content for X/Twitter, Xiaohongshu, and GitHub
- Python 3.8+
- Git
- Logseq (optional, for idea capture)
- API keys for AI services (Anthropic/OpenAI)
- Clone the repository:
git clone https://github.com/yourusername/your-blog.git
cd your-blog- Install dependencies:
pip install -r requirements.txt- Configure environment:
cp .env.example .env
# Edit .env with your API keys and settings- Set up Logseq sync (optional):
- Configure Logseq Git sync
- Update
logseq_config.jsonwith your Logseq repository path
- Create a draft manually:
# Create a new draft in _drafts/
echo "# My New Post" > _drafts/my-new-post.md-
Generate content using Claude Code:
- Open the draft in your editor
- Use Claude Code to expand, research, or edit the content
- Review and refine the generated content
-
Publish the draft:
# Move from _drafts/ to _posts/ with proper naming
mv _drafts/my-new-post.md _posts/$(date +%Y-%m-%d)-my-new-post.md- Sync from Logseq:
python scripts/logseq_sync.py- Generate content:
python agents/orchestrator.py- Review and manage drafts:
# List drafts for review
python scripts/draft_manager.py list pending
# Approve a draft
python scripts/draft_manager.py approve draft-filename.mdThe simplest and most effective workflow:
-
Start with an idea:
- Write a brief outline or bullet points in
_drafts/ - Include key points, sources, and your perspective
- Write a brief outline or bullet points in
-
Use Claude Code to expand:
# In Claude Code, use commands like: /read _drafts/my-idea.md "Expand this into a full blog post with introduction, body, and conclusion"
-
Review and edit:
- Read the generated content
- Add your personal voice and experiences
- Fact-check any claims or data
-
Publish:
# Move to _posts/ with proper date prefix git add _posts/ git commit -m "Add new post: Title" git push
The _drafts/ directory structure:
_drafts/
├── for_review/ # Drafts ready for human review
├── approved/ # Approved drafts
├── rejected/ # Rejected drafts
└── *.md # Work-in-progress drafts
The repository includes GitHub Actions for:
- Daily Logseq sync (if configured)
- Content generation (when drafts are added)
- Publishing (when drafts are approved)
Both workflows can be triggered manually from the GitHub Actions tab.
- Logseq Integration: Git-based sync for capturing ideas and initial content
- Main Orchestrator Agent: Coordinates the entire pipeline workflow
- Specialized Sub-Agents:
- Research/Outline Agent
- Content Writing Agent
- Editing/Optimization Agent
- Social Media Distribution Agent
- Draft Management: All content goes through
_drafts/folder for human review
├── _drafts/ # AI-generated content awaiting review
│ ├── for_review/ # Drafts ready for human review
│ ├── approved/ # Approved drafts
│ └── rejected/ # Rejected drafts
├── _posts/ # Published blog posts
├── agents/ # AI agent implementations
│ ├── orchestrator.py # Main coordination logic
│ ├── research_agent.py # Research and outline generation
│ ├── writing_agent.py # Content writing
│ ├── editing_agent.py # Editing and optimization
│ ├── social_agent.py # Social media content
│ └── config.py # Configuration
├── scripts/ # Automation scripts
│ ├── logseq_sync.py # Logseq synchronization
│ └── draft_manager.py # Draft lifecycle management
├── .github/workflows/ # GitHub Actions
│ ├── logseq-sync.yml # Automated Logseq sync
│ └── content-generation.yml # Content generation pipeline
├── logseq_config.json # Logseq sync configuration
├── .env.example # Environment variables template
└── requirements.txt # Python dependencies
Create a .env file based on .env.example:
# AI Provider Settings
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-...
# Logseq Settings
LOGSEQ_REPO_PATH=/path/to/logseq
# Blog Settings
BLOG_REPO_PATH=.
DRAFTS_DIR=_drafts
POSTS_DIR=_postsEdit logseq_config.json to customize:
{
"logseq_repo_path": "/path/to/logseq",
"blog_repo_path": ".",
"drafts_dir": "_drafts",
"blog_tags": ["#blog-idea", "#draft", "#blog"],
"asset_extensions": [".png", ".jpg", ".jpeg", ".gif"]
}- Capture ideas in Logseq: Tag pages or blocks with #blog-idea
- Sync to blog: Run
python scripts/logseq_sync.py - Generate content: Run
python scripts/content_pipeline.py - Review drafts: Check
_drafts/for_review/folder - Approve content: Use
python scripts/draft_manager.py approve <filename> - Publish: Approved drafts can be published to
_posts/
# List all drafts
python scripts/draft_manager.py list
# List drafts pending review
python scripts/draft_manager.py list pending
# Move a draft to review folder
python scripts/draft_manager.py review draft-filename.md
# Approve a draft (moves to approved folder)
python scripts/draft_manager.py approve draft-filename.md
# Approve and publish a draft
python scripts/draft_manager.py approve draft-filename.md true
# Reject a draft
python scripts/draft_manager.py reject draft-filename.md "Reason for rejection"
# View analytics
python scripts/draft_manager.py analytics
# Generate review report
python scripts/draft_manager.py reportThe pipeline includes a GitHub Action (.github/workflows/logseq-sync.yml) that:
- Runs daily at 2 AM UTC
- Syncs content from Logseq to blog drafts
- Triggers content generation on new drafts
Both workflows can be triggered manually from the GitHub Actions tab.
To add a new specialized agent:
- Create a new file in
agents/(e.g.,new_agent.py) - Implement the agent class with a
process()method - Add configuration to
agents/config.py - Integrate into the orchestrator in
agents/orchestrator.py
Edit the system prompts in agents/config.py to customize the behavior of each agent. Each agent has its own system prompt that defines its role and responsibilities.
The draft management system tracks:
- Total drafts created
- Approval/rejection rates
- Average review time
- Monthly creation trends
View analytics with:
python scripts/draft_manager.py analytics- API Key Errors: Ensure all API keys are set correctly in
.env - Logseq Sync Issues: Check that the Logseq repository path is correct
- Content Generation Failures: Check the logs in the
logs/directory - Draft Management Errors: Ensure file permissions are correct
Run agents with debug logging:
# Set debug environment variable
export DEBUG=1
python agents/orchestrator.py- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License - see LICENSE file for details
For issues and questions:
- Check the troubleshooting section
- Review the logs in the
logs/directory - Open an issue on GitHub
