Skip to content

feat: jump to a new tab page when click on a feature item in index page. #2896

@geoochi

Description

@geoochi

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

I have put several feature items in index.md with links, and some of them link to my other html project pages, so it needs to be automatically redirected to new tab pages, but now they can't.

Describe the solution you'd like

Provide a property "target" for setting the redirect action for feature items.

Example:

Setting target: _blank for "Guide" feature item, and setting nothing for "Reference" item.

When click on "Guide" feature item, it will open a new tab page and redirect to it, while flash in self page when click on "Reference" page.

---
layout: home

title: VitePress
titleTemplate: Vite & Vue Powered Static Site Generator

hero:
  name: VitePress
  text: Vite & Vue Powered Static Site Generator
  tagline: Simple, powerful, and fast. Meet the modern SSG framework you've always wanted.
  actions:
    - theme: brand
      text: Get Started
      link: /guide/getting-started
    - theme: alt
      text: View on GitHub
      link: https://github.com/vuejs/vitepress
  image:
    src: /vitepress-logo-large.webp
    alt: VitePress

features:
  - title: Guide
    link: /guide/what-is-vitepress
    target: _blank
  - title: Reference
    link: /Reference/site-config
---

result

Describe alternatives you've considered

No response

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions