mirror of
https://github.com/tiennm99/blog.git
synced 2026-10-14 20:17:02 +00:00
feat(agents): merge all code agent rules into one AGENTS.md
This commit is contained in:
1 parent
38af345830
commit
32295dab6c
4 files changed
+161
-467
No files matched your search
@@ -1,126 +0,0 @@
|
||||
---
|
||||
description:
|
||||
globs: *.md
|
||||
alwaysApply: false
|
||||
---
|
||||
# Newsletter URL Processor
|
||||
|
||||
## Description
|
||||
This rule processes URLs to create or update newsletter posts. When a single URL is provided, it will either create a new newsletter post or append to an existing one. The rule ensures consistent formatting and high-quality content in Vietnamese.
|
||||
|
||||
## Trigger
|
||||
- When a single URL is provided in the message
|
||||
- When multiple URLs are provided in sequence
|
||||
|
||||
## Actions
|
||||
1. URL Processing:
|
||||
- Remove tracking parameters (utm_source, ref, etc.)
|
||||
- Clean and preserve base URL
|
||||
- Extract original article title
|
||||
- Verify URL accessibility
|
||||
- Check for duplicate articles in existing newsletters
|
||||
|
||||
2. Newsletter Creation/Update:
|
||||
- Check for existing newsletter file for current date using one of these methods:
|
||||
```powershell
|
||||
# Method 1: Using Get-Date with explicit format
|
||||
Get-Date -Format "yyyy-MM-dd"
|
||||
|
||||
# Method 2: Using .NET DateTime directly
|
||||
[DateTime]::Now.ToString("yyyy-MM-dd")
|
||||
|
||||
# Method 3: Using date command (if PowerShell fails)
|
||||
date +%Y-%m-%d
|
||||
```
|
||||
- If exists: append new content
|
||||
- If not: create new file with proper structure
|
||||
- Auto-increment newsletter number based on latest existing newsletter
|
||||
|
||||
3. Content Structure:
|
||||
```markdown
|
||||
---
|
||||
title: "Newsletter #[number]"
|
||||
date: [current date using one of the above methods]
|
||||
tags: [ "AI-Assisted", [additional relevant tags] ]
|
||||
categories: [ "Newsletter" ]
|
||||
---
|
||||
|
||||
*Mời bạn thưởng thức Newsletter #[number].*
|
||||
|
||||
## [Original Article Title](mdc:clean_url)
|
||||
|
||||
[Vietnamese summary in professional tone]
|
||||
|
||||
[Optional bullet points for key takeaways]
|
||||
|
||||
[New content URLs and summaries should be added before any bonus sections]
|
||||
```
|
||||
|
||||
4. File Location:
|
||||
- Store in: content/post/YYYY/MM/DD/index.md
|
||||
- Use one of the date methods above for date formatting
|
||||
- Create directory structure if not exists
|
||||
|
||||
## Content Guidelines
|
||||
1. Vietnamese Summaries:
|
||||
- Write in professional, clear Vietnamese
|
||||
- Keep technical terms in English when appropriate
|
||||
- Maintain consistent tone throughout
|
||||
- Length: 2-4 paragraphs for main content
|
||||
- Include key takeaways in bullet points when relevant
|
||||
|
||||
2. Tagging:
|
||||
- Always include "AI-Assisted" tag
|
||||
- Add relevant technical tags (e.g., "Development", "Architecture", "Java")
|
||||
- Use consistent tag naming across newsletters
|
||||
- Maximum 5 tags per newsletter
|
||||
|
||||
3. Formatting:
|
||||
- Use proper markdown syntax
|
||||
- Maintain consistent heading levels
|
||||
- Include proper spacing between sections
|
||||
- Use bullet points for lists
|
||||
- Keep URLs clean and readable
|
||||
|
||||
## Quality Checks
|
||||
1. Content:
|
||||
- Verify URL accessibility
|
||||
- Check for duplicate articles
|
||||
- Ensure proper date formatting
|
||||
- Validate markdown syntax
|
||||
- Maintain consistent formatting
|
||||
- Check Vietnamese language quality
|
||||
- Verify all links are working
|
||||
|
||||
2. Technical:
|
||||
- Validate front matter format
|
||||
- Check directory structure
|
||||
- Verify newsletter number sequence
|
||||
- Ensure proper file naming
|
||||
- Validate date format consistency
|
||||
|
||||
## Example
|
||||
Input: https://example.com/article?utm_source=twitter
|
||||
Output: Creates or updates newsletter post with:
|
||||
- Clean URL: https://example.com/article
|
||||
- Vietnamese summary
|
||||
- Proper front matter
|
||||
- Correct file location
|
||||
- Appropriate tags
|
||||
|
||||
## Error Handling
|
||||
- If URL is inaccessible: Skip and notify
|
||||
- If duplicate found: Skip and notify
|
||||
- If date format invalid: Use current date
|
||||
- If directory creation fails: Notify and abort
|
||||
- If markdown validation fails: Fix and retry
|
||||
|
||||
## Date Handling Troubleshooting
|
||||
If the primary date method fails, try these alternatives in order:
|
||||
1. Use .NET DateTime directly: `[DateTime]::Now.ToString("yyyy-MM-dd")`
|
||||
2. Use date command: `date +%Y-%m-%d`
|
||||
3. Use JavaScript Date object: `new Date().toISOString().split('T')[0]`
|
||||
4. Use Python datetime: `python -c "from datetime import datetime; print(datetime.now().strftime('%Y-%m-%d'))"`
|
||||
|
||||
|
||||
Note: Always verify the date format matches the required "yyyy-MM-dd" pattern before using it in the newsletter.
|
||||
@@ -1,191 +0,0 @@
|
||||
---
|
||||
trigger: glob
|
||||
globs: *.md
|
||||
---
|
||||
|
||||
# AI Agent Newsletter Processor
|
||||
|
||||
## Agent Identity & Role
|
||||
You are an **AI Newsletter Content Manager** specialized in processing URLs and creating Vietnamese newsletter content for a Hugo static website.
|
||||
|
||||
## Core Mission
|
||||
**PRIMARY GOAL**: When given URL(s), automatically create or update daily newsletter posts with Vietnamese summaries, maintaining consistent quality and formatting.
|
||||
|
||||
## Trigger Patterns
|
||||
Execute this rule when detecting:
|
||||
- Single URL in message: `https://...` or `http://...`
|
||||
- Multiple URLs in sequence
|
||||
- Explicit request: "add to newsletter", "process this article"
|
||||
|
||||
## Step-by-Step Execution Workflow
|
||||
|
||||
### STEP 1: URL Analysis & Validation
|
||||
```
|
||||
FOR EACH URL provided:
|
||||
1. Clean URL (remove tracking parameters: utm_*, fbclid, gclid, etc.)
|
||||
2. Verify accessibility (HTTP status 200)
|
||||
3. Extract article title and main content
|
||||
4. Check for duplicates in existing newsletters
|
||||
5. If inaccessible or duplicate → SKIP with notification
|
||||
```
|
||||
|
||||
### STEP 2: Date & File Management
|
||||
```
|
||||
1. Get current date in Vietnam timezone (UTC+7)
|
||||
2. Format as: YYYY-MM-DD (e.g., 2025-05-25)
|
||||
3. Check if newsletter exists: content/post/YYYY/MM/DD/index.md
|
||||
4. If NOT exists → Create new newsletter
|
||||
5. If EXISTS → Prepare to append content
|
||||
```
|
||||
|
||||
### STEP 3: Content Generation
|
||||
Generate Vietnamese summary following this template:
|
||||
|
||||
```markdown
|
||||
## [Original Article Title](clean_url)
|
||||
|
||||
[Vietnamese summary: 2-4 paragraphs, professional tone]
|
||||
|
||||
**Điểm chính:**
|
||||
- [Key point 1 in Vietnamese]
|
||||
- [Key point 2 in Vietnamese]
|
||||
- [Key point 3 in Vietnamese]
|
||||
- [Additional points if relevant]
|
||||
|
||||
---
|
||||
```
|
||||
|
||||
### STEP 4: Newsletter Structure
|
||||
|
||||
#### For NEW newsletter:
|
||||
```markdown
|
||||
---
|
||||
title: "Newsletter #[auto-increment-number]"
|
||||
date: YYYY-MM-DD
|
||||
tags: ["AI-Assisted", "Technology", "Vietnamese"]
|
||||
categories: ["Newsletter"]
|
||||
draft: false
|
||||
---
|
||||
|
||||
*Chào mừng bạn đến với Newsletter #[number] - Tổng hợp tin tức công nghệ hôm nay.*
|
||||
|
||||
[Generated content from Step 3]
|
||||
```
|
||||
|
||||
#### For EXISTING newsletter:
|
||||
```markdown
|
||||
[Append to existing content]
|
||||
|
||||
[Generated content from Step 3]
|
||||
```
|
||||
|
||||
## Content Quality Standards
|
||||
|
||||
### Vietnamese Writing Requirements
|
||||
- **Tone**: Professional, informative, engaging
|
||||
- **Length**: 150-300 words per article summary
|
||||
- **Technical Terms**: Keep English terms for: AI, API, framework names, etc.
|
||||
- **Structure**: Introduction → Main points → Key takeaways
|
||||
- **Avoid**: Direct translation, awkward phrasing, overly casual language
|
||||
|
||||
### Formatting Standards
|
||||
- Use proper markdown syntax
|
||||
- Maintain consistent heading levels (## for article titles)
|
||||
- Clean, readable URLs without tracking parameters
|
||||
- Proper spacing between sections
|
||||
- Vietnamese diacritics must be correct
|
||||
|
||||
### Tagging Rules
|
||||
- **Required tags**: "AI-Assisted"
|
||||
- **Recommended tags**: Based on content (max 4 additional)
|
||||
- "Technology", "AI", "Programming", "Business", "Science"
|
||||
- **Categories**: Always ["Newsletter"]
|
||||
|
||||
## File System Operations
|
||||
|
||||
### Directory Structure
|
||||
```
|
||||
content/
|
||||
└── post/
|
||||
└── YYYY/
|
||||
└── MM/
|
||||
└── DD/
|
||||
└── index.md
|
||||
```
|
||||
|
||||
### File Creation Logic
|
||||
1. Create missing directories automatically
|
||||
2. Use consistent naming: `index.md`
|
||||
3. Ensure proper file permissions
|
||||
4. Validate Hugo front matter syntax
|
||||
|
||||
## Error Handling & Recovery
|
||||
|
||||
### Common Issues & Solutions
|
||||
- **URL inaccessible**: Skip with notification, continue with other URLs
|
||||
- **Duplicate content**: Notify user, skip duplicate
|
||||
- **Invalid date**: Use system date as fallback
|
||||
- **Directory creation failed**: Retry with elevated permissions
|
||||
- **Content extraction failed**: Use URL title as fallback, add manual review flag
|
||||
|
||||
### Fallback Mechanisms
|
||||
```
|
||||
1. Primary: Web scraping with full content
|
||||
2. Fallback 1: Use meta description + title
|
||||
3. Fallback 2: Create placeholder with URL for manual review
|
||||
4. Always: Notify user of any fallbacks used
|
||||
```
|
||||
|
||||
## Newsletter Numbering System
|
||||
- Start from Newsletter #1 if no existing newsletters
|
||||
- Auto-increment based on existing newsletter count
|
||||
- Format: "Newsletter #[number]" (e.g., "Newsletter #42")
|
||||
|
||||
## Validation Checklist
|
||||
Before finalizing, verify:
|
||||
- [ ] Valid Hugo front matter
|
||||
- [ ] Correct Vietnamese grammar and diacritics
|
||||
- [ ] Clean URLs (no tracking parameters)
|
||||
- [ ] Proper markdown syntax
|
||||
- [ ] Consistent date format (YYYY-MM-DD)
|
||||
- [ ] Required tags present
|
||||
- [ ] Newsletter number is correct
|
||||
- [ ] File saved in correct directory structure
|
||||
|
||||
## Response Format
|
||||
After processing, provide this summary:
|
||||
```
|
||||
✅ Newsletter Processing Complete
|
||||
|
||||
📄 File: content/post/YYYY/MM/DD/index.md
|
||||
📊 Action: [Created new | Updated existing] Newsletter #[number]
|
||||
🔗 URLs processed: [count]
|
||||
⚠️ Skipped: [count] (duplicates/inaccessible)
|
||||
📝 Vietnamese summaries: [count] generated
|
||||
|
||||
Next steps: Review content and publish when ready.
|
||||
```
|
||||
|
||||
## Advanced Features
|
||||
|
||||
### Content Enhancement
|
||||
- Extract and include relevant images when possible
|
||||
- Add reading time estimates
|
||||
- Include source publication names
|
||||
- Detect and tag content categories automatically
|
||||
|
||||
### SEO Optimization
|
||||
- Generate SEO-friendly slugs
|
||||
- Add meta descriptions in Vietnamese
|
||||
- Ensure proper heading hierarchy
|
||||
- Include relevant internal linking suggestions
|
||||
|
||||
## Commands for Manual Override
|
||||
- `--force-update`: Update existing content even if duplicate
|
||||
- `--no-summary`: Add URL without summary (placeholder)
|
||||
- `--custom-date=YYYY-MM-DD`: Use specific date instead of today
|
||||
- `--newsletter-number=N`: Use specific newsletter number
|
||||
|
||||
---
|
||||
|
||||
**Remember**: Always prioritize Vietnamese content quality over speed. Better to take time creating good summaries than rushing poor translations.
|
||||
@@ -0,0 +1,160 @@
|
||||
# AGENTS.md
|
||||
|
||||
This file provides guidance to AI code assistants when working with this Hugo-based blog repository (miti99.com).
|
||||
|
||||
## Project Overview
|
||||
|
||||
- **Type**: Hugo static site blog with Vietnamese content
|
||||
- **Theme**: hugo-theme-stack
|
||||
- **Focus**: Technology newsletters, programming tutorials, technical insights
|
||||
- **Language**: Vietnamese (with English technical terms where appropriate)
|
||||
- **Timezone**: Asia/Ho_Chi_Minh (UTC+7)
|
||||
|
||||
## Quick Commands
|
||||
|
||||
```bash
|
||||
hugo server --gc # Local development server
|
||||
hugo --gc --minify # Production build
|
||||
```
|
||||
|
||||
## Directory Structure
|
||||
|
||||
```
|
||||
content/
|
||||
└── post/
|
||||
└── YYYY/
|
||||
└── MM/
|
||||
└── DD/
|
||||
├── index.md # Blog post content
|
||||
├── img/ # Images for the post
|
||||
├── doc/ # PDFs and documents
|
||||
└── data/ # Data files
|
||||
```
|
||||
|
||||
## Newsletter URL Processing Workflow
|
||||
|
||||
When given URLs, automatically create or update daily newsletter posts with Vietnamese summaries.
|
||||
|
||||
### Step 1: URL Processing
|
||||
1. **Clean URL**: Remove tracking parameters (utm_*, fbclid, gclid, ref, etc.)
|
||||
2. **Verify**: Check if URL is accessible (HTTP 200)
|
||||
3. **Extract**: Get article title and main content
|
||||
4. **Check duplicates**: Ensure not already covered in existing newsletters
|
||||
5. **Skip if**: Inaccessible or duplicate (notify user)
|
||||
|
||||
### Step 2: Newsletter Management
|
||||
1. **Get date**: Current date in YYYY-MM-DD format
|
||||
2. **Check existing**: Look for `content/post/YYYY/MM/DD/index.md`
|
||||
3. **If exists**: Append new content before any bonus sections
|
||||
4. **If new**: Create newsletter with auto-incremented number
|
||||
|
||||
### Step 3: Content Structure
|
||||
|
||||
#### New Newsletter Template
|
||||
```markdown
|
||||
---
|
||||
title: "Newsletter #[number]"
|
||||
date: YYYY-MM-DD
|
||||
tags: ["AI-Assisted", "Technology", "relevant-tag-3", "relevant-tag-4"]
|
||||
categories: ["Newsletter"]
|
||||
---
|
||||
|
||||
*Mời bạn thưởng thức Newsletter #[number].*
|
||||
|
||||
## [Original Article Title](clean_url)
|
||||
|
||||
[Vietnamese summary: 2-4 paragraphs, professional tone]
|
||||
|
||||
**Điểm chính:**
|
||||
- [Key point 1 in Vietnamese]
|
||||
- [Key point 2 in Vietnamese]
|
||||
- [Key point 3 in Vietnamese]
|
||||
```
|
||||
|
||||
#### Appending to Existing Newsletter
|
||||
Add new article section before any bonus content, maintaining the same format as above.
|
||||
|
||||
## Vietnamese Writing Guidelines
|
||||
|
||||
### Language Rules
|
||||
- **Primary**: Write in Vietnamese first
|
||||
- **Keep English for**:
|
||||
- Technology names (React, Java, Python)
|
||||
- Acronyms (API, REST, HTTP)
|
||||
- Code examples and commands
|
||||
- Common tech terms junior devs know (dev, web, code, framework, debug, etc.)
|
||||
|
||||
### Content Standards
|
||||
- **Target audience**: Junior developers
|
||||
- **Tone**: Professional but accessible
|
||||
- **Length**: 150-300 words per article summary
|
||||
- **Structure**: Introduction → Main points → Key takeaways
|
||||
|
||||
## Tagging Guidelines
|
||||
- **Required**: "AI-Assisted" (for newsletter posts)
|
||||
- **Maximum**: 6-7 tags per post
|
||||
- **Selection**: Use common, existing tags that represent the whole post
|
||||
- **Categories**: Always ["Newsletter"] for newsletter posts
|
||||
|
||||
## Configuration Files
|
||||
|
||||
```
|
||||
config/_default/
|
||||
├── hugo.yml # Main Hugo configuration
|
||||
├── params.yml # Theme parameters
|
||||
├── menu.yml # Site navigation
|
||||
└── languages.yml # Language settings
|
||||
```
|
||||
|
||||
## Quality Checklist
|
||||
|
||||
Before finalizing any content:
|
||||
- [ ] Valid Hugo front matter (YAML format)
|
||||
- [ ] Correct Vietnamese grammar and diacritics
|
||||
- [ ] Clean URLs (no tracking parameters)
|
||||
- [ ] Proper markdown syntax
|
||||
- [ ] Date format: YYYY-MM-DD
|
||||
- [ ] Required tags present
|
||||
- [ ] Newsletter number is sequential
|
||||
- [ ] File in correct directory structure
|
||||
|
||||
## Error Handling
|
||||
|
||||
| Issue | Solution |
|
||||
|-------|----------|
|
||||
| URL inaccessible | Skip and notify user |
|
||||
| Duplicate content | Skip and notify user |
|
||||
| Date format error | Use current date as fallback |
|
||||
| Directory creation failed | Create structure and retry |
|
||||
| Content extraction failed | Use title as fallback, flag for review |
|
||||
|
||||
## Response Format
|
||||
|
||||
After processing URLs, provide summary:
|
||||
```
|
||||
✅ Newsletter Processing Complete
|
||||
|
||||
📄 File: content/post/YYYY/MM/DD/index.md
|
||||
📊 Action: [Created new | Updated existing] Newsletter #[number]
|
||||
🔗 URLs processed: [count]
|
||||
⚠️ Skipped: [count] (reason)
|
||||
|
||||
Next steps: Review content and publish when ready.
|
||||
```
|
||||
|
||||
## Best Practices for Code Agents
|
||||
|
||||
1. **Always verify** file paths before making changes
|
||||
2. **Follow** established directory structure
|
||||
3. **Maintain** consistency with existing content
|
||||
4. **Test locally** using `hugo server --gc`
|
||||
5. **Preserve** front matter structure in markdown files
|
||||
6. **Use relative paths** for internal links and assets
|
||||
7. **Check Vietnamese** grammar and diacritics
|
||||
8. **Validate** markdown syntax before saving
|
||||
|
||||
## Additional Resources
|
||||
|
||||
- Newsletter processing rules: `.cursor/rules/newsletter_processor.mdc`
|
||||
- Hugo documentation: https://gohugo.io/documentation/
|
||||
- Theme documentation: https://github.com/CaiJimmy/hugo-theme-stack
|
||||
@@ -1,150 +1 @@
|
||||
# CLAUDE.md
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||
|
||||
## Project Overview
|
||||
|
||||
This is a Hugo-based static site blog (miti99.com) built with the hugo-theme-stack theme. The blog features Vietnamese content with a focus on technology newsletters, programming tutorials, and technical insights.
|
||||
|
||||
## Development Commands
|
||||
|
||||
### Build and Development
|
||||
- **Local development server**: `hugo server --gc`
|
||||
- **Production build**: `hugo --gc --minify`
|
||||
- **Development with theme debugging**: `cd themes/hugo-theme-stack && ./debug.sh`
|
||||
|
||||
### Docker Commands
|
||||
- **Build image**: `docker build -t miti99-blog .`
|
||||
- **Run container**: `docker run -p 80:80 miti99-blog`
|
||||
|
||||
## Content Structure
|
||||
|
||||
### Blog Posts
|
||||
- Posts are located in `content/post/YYYY/MM/DD/index.md`
|
||||
- Each post follows Hugo front matter format with title, date, tags, and categories
|
||||
- Images and assets are stored alongside posts in `img/` subdirectories
|
||||
- Additional resources (PDFs, data files) stored in `doc/` and `data/` subdirectories
|
||||
|
||||
### Newsletter Posts
|
||||
- Newsletter posts use a specific format with numbered titles (e.g., "Newsletter #26")
|
||||
- Always include "AI-Assisted" tag and "Newsletter" category
|
||||
- Content is written in Vietnamese with professional tone
|
||||
- Follow the structure defined in `.cursor/rules/newsletter_processor.mdc`
|
||||
|
||||
### Content Creation Guidelines
|
||||
- Use Vietnamese language for main content
|
||||
- Keep technical terms in English when appropriate
|
||||
- Include relevant tags (max 6-7 per post, use common tags that represent the whole post)
|
||||
- Maintain consistent date format: YYYY-MM-DD
|
||||
- Store assets in appropriate subdirectories within post folders
|
||||
|
||||
## Hugo Configuration
|
||||
|
||||
### Key Configuration Files
|
||||
- `config/_default/hugo.yml` - Main Hugo configuration
|
||||
- `config/_default/params.yml` - Theme parameters
|
||||
- `config/_default/menu.yml` - Site navigation
|
||||
- `config/_default/languages.yml` - Language settings
|
||||
|
||||
### Important Settings
|
||||
- Base URL: https://miti99.com
|
||||
- Language: Vietnamese (vi)
|
||||
- Timezone: Asia/Ho_Chi_Minh
|
||||
- Theme: hugo-theme-stack
|
||||
- Pagination: 5 posts per page
|
||||
|
||||
## Newsletter Processing Workflow
|
||||
|
||||
The repository includes a Cursor rule for automated newsletter processing located in `.cursor/rules/newsletter_processor.mdc`. This rule:
|
||||
|
||||
1. Processes URLs to create/update newsletter posts
|
||||
2. Removes tracking parameters from URLs
|
||||
3. Creates Vietnamese summaries of articles
|
||||
4. Maintains consistent formatting and structure
|
||||
5. Auto-increments newsletter numbers
|
||||
6. Handles date formatting and file organization
|
||||
|
||||
When working with newsletter content, follow the established pattern and ensure compliance with the processing rules.
|
||||
|
||||
## URL Processing Workflow
|
||||
|
||||
When a URL is provided, Claude should automatically process it according to these rules:
|
||||
|
||||
### URL Processing Steps
|
||||
1. **Clean URL**: Remove tracking parameters (utm_source, ref, etc.)
|
||||
2. **Verify accessibility**: Check if URL is reachable
|
||||
3. **Extract content**: Get original article title and content
|
||||
4. **Check duplicates**: Ensure article hasn't been covered in existing newsletters
|
||||
5. **Date handling**: Use current date in YYYY-MM-DD format
|
||||
|
||||
### Newsletter Creation/Update Logic
|
||||
- **Check existing**: Look for newsletter file for current date in `content/post/YYYY/MM/DD/index.md`
|
||||
- **If exists**: Append new article section before any bonus content
|
||||
- **If new**: Create new newsletter with auto-incremented number
|
||||
- **Directory structure**: Create YYYY/MM/DD structure if needed
|
||||
|
||||
### Content Structure for URL Processing
|
||||
```markdown
|
||||
---
|
||||
title: "Newsletter #[number]"
|
||||
date: [current date YYYY-MM-DD]
|
||||
tags: [ "AI-Assisted", [additional relevant tags] ]
|
||||
categories: [ "Newsletter" ]
|
||||
---
|
||||
|
||||
*Mời bạn thưởng thức Newsletter #[number].*
|
||||
|
||||
## [Original Article Title](clean_url)
|
||||
|
||||
[Vietnamese summary in professional tone - 2-4 paragraphs]
|
||||
|
||||
[Optional bullet points for key takeaways]
|
||||
```
|
||||
|
||||
### Quality Standards for URL Processing
|
||||
- Write Vietnamese summaries in professional tone
|
||||
- **Language Guidelines**: Use Vietnamese as primary language, only keep essential technical terms in English (like API, framework names, specific technologies). Avoid overusing English terms that have good Vietnamese equivalents
|
||||
- **Target Audience**: Write for junior developers - use accessible language and explain complex concepts clearly
|
||||
- **Technical Term Usage**: Prefer Vietnamese equivalents when they exist and are commonly understood (e.g., "bộ thu gom rác" instead of "garbage collector", "tái cấu trúc" instead of "refactoring", "mùi mã" instead of "code smells")
|
||||
- Include "AI-Assisted" tag and "Newsletter" category
|
||||
- Maximum 6-7 tags per newsletter, use common tags that represent the whole post content
|
||||
- **Tag Selection Guidelines**: Choose tags that are commonly used across the blog, represent the main topics/technologies discussed in the post, and help readers find related content. Avoid overly specific or one-off tags.
|
||||
- Maintain consistent formatting and structure
|
||||
- Verify all links work properly
|
||||
|
||||
### Vietnamese Writing Guidelines
|
||||
- **Primary principle**: Write in Vietnamese first, use English technical terms only when necessary
|
||||
- **Common replacements**:
|
||||
- "framework" → "khung làm việc" (when context allows)
|
||||
- "refactoring" → "tái cấu trúc mã"
|
||||
- "code smells" → "mùi mã"
|
||||
- "error messages" → "thông báo lỗi"
|
||||
- "big tech companies" → "các công ty công nghệ lớn"
|
||||
- "engineers" → "kỹ sư" or "lập trình viên"
|
||||
- "workload" → "ứng dụng" or "tải công việc"
|
||||
- "migration" → "di chuyển"
|
||||
- "embedding models" → "mô hình nhúng"
|
||||
- **Keep English for**: Specific technology names (React, Java, ZGC), widely-used acronyms (API, REST, HTTP), code examples and commands
|
||||
- **Tone**: Professional but accessible, suitable for junior developers learning new concepts
|
||||
|
||||
### Error Handling
|
||||
- Skip inaccessible URLs and notify
|
||||
- Skip duplicate articles and notify
|
||||
- Use fallback date methods if primary fails
|
||||
- Create directory structure as needed
|
||||
|
||||
## File Organization
|
||||
|
||||
- `content/` - All markdown content and assets
|
||||
- `config/` - Hugo configuration files
|
||||
- `layouts/` - Custom layout overrides
|
||||
- `static/` - Static assets served at site root
|
||||
- `themes/hugo-theme-stack/` - Theme files (do not modify directly)
|
||||
- `public/` - Generated site output (ignored in development)
|
||||
|
||||
## Deployment
|
||||
|
||||
The site uses a multi-stage Docker build:
|
||||
1. Build stage using Hugo v0.140.2 to generate static files
|
||||
2. Runtime stage using nginx:alpine to serve content
|
||||
3. Final image exposes port 80 for web traffic
|
||||
@AGENTS.md
|
||||
Reference in new issue
Block a user