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

fix #764 : implement support for external links in sidebar #1012

Closed

Conversation

rasapetter
Copy link

@rasapetter rasapetter commented Nov 16, 2018

Closes #764

Summary
We introduce a new type of sidebar item called 'external' which are
treated differently in Sidebar/SidebarLink. These items are rendered
as elements with an added icon indicating that the element points
to an external location.

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

If changing the UI of default theme, please provide the before/after screenshot:

vuepress-pr-external-link

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

You have tested in the following browsers: (Providing a detailed version will be better.)

  • Chrome
  • Firefox v63.0
  • Safari
  • Edge
  • IE

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated
  • Related tests have been updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

We introduce a new type of sidebar item called 'external' which are
treated differently in Sidebar/SidebarLink. These items are rendered
as <a> elements with an added icon indicating that the element points
to an external location.
@rasapetter
Copy link
Author

Any chance of this making it into alpha.26 or should I approach this from another angle?

@ulivz ulivz force-pushed the master branch 3 times, most recently from 6c3127f to 71574f2 Compare December 18, 2018 18:27
@alessandromenini
Copy link

+1 for this!
Is there any release date?

@ulivz ulivz self-assigned this Jan 15, 2019
@ulivz ulivz force-pushed the master branch 5 times, most recently from 316e022 to 1284944 Compare January 29, 2019 11:47
@timaschew
Copy link
Contributor

timaschew commented Mar 22, 2019

Is there any other work to do before this can be merged? @ulivz

@rasapetter can you please rebase?

@timaschew
Copy link
Contributor

@ulivz Any plans to merge this soon?

@narration-sd
Copy link
Contributor

narration-sd commented Apr 11, 2019

+1 if you can, on the merge - I'm another who needs this.

The case is an obvious one:

  • I have a project coming out, worth the long effort
  • The doc needs to be referenced from a main/etc site - on Gridsome - Vue
  • There needs to be a way back to the main site. You'll understand.
  • Thank you!
  • Closer integration yet would be the future, but this is great for now

p.s. what I'm doing should soon be interesting to Gridsome and Vue

@timaschew
Copy link
Contributor

The problem is the branch contains conflicts and it's even not working. I've tested it with the latest version. I've found the missing piece to get it working "again".

I've actually an additional use case which I would like to pick up in case I will send my PR.

This is my use case:
I want to provide some HTML, actually API reference which should be part of the VuePress build. Actually the files are just in the public directory, not handled by VuePress at all. But since they using the same basepath links to those files are "relative" (starting with a slash). So VuePress is printing an error because those files are invisible to VuePress. But there are working fine and handled as external links.

What do you think?

@narration-sd
Copy link
Contributor

narration-sd commented Apr 11, 2019

@timaschew very good to hear your progress, is the first thought, and a wish I wasn't so occupied that I could jump in on this.

It's a basic need, wherever the routers of these SPA systems get hold of browser targetting -- and should be very solvable via the router access itself. It can be stopped in its tracks via the callbacks, and that's where I'd think to intervene, and presume this does, with too many other codebases open to give this one the attention. The doctor is operating...patient gets first care. We hope...!!

I don't quite understand your use case, but appreciate, esp. the difficulty across languages; long life in Europe. But I'm sure it is quite sensiblle, and that many others are quietly mystified that there is this problem. We all tend to design first for the problem we think we are solving, and that's what happens with these powerful and focused applications..

Best, then, and encouragement -- and thanks.

@timaschew
Copy link
Contributor

timaschew commented Apr 11, 2019

Let's do step by step: #1534

@ulivz
Copy link
Member

ulivz commented Apr 16, 2019

Closing in favor of #1534

@ulivz ulivz closed this Apr 16, 2019
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

Successfully merging this pull request may close these issues.

External urls in the sidebar
5 participants