Open GreyXor opened 5 months ago
What are the values of link.title
and link.icon
? Did you check?
What are the values of
link.title
andlink.icon
? Did you check?
Hello, yes, link.title and link.icon have the good value", as expected it's working, and link.icon is correctly i-mdi:home. and i-mdi:home
is a working icon.
You can have a look here :
---
navigation:
title: 'i-mdi:home'
icon: 'i-mdi:home'
---
# Dashboard
But if I set the icon directly like this
<v-list nav>
<v-list-item title="Dashboard" prepend-icon="i-mdi:home" to="/" />
</v-list>
Please, try to use i-mdi-home
or mdi-home
instead.
What are the values of
link.title
andlink.icon
? Did you check?Hello, yes, link.title and link.icon have the good value", as expected it's working, and link.icon is correctly i-mdi:home. and
i-mdi:home
is a working icon. You can have a look here :--- navigation: title: 'i-mdi:home' icon: 'i-mdi:home' --- # Dashboard
But if I set the icon directly like this
<v-list nav> <v-list-item title="Dashboard" prepend-icon="i-mdi:home" to="/" /> </v-list>
Please, try to use
i-mdi-home
ormdi-home
instead.
Thank you, but it doesn't work either.
I've noticed that if (in dev) I replace :prepend-icon="link.icon"
with prepend-icon="mdi-home"
. then it works, and if I put back (still in the same dev session) :prepend-icon="link.icon"
. then it still work.
It's as if the SSR icon didn't exist because it wasn't "generated".
This might related to how unocss scanner acts and detects the icon names.
/cc @antfu What do you think about this issue?
UnoCSS detects usages via the transform pipeline, where in Nuxt Content, the content doesn't go into the bundler transform processor. Thus you will need to configure UnoCSS to scan from fs explicitly: https://unocss.dev/guide/extracting#extracting-from-filesystem
Is your feature request related to a problem? Please describe
I try to use icon from unocss/nuxt like my other component
but in nuxt-content it's not working
Describe the solution you'd like
Icon should be showed because icon exist
Describe alternatives you've considered
Additional context