nidbCN / hexo-simpleIcons

Use simple-icon in your hexo passages.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hexo-simpleicons

Picture

SimpleIcon

Use simple-icons in your hexo blog.

Installation

npm install hexo-simpleicons --save

Usage

Configure

Edit _config.yml and add:

simple_icons:
  enable: true
  # The cdn base url you want to use, if you save the simple-icons in your server, just modify it to the url of your simple-icons storage.
  cdn_url: "https://cdn.jsdelivr.net/npm/simple-icons@v4/icons/"
  # The type you want to use, if you want use simple-icons npm package, modify it to package.
  type: "cdn"
  # The zoom size of your icon, in default, the value is 1.2. The icon will has a seem height of line, you can modify this value to resize the icon.
  size: 1.2

NOTICE

By default, we did not add the package "simple-icons", if you want to use simple-icons npm package, you need:

cd node_modules/hexo-simpleicons
npm install simple-icons

Install this package first.

Writting

Use

{% icon [ICON NAME] %}

to add a simple-icons. If you use CDN, the icon will in a im attr, use package it will be a svg in HTML document directly.

You can use this tag in text or markdown headline but you can not use it in the hexo passage title.

You can find [ICON NAME] in simple icon offical website: SimpleIcons.org

About

Use simple-icon in your hexo passages.

License:GNU General Public License v3.0


Languages

Language:JavaScript 100.0%