Skip to main content

Thanh bên VitePress

VitePress Sidebar là một plugin dành cho VitePress giúp tự động cấu hình và quản lý thanh bên của trang bằng các thiết lập đơn giản.

  • ⚡️ Được tối ưu hóa cho phiên bản mới nhất của VitePress
  • ⚡️ Dễ sử dụng, nhiều tùy chọn để tùy chỉnh theo ý thích của bạn
  • ⚡️ Kích thước tệp bundle nhẹ
  • ⚡️ Hỗ trợ nhiều thanh bên
  • ⚡️ Hỗ trợ phần đầu
  • ⚡️ Hỗ trợ TypeScript
  • ⚡️ Tùy chỉnh menu để sắp xếp, chuyển đổi ký tự đặc biệt, lọc tệp và thư mục, v.v.!

Tài liệu (Bắt đầu & Tất cả danh sách tùy chọn)

Cài đặt và sử dụng gói và xác định tất cả các phương thức tiện ích có thể được tìm thấy trên trang tài liệu bên dưới: https://vitepress-sidebar.cdget.com/guide/getting-started

import { generateSidebar } from 'vitepress-sidebar';

export default {
themeConfig: {
sidebar: generateSidebar({
/*
* For detailed instructions, see the links below:
* https://vitepress-sidebar.cdget.com/guide/api
*/
// documentRootPath: '/',
// scanStartPath: null,
// basePath: null,
// resolvePath: null,
// useTitleFromFileHeading: true,
// useTitleFromFrontmatter: true,
// frontmatterTitleFieldName: 'title',
// useFolderTitleFromIndexFile: false,
// useFolderLinkFromIndexFile: false,
// hyphenToSpace: true,
// underscoreToSpace: true,
// capitalizeFirst: false,
// capitalizeEachWords: false,
// collapsed: true,
// collapseDepth: 2,
// sortMenusByName: false,
// sortMenusByFrontmatterOrder: false,
// sortMenusByFrontmatterDate: false,
// sortMenusOrderByDescending: false,
// sortMenusOrderNumericallyFromTitle: false,
// sortMenusOrderNumericallyFromLink: false,
// sortFolderTo: null,
// frontmatterOrderDefaultValue: 0,
// manualSortFileNameByPriority: ['first.md', 'second', 'third.md'],
// removePrefixAfterOrdering: false,
// prefixSeparator: '.',
// excludeFilesByFrontmatterFieldName: 'exclude',
// includeDotFiles: false,
// includeRootIndexFile: false,
// includeFolderIndexFile: false,
// includeEmptyFolder: false,
// rootGroupText: 'Contents',
// rootGroupLink: 'https://github.com/jooy2',
// rootGroupCollapsed: false,
// convertSameNameSubFileToGroupIndexPage: false,
// folderLinkNotIncludesFileName: false,
// keepMarkdownSyntaxFromTitle: false,
// debugPrint: false,
})
}
};

Sử dụng trong thế giới thực

VitePress Sidebar được sử dụng trong nhiều môi trường dự án khác nhau, bao gồm cả dịch vụ web của riêng tôi.