vitepress icon indicating copy to clipboard operation
vitepress copied to clipboard

Apply externalLinkIcon option to root index.md

Open thdoan opened this issue 1 year ago • 7 comments

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

Currently, when you set externalLinkIcon: true it is not applied to the root index.md.

Describe the solution you'd like

It would be nice to also add the external link icon to external links in the root index.md.

Describe alternatives you've considered

No response

Additional context

No response

Validations

thdoan avatar Sep 17 '24 19:09 thdoan

Can you explain what you're trying to do?

brc-dd avatar Sep 18 '24 02:09 brc-dd

Please see https://stackblitz.com/edit/vite-ps7x8w?file=docs%2Findex.md

I'm expecting there to be an external link icon similar to the link on the example page for consistency.

thdoan avatar Sep 18 '24 03:09 thdoan

Ah, I see. For now you can do this:

---
layout: home

pageClass: external-link-icon-enabled

hero:
...

brc-dd avatar Sep 18 '24 03:09 brc-dd

Thank you. Feel free to close as this option works for me.

thdoan avatar Sep 18 '24 03:09 thdoan

No, we should fix it. Probably a 1-2 line change.

brc-dd avatar Sep 18 '24 03:09 brc-dd

Great. I assume once it's fixed, pageClass will be optional, right.

thdoan avatar Sep 18 '24 03:09 thdoan

Yeah

brc-dd avatar Sep 18 '24 03:09 brc-dd