Catalog Page
Less than 1 minute
VuePress Theme Hope provides catalog component and auto catalog generation using @vuepress/plugin-catalog.
Introduction
This feature is enabled by default. If there is no README.md in the folder, the theme will automatically generate a directory page for it. To disable, set plugins.catalog to false.
import { hopeTheme } from "vuepress-theme-hope";
export default hopeTheme({
plugins: {
catalog: false,
},
});You can control catalog behavior via plugins.catalog in the theme options, for example:
- Exclude some folders from catalog generation via
plugins.catalog.exclude - Control frontmatter generation through
plugins.catalog.frontmatter.
import { hopeTheme } from "vuepress-theme-hope";
export default hopeTheme({
plugins: {
catalog: {
frontmatter: (path) => {
if (path.startsWith("/zh/")) return { title: "目录" };
return { title: "Catalog" };
},
exclude: ["/api/", "/zh/api/"],
},
},
});For detailed configuration, see Catalog plugin docs.
Catalog Component
You can use the <Catalog> component directly in Markdown to display the catalog.
Catalog
Homepage Catalog Demo
<!-- Used to limit height -->
<div class="catalog-display-container">
<Catalog base='/' />
</div>Changelog
6/4/25, 1:34 PM
View All Changelog
1bd5f-on253d1-onbdfcb-on6d493-on05c41-on497db-on1a816-on2f38e-on