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 #sidebar-nav-active-link-after slot expose VPDocAside #4048

Open
4 tasks done
mesqueeb opened this issue Jul 16, 2024 · 3 comments
Open
4 tasks done

Add #sidebar-nav-active-link-after slot expose VPDocAside #4048

mesqueeb opened this issue Jul 16, 2024 · 3 comments
Labels

Comments

@mesqueeb
Copy link
Contributor

mesqueeb commented Jul 16, 2024

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

In order to win space, I'd love to be able to place the VPDocAside section inside of my sidebar

euminteumni

Describe the solution you'd like

I'm able to achieve this with this custom layout:

<script setup>
import DefaultTheme from 'vitepress/theme'
import VPDocAside from 'vitepress/dist/client/theme-default/components/VPDocAside.vue'

const { Layout } = DefaultTheme
</script>

<template>
  <Layout>
    <template #sidebar-nav-after>
      <VPDocAside />
    </template>
  </Layout>
</template>

<style>
div.aside {
	display: none !important;
}
</style>
pretty.good.mp4

However, it's even better if we can have it show underneath the active link like so:

nteumntimuei

The exact feature request to achieve this is:

  1. Add #sidebar-nav-active-link-after slot to layout
  2. expose VPDocAside, because currently it's only importable via dist

Describe alternatives you've considered

No response

Additional context

I can make a PR to achieve this if the proposal is accepted

Validations

@ghostrider-05
Copy link

The solution of your request is I think already implemented with the aside: 'left' option (in the frontmatter or theme configuration)

@mesqueeb
Copy link
Contributor Author

mesqueeb commented Aug 5, 2024

@ghostrider-05
I guess in a way. That would give me this look:
image

whereas I am aiming for this look:
image

You see how the current aside: 'left' wastes a lot of real estate of the browser window?

@ghostrider-05
Copy link

Oh didn't know that it is seperate from the sidebar. I thought it would the same as in VuePress, that is why I suggested aside. In VuePress it is combined with the sidebar as in your screenshots: https://v2.vuepress.vuejs.org/guide/getting-started.html

@github-actions github-actions bot added the stale label Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants