npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vuepress-plugin-font-awesome

v1.90.6

Published

Use font awesome icon in the Vuepress markdown file directly

Downloads

173

Readme

Font Awesome component for Vuepress

This plugin allows you to use Font Awesome icons in Vuepress markdown file directly.

Support regular and solid icons ONLY


How to Use

Each icon's used as a Vuepress component, so you just need to input a directive start with Fa- then follow the Capitalised font awesome icon class name, for example:

<!-- Insert a address book icon, red colour, 3x large size -->
<Fa-AddressBook color="red" size="3x" />

Install

  • Step 1: Install dependency
yarn add vuepress-plugin-font-awesome
  • Step 2: Create a shortcut script, please add following codes in your package.json file
  "scripts": {
    "fa:build": "node node_modules/vuepress-plugin-font-awesome/index.js"
  }

Generate Font Awesome components

Generate all font awesome icon components

Simply run following command:

yarn fa:build

If in your project, you root folder is in other place, for example: 'docs', then pass the dest option:

yarn fa:build --dest=docs

The plugin will put the font awesome components in right place, which is .vuepress/components/Fa.

Generate specified icons only

By default, there are 152 regular and 957 solid icon components will be generated, which is a huge amount. Instead of pack them all, you might want to only generate some specified icons based on your demand. To do so, simply put them in the .vuepress/config.js file as below:

module.exports = {
    title: 'Hello VuePress',
    description: 'Just playing around',

    // Please append following lines into your config.js
    thirdPartyComponents: {
        fontAwesomeIcons:{
            regular:['address-card','file-audio'],  // Regular font awesome icon keys here
            solid:['battery-quarter']               // Solid font awesome icon keys here
        }
    }
  }

If you don't know what icon's key you could use, please refer the following:

The command is exactly same as above:

yarn fa:build

OR

yarn fa:build --dest=$YOUR_DOCS

Use Font Awesome in your markdown

In any of your markdown file, simply add:

<Fa-AddressBook />

Add props to icon:

<Fa-AddressBook color="red" size="3x" />

Here below are props you could pass:

  • color: String, Color Hex Code
  • size: String, Font Awesome size class: 'lg', 'xs', 'sm', '1x', '2x', '3x', '4x', '5x', '6x', '7x', '8x', '9x', '10x'
  • pull: String, left/right
  • rotation: [String, Number], degrees such as 90/180/270
  • flip: String, such as 'horizontal', 'vertical', 'both'
  • spin: true/false
  • pulse: true/false
  • border: true/false

Change Log

  • v1.0.2: 23/Jul/2019

    • add specified icons generation feature
    • add regular and solid icons key list file
  • v1.0.1: 22/Jul/2019

    • Support all props to pass to the component