@goy/vuepress-plugin-svg-icons

SVG sprite icon plugin for VuePress

Usage no npm install needed!

<script type="module">
  import goyVuepressPluginSvgIcons from 'https://cdn.skypack.dev/@goy/vuepress-plugin-svg-icons';
</script>

README

vuepress-plugin-svg-icons

CIRCLECI NPM VERSION NPM DOWNLOADS LICENSE

:heart: Svg sprite plugin for VuePress

:book: Live Demo and Docs

Install

$ npm install @goy/vuepress-plugin-svg-icons -D
# OR
$ yarn add @goy/vuepress-plugin-svg-icons -D

Usage

Add config to your .vuepress/config.js:

module.exports = {
  plugins: [
    '@goy/svg-icons'
  ]
}

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

All icons will be loaded automaticly.

The plugin provides a global component named vp-icon.

Just enjoy it!

<vp-icon name="github" />

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

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

Custom options detail