vitepress icon indicating copy to clipboard operation
vitepress copied to clipboard

Allow links in the homepage-layout features

Open HarryAllen1 opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe.

Currently, if the layout of a page is home, under features, links do not render (both markdown and html).

Describe the solution you'd like

Allow markdown links in features Example:

---
layout: home
title: Ipsum
features:
    - title: [link](https://google.com/)
      details: [another link](https://google.com/)
---

Describe alternatives you've considered

Alternatively, HTML links could be allowed:

---
layout: home
title: Ipsum
features:
    - title: <a href="https://google.com/">link</a>
      details: <a href="https://google.com/">another link</a>
---

Additional context

No response

Validations

HarryAllen1 avatar Jul 14 '22 03:07 HarryAllen1

Fixing this is simple, we just need to use v-html="foo" instead of {{ foo }} syntax in VPFeature.vue. But might need to add styles for links to distinguish them:

image

brc-dd avatar Jul 14 '22 09:07 brc-dd

Is this enhancement under developement ?

Another solution would be to let {{ foo }} syntax in VPFeature.vue and add extra optional property to feature section. For example link as in the hero section and add a CTA at the end of each feature item.

remirobichet avatar Jul 26 '22 10:07 remirobichet