Chuyển đến nội dung
Skillpedia
Tài liệu kỹ thuật6.0k · #14446

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.md

Sao 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

Hãy dùng skill này để giúp tôi: https://github.com/antfu/skills/blob/main/skills/vitepress/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

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 .md files
  • 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.ts for 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

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự