主题配置:主页 {#theme-config-homepage}

VitePress 提供了主页布局,要启用它,请在根页面 index.mdYAML frontmatter 中指定 home:true 和一些其他的 metadata。这是一个展示它如何起作用的例子:

  1. ---
  2. home: true
  3. heroImage: /logo.png
  4. heroAlt: Logo image
  5. heroText: Hero Title
  6. tagline: Hero subtitle
  7. actionText: Get Started
  8. actionLink: /guide/
  9. features:
  10. - title: Simplicity First
  11. details: Minimal setup with markdown-centered project structure helps you focus on writing.
  12. - title: Vue-Powered
  13. details: Enjoy the dev experience of Vue + webpack, use Vue components in markdown, and develop custom themes with Vue.
  14. - title: Performant
  15. details: VitePress generates pre-rendered static HTML for each page, and runs as an SPA once a page is loaded.
  16. footer: MIT Licensed | Copyright © 2019-present Evan You
  17. ---