vuejs / vitepress

Vite & Vue powered static site generator.
https://vitepress.dev
MIT License
13.22k stars 2.13k forks source link

Apply externalLinkIcon option to root index.md #4212

Open thdoan opened 2 months ago

thdoan commented 2 months ago

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

brc-dd commented 2 months ago

Can you explain what you're trying to do?

thdoan commented 2 months ago

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.

brc-dd commented 2 months ago

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

---
layout: home

pageClass: external-link-icon-enabled

hero:
...
thdoan commented 2 months ago

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

brc-dd commented 2 months ago

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

thdoan commented 2 months ago

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

brc-dd commented 2 months ago

Yeah