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

Option to disable svg in external links #610

Closed
octref opened this issue Jun 23, 2018 · 7 comments
Closed

Option to disable svg in external links #610

octref opened this issue Jun 23, 2018 · 7 comments
Labels
type: feature request Request to add a new feature version: next Planned to do or already included in the next(1.0.0) version

Comments

@octref
Copy link
Member

octref commented Jun 23, 2018

<OutboundLink> generates an icon like this:

image

There should be an option to turn this off.

@octref
Copy link
Member Author

octref commented Jun 23, 2018

It make sense to include it in the theme, however including it in the default markdown renderer and not offering anyway to turn it off is forcing this icon to everyone, even those who's not using the default theme.

@ulivz
Copy link
Member

ulivz commented Jun 26, 2018

@octref Opened a PR at #614.

@ulivz ulivz added the version: next Planned to do or already included in the next(1.0.0) version label Aug 20, 2018
@dcastil
Copy link
Contributor

dcastil commented Dec 26, 2018

What is the status of this feature? I would like to be able to disable the OutboundLink component and think it should be rather opt-in with a plugin.

@xinconan
Copy link

xinconan commented Mar 1, 2019

How to disable svg in external links? The web site has removed svg, https://vuepress.vuejs.org/config/, but I can't find config option.

@ulivz
Copy link
Member

ulivz commented Mar 13, 2019

See: #614 (comment)

@ulivz ulivz closed this as completed Mar 13, 2019
@morphatic
Copy link

morphatic commented May 10, 2019

If you only want to hide the outbound link icon only in certain cases you can hide it with CSS. For example, in my site I sometimes wrap images in external links, e.g.

[![some img](/assets/images/some.png)](http://someothersite.com)

The HTML rendered by this looks something like:

<a href="http://someothersite.com" target="_blank" rel="noopener noreferrer">
  <img src="/assets/images/some.png" alt="some img">
  <svg class="icon outbound">... this is the external link icon ...</svg>
</a>

And results in an image with the external link icon after it like this:

some img

In my CSS, I can use a sibling selector to hide the icon like this:

img + .icon.outbound {
  display: none;
}

This is pretty flexible and wouldn't require you to disable all of markdown-it. HTH!

@deancn
Copy link

deancn commented Mar 10, 2020

  markdown: {
    externalLinkSymbol: false,
  },

image

do not work yet. Any thing wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request Request to add a new feature version: next Planned to do or already included in the next(1.0.0) version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants