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 external links in sidebar #686

Merged
merged 2 commits into from Jun 6, 2022
Merged

feat: allow external links in sidebar #686

merged 2 commits into from Jun 6, 2022

Conversation

brc-dd
Copy link
Member

@brc-dd brc-dd commented May 30, 2022

fixes: #205
closes: #481

Config:

import { defineConfig } from 'vitepress'

export default defineConfig({
  themeConfig: {
    sidebar: [
      { items: [{ text: 'External Link', link: 'https://...' }] }
    ]
  }
})

Result:

image

@kiaking
Copy link
Member

kiaking commented May 30, 2022

Looking good! Made one comment! After that, I'll adjust the "titleless" section style 👍

@brc-dd
Copy link
Member Author

brc-dd commented May 30, 2022

VPLink already adds link class, so I've not duplicated it. Also, I have moved color-related properties to .link so that .icon can use currentColor.

@kiaking kiaking changed the base branch from next-theme to main June 6, 2022 03:53
@kiaking kiaking merged commit ce17f50 into vuejs:main Jun 6, 2022
@brc-dd brc-dd deleted the fix/sidebar-external branch June 6, 2022 04:12
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can the sidebar support external links like the navigation bar?
2 participants