vitepress
Skill này làm gì
Skill này giải thích cách làm website tài liệu bằng VitePress, một công cụ biến file Markdown thành các trang web tĩnh nhanh. Skill dành cho các nhóm muốn có một trang tài liệu rõ ràng mà không cần thiết lập phức tạp.
Khi nào nên dùng
- ✓Khi bạn muốn xây dựng một website tài liệu từ các file Markdown.
- ✓Khi bạn cần thiết lập cấu hình site hoặc tùy chỉnh theme.
- ✓Khi bạn muốn thêm component Vue vào các trang Markdown.
Liên kết skill
https://github.com/antfu/skills/blob/main/skills/vitepress/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tạo một website tài liệu VitePress cho dự án của tôi với thanh bên và ô tìm kiếm.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent kiểm tra cấu hình site và các thư mục theme, rồi viết các trang Markdown và thiết lập để VitePress biến thành một site tĩnh nhanh.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
VitePress is a Static Site Generator (SSG) built on Vite and Vue 3. It takes Markdown content, applies a theme, and generates static HTML that becomes an SPA for fast navigation. Perfect for documentation, blogs, and marketing sites.
Key Characteristics:
- File-based routing with
.mdfiles - Vue components work directly in Markdown
- Fast HMR with instant updates (<100ms)
- Default theme optimized for documentation
- Built-in search (local or Algolia)
Before working with VitePress projects:
- Check
.vitepress/config.tsfor site configuration - Look at
.vitepress/theme/for custom theme extensions - The
public/directory contains static assets served as-is
The skill is based on VitePress 2.0.0-alpha.20, generated at 2026-09-25.
VitePress 2 notes (v1 → v2): install with vitepress@next; requires Node.js 22+. defineConfigWithTheme is deprecated — use defineConfig<ThemeConfig>. Native RTL support (dir option, CSS logical properties) replaces the old PostCSS-plugin approach. Built-in iconify pipeline (icons config, useIcon/VPIcon, collection:name social icons). New assetsBase (CDN) and assetsShards build options; metaChunk removed. Markdown image.lazyLoading renamed to image.lazyLoad.
Core
| Topic | Description | Reference |
|---|---|---|
| Configuration | Config file setup, defineConfig, site metadata | core-config |
| CLI | Command-line interface: dev, build, preview, init | core-cli |
| Routing | File-based routing, source directory, rewrites | core-routing |
| Markdown | Frontmatter, containers, tables, anchors, includes | core-markdown |
Features
Code & Content
| Topic | Description | Reference |
|---|---|---|
| Code Blocks | Syntax highlighting, line highlighting, diffs, focus | features-code-blocks |
| Vue in Markdown | Components, script setup, directives, templating | features-vue |
| Data Loading | Build-time data loaders, createContentLoader | features-data-loading |
| Dynamic Routes | Generate pages from data, paths loader files | features-dynamic-routes |
Theme
| Topic | Description | Reference |
|---|---|---|
| Theme Config | Nav, sidebar, search, social links, footer | theme-config |
| Customization | CSS variables, slots, fonts, global components | theme-customization |
| Custom Theme | Building themes from scratch, theme interface | theme-custom |
Advanced
| Topic | Description | Reference |
|---|---|---|
| Internationalization | Multi-language sites, locale configuration | advanced-i18n |
| SSR Compatibility | Server-side rendering, ClientOnly, dynamic imports | advanced-ssr |
Recipes
| Topic | Description | Reference |
|---|---|---|
| Deployment | GitHub Pages, Netlify, Vercel, Cloudflare, Nginx | recipes-deploy |
Câu hỏi thường gặp
Tôi cần gì để chạy VitePress?
Hướng dẫn nói VitePress 2 cần Node.js 22 trở lên.
Có tìm kiếm không?
Có. VitePress có sẵn tìm kiếm cục bộ, và cũng có thể dùng tìm kiếm Algolia.
File tĩnh được đặt ở đâu?
Các file trong thư mục public được phục vụ đúng như chúng là.
Chi tiết
Mô tả gốc của tác giả
VitePress static site generator powered by Vite and Vue. Use when building documentation sites, configuring themes, or writing Markdown with Vue components.
repo: antfu/skills
Độ phổ biến
- Sao GitHub
- 6.0k
- Vị trí xếp hạng
- #14446
- Giấy phép
- MIT
- Cập nhật
- 30/10/2026
Bình luận
- …
Thêm skill từ kho mã này
antfu-create-pr
6.0kGiúp agent của bạn mở một pull request GitHub rõ ràng từ nhánh của bạn, với bản tóm tắt đơn giản về những gì đã thay đổi và lý do.
antfu-issue-triage
6.0kGiúp agent của bạn rà soát các issue và pull request GitHub đang mở, phát hiện trùng lặp và mục đã sửa, rồi hỏi bạn trước khi hành động.
antfu-query
6.0kCho phép agent của bạn hỏi bạn từng bước về một kế hoạch hoặc ý tưởng cho đến khi hai bên cùng hiểu rõ và đã được kiểm chứng.
antfu-simplify
6.0kGiúp agent của bạn rút gọn các thay đổi code về phiên bản nhỏ nhất nhưng vẫn đúng, bằng cách bỏ những phần không cần thiết.
Skill tương tự
technical-documentation
394kGiúp agent của bạn viết và rà soát tài liệu kỹ thuật cùng file hướng dẫn cho agent, rõ ràng để mọi người và công cụ AI đều dễ làm theo.
architecture-decision-records
280kGiúp agent của bạn ghi lại các quyết định quan trọng về cấu trúc dự án, giúp hiểu lý do đằng sau các lựa chọn và giữ lịch sử thay đổi rõ ràng.
code-tour
280kGiúp agent của bạn tạo các hướng dẫn đọc code từng bước, có tham chiếu chính xác đến file và dòng, hữu ích cho phần giới thiệu, giải thích và rà soát.