ulivz / vt

🖼️ A "Post-VuePress Era" Documentation Theme (Deprecation Warning: For a next-gen SSG, please check out Rspress.)
https://vt.insx.dev
MIT License
137 stars 10 forks source link

Add a custom component in home markdown ? #105

Open leiluspocus opened 2 months ago

leiluspocus commented 2 months ago

Hello there !

First, thank you for the neat work with this theme :)

I wanted to add Vue components in my homepage as specified here in the documentation.

Here's my index.md file

---
home: true
actionText: Getting Started
actionLink: /guide/
subActionText: Install
subActionLink: /guide/getting-started.html
features:
  - title: Compatibility
    details: API familiar for VuePress old users, migrating from default theme is almost no costing.
  - title: Full-text search
    details: Full-text search is supported by default, no server dependency, distinguishing locales.
  - title: Out of the box
    details: Compatible with VuePress' default theme, built-in common documentation features.
  - title: TypeScript
    details: It's easier to custom your own config with full TypeScript support.
  - title: Homepage
    details: It's easier to have a homepage like as you can see.
  - title: API Page
    details: Generate an API page like this site's API page, which is very useful to index APIs.

sponsors:
  - title: n8n.io
    img: https://avatars.githubusercontent.com/u/45487711?s=200&v=4
    link: https://n8n.io/
  - title: n8n.io (2)
    img: https://avatars.githubusercontent.com/u/45487711?s=200&v=4
    link: https://n8n.io/
---

::: slot heroText
An <b class="gradient">Elegant</b> VuePress Theme
:::

::: slot tagline
A VuePress 1.x theme inspired by `@vue/theme`, fully compatible with VuePress default theme.
:::

<Contact />

::: slot footer
Released under the MIT License.<br>
Copyright © 2022 ULIVZ
:::

And this is my Contact.vue component placed in .vuepress/components/Contact.vue (very basic, I used what's in the Vuepress doc)

<template>
  <p class="demo">This is another component</p>
</template>

Any idea what I'm missing ? I'm using Vuepress 1.5

Thank you for your insights !