@goy/vuepress-plugin-svg-icons
TypeScript icon, indicating that this package has built-in type declarations

5.5.0 • Public • Published

vuepress-plugin-svg-icons

CI NPM VERSION NPM DOWNLOADS LICENSE

❤️ SVG sprite plugin for VuePress

📖 Live Demo and Docs

Note

⚠️ The latest version since v5 only supports VuePress v2.

If you are looking for VuePress v1 support, please use @goy/vuepress-plugin-svg-icons@4.3.0.

Install

npm i @goy/vuepress-plugin-svg-icons -D
yarn add @goy/vuepress-plugin-svg-icons -D
pnpm add @goy/vuepress-plugin-svg-icons -D

Usage

import { defineUserConfig } from 'vuepress'
import { svgIconPlugin } from '@goy/vuepress-plugin-svg-icons'

export default defineUserConfig({
  plugins: [svgIconPlugin()],
})

Create a folder named icons in your document sourceDir and put all your svg files in it.

All icons will be loaded automatic.

The plugin provides a global component named VpIcon.

Just enjoy it! 😊

<vp-icon name="github" />

<vp-icon color="#3eaf7c" name="vue" />

<vp-icon color="#3eaf7c" name="vue" size="4em"/>

Custom options detail

License

MIT License © 2019-PRESENT ntnyq

/@goy/vuepress-plugin-svg-icons/

    Package Sidebar

    Install

    npm i @goy/vuepress-plugin-svg-icons

    Weekly Downloads

    48

    Version

    5.5.0

    License

    MIT

    Unpacked Size

    11.6 kB

    Total Files

    24

    Last publish

    Collaborators

    • ntnyq