Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a custom component in home markdown ? #105

Open
leiluspocus opened this issue Apr 18, 2024 · 0 comments
Open

Add a custom component in home markdown ? #105

leiluspocus opened this issue Apr 18, 2024 · 0 comments

Comments

@leiluspocus
Copy link

leiluspocus commented Apr 18, 2024

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 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant