diff --git a/docs/reference/default-theme-home-page.md b/docs/reference/default-theme-home-page.md index b44c2e6b79bb..f7baecca0138 100644 --- a/docs/reference/default-theme-home-page.md +++ b/docs/reference/default-theme-home-page.md @@ -166,3 +166,30 @@ type FeatureIcon = height: string } ``` + +## Markdown Content + +You can add additional content to your site's homepage just by adding Markdown below the `---` frontmatter divider. + +````md +--- +layout: home + +hero: + name: VitePress + text: Vite & Vue powered static site generator. +--- + +## Getting Started + +You can get started using VitePress right away using `npx`! + +```sh +npm init +npx vitepress init +``` +```` + +::: info +VitePress didn't always auto-style the extra content of the `layout: home` page. To revert to older behavior, you can add `markdownStyles: false` to the frontmatter. +::: diff --git a/src/client/theme-default/components/VPHome.vue b/src/client/theme-default/components/VPHome.vue index d69a79b21a73..445ff3162ad8 100644 --- a/src/client/theme-default/components/VPHome.vue +++ b/src/client/theme-default/components/VPHome.vue @@ -1,6 +1,10 @@ diff --git a/src/client/theme-default/components/VPHomeContent.vue b/src/client/theme-default/components/VPHomeContent.vue new file mode 100644 index 000000000000..fe689b6ee5ef --- /dev/null +++ b/src/client/theme-default/components/VPHomeContent.vue @@ -0,0 +1,52 @@ + + + + + diff --git a/src/client/theme-default/components/VPHomeSponsors.vue b/src/client/theme-default/components/VPHomeSponsors.vue index 44878a949345..1343e776104b 100644 --- a/src/client/theme-default/components/VPHomeSponsors.vue +++ b/src/client/theme-default/components/VPHomeSponsors.vue @@ -49,8 +49,33 @@ withDefaults(defineProps(), {