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

feat: allow showing a dropdown on site title #835

Closed
rigor789 opened this issue Sep 13, 2018 · 1 comment
Closed

feat: allow showing a dropdown on site title #835

rigor789 opened this issue Sep 13, 2018 · 1 comment

Comments

@rigor789
Copy link

Feature request

What problem does this feature solve?

I was browsing the vue-router docs, and wanted to jump to the vuex docs. Currently there is no "easy" way to do this, and what I would consider a convenient solution is if the current site title was a dropdown with a list of related sites.

What does the proposed API look like?

// .vuepress/config.js
module.exports = {
  themeConfig: {
    sites: [
      { text: 'Vue Router', link: 'https://router.vuejs.org' },
      { text: 'Vuex', link: 'https://vuex.vuejs.org' },
    ]
  }
}

How should this be implemented in your opinion?

I believe we can easily implement this by reusing the existing DropdownLink component

And a new branch in the Navbar component

<span
ref="siteName"
class="site-name"
v-if="$siteTitle"
:class="{ 'can-hide': $site.themeConfig.logo }"
>{{ $siteTitle }}</span>

      <!-- sitesLinks would be a computed property so that it can automatically add $siteTitle as the root elements text -->
      <DropdownLink v-if="sites" :item="sitesLinks" />
      <span
        ref="siteName"
        class="site-name"
        v-else-if="$siteTitle"
        :class="{ 'can-hide': $site.themeConfig.logo }"
       >{{ $siteTitle }}</span>

Are you willing to work on this yourself?**

If this is something useful for anyone, sure!

@ulivz
Copy link
Member

ulivz commented Sep 14, 2018

Thanks for your interest in VuePress, but it has been a long-term topic, See: #683 (comment)

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

2 participants