Recommended way of implementing Fontawesome into Vitepress #1713
-
What is the recommended way of implementing Fontawesome into vitepress? I could download the fontawesome files (css and webfont) and use it with plain html <i class="fa-solid fa-user"></i> But there is also some documentation for adding it to vue 2 and 3 To be able to use the second option guess I also have to edit the vite.config.ts? Or is there already a better way using fontawesome with vitepress? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You won't need to add/edit the vite.config for this. Just register that component like this: https://vitepress.vuejs.org/guide/theme-introduction#registering-global-components (Refer Vue 3.x docs on FA, it's showing v2 ones by default.) |
Beta Was this translation helpful? Give feedback.
You won't need to add/edit the vite.config for this. Just register that component like this: https://vitepress.vuejs.org/guide/theme-introduction#registering-global-components
(Refer Vue 3.x docs on FA, it's showing v2 ones by default.)