Vuepress: Support more buttons on home page(up to 5 buttons)

Created on 30 Mar 2020  ·  6Comments  ·  Source: vuejs/vuepress


Feature request



What problem does this feature solve?

I use VuePress to build a website for my app, it divided into __stable__ and __development__ versions, So I need two button to guide user to download different version.

What does the proposed API look like?

actionText / actionLink, actionText2 / actionLink2, ...... , actionText5 / actionLink5

How should this be implemented in your opinion?

Just support up 5 buttons to support this situation(actionText / actionLink, actionText5 / actionLink5)

Are you willing to work on this yourself?

core team review

Most helpful comment

Currently, you can use a custom layout.

What does the proposed API look like?
actionText / actionLink, actionText2 / actionLink2, ...... , actionText5 / actionLink5

If we're gonna support this feature, I suggest making the config like below:

action:
- text: Get Started →
  link: /guide/
- text: Action 2
  link: /whatever/
- text: Action 3
  link: /whatever/

All 6 comments

Currently, you can use a custom layout.

What does the proposed API look like?
actionText / actionLink, actionText2 / actionLink2, ...... , actionText5 / actionLink5

If we're gonna support this feature, I suggest making the config like below:

action:
- text: Get Started →
  link: /guide/
- text: Action 2
  link: /whatever/
- text: Action 3
  link: /whatever/

Yeah, custom layout is a good solution to solve this situation.

if this feature be supported, will make users feel conveniently.

I can help with this featue, do we need it?@newsbielt703

@Mister-Hope Hi bro, could you implement this feature and make a PR ahead, you could follow @newsbielt703 suggestion?

awful thank in advanced.

One more action link is definitely needed. 🏀

Before proceeding I would suggest to apply a different style to the rest of the action buttons to avoid having multiple primary CTAs with the same style, weight, etc (see _Option A_). I would suggest to go with one more action first (see _Option B_) but having a different style for the rest of the actions could allow more that two action links without degrading the user experience (see _Option C_). WDYT @taozuhong? /cc @billyyyyy3320

| Current | Option A | Option B | Option C |
|-----|-----|-----|-----|
| image | image | image | image |

If the consensus here is to have two only actions I would suggest to use the following config structure, otherwise following the structure proposed in https://github.com/vuejs/vuepress/issues/2261#issuecomment-606491901 looks good.

action:
- primaryText: Get Started →
  primaryLink: /guide/
- secondaryText: Documentation
  secondaryLink: /documentation/

in our project, could have development / stable / long-term-support(LTS) / donate(contribute) options, so I suggest the structure and style like below:
action:

  • text: Action 2
    link: /whatever/
  • primaryText: Get Started →
    primaryLink: /guide/
  • text: Action 3
    link: /whatever/
  • text: Action N
    link: /whatever/
Was this page helpful?
0 / 5 - 0 ratings

Related issues

FadySamirSadek picture FadySamirSadek  ·  3Comments

herrbischoff picture herrbischoff  ·  3Comments

harryhorton picture harryhorton  ·  3Comments

genedronek picture genedronek  ·  3Comments

AMontagu picture AMontagu  ·  3Comments