mirror of
https://github.com/tiennm99/blog.git
synced 2026-10-14 08:18:00 +00:00
Add mt-add-url meta skill that classifies a URL and auto-dispatches to a handler skill: articles to mt-add-post, YouTube links to the new mt-add-video (Bonus -> Videos with a Vietnamese title + short summary). Unsupported types (image, etc.) prompt the user to add or extend a skill; image support is deferred to a future mt-add-image handler. Shared logic (add-url.js router, url-utils.js, find-newsletter-number.js) and a shared post-mechanics reference live under mt-add-url/. mt-add-post is reduced to an article-only handler. add-url.js detects watch/youtu.be/ shorts, normalizes to the canonical watch URL, dedups by video id, and fetches the title via oEmbed. checkDuplicate uses execFileSync (no shell).
1.7 KiB
1.7 KiB
CLAUDE.md
Guide for Claude Code working with this Hugo blog.
Project Info
- Type: Hugo static site with Vietnamese tech content
- Theme: hugo-theme-stack
- Language: Vietnamese (with common English tech words)
- Timezone: Asia/Ho_Chi_Minh (UTC+7)
Directory Structure
content/post/
└── YYYY/
└── MM/
└── DD/
└── index.md
Starting Local Development Server
hugo server -D
The site will be available at http://localhost:1313
Options:
-Dor--buildDrafts: Include draft content-For--buildFuture: Include future-dated content--disableFastRender: Full re-render on all changes
Skills
This project uses custom skills for automated workflows:
- mt-add-url: Meta entry for adding URLs — classifies each URL and auto-dispatches to the right handler (the default entry when adding URLs to the newsletter)
- mt-add-post: Article handler — adds an article/blog URL to the newsletter main content
- mt-add-video: YouTube handler — adds a YouTube link to the newsletter Bonus → Videos
- mt-add-tags: Add/update tags in Hugo post frontmatter
Shared scripts (add-url.js, url-utils.js, find-newsletter-number.js) and the shared post-mechanics reference live under .claude/skills/mt-add-url/. Image support is planned as a future mt-add-image handler; until then mt-add-url asks how to handle non-article/non-YouTube URLs.
Refer to .claude/skills/ for skill implementations.
Git Workflow Rules
Before any git commit, check all staged content/post/*/index.md files for minimal tags. If any have only ["AI-Assisted"] or empty tags, run the mt-add-tags skill on them first before committing.