Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.
/ hexo-tag-imgurl Public archive

A simple image tag plugin for Hexo.

License

Notifications You must be signed in to change notification settings

hexojs/hexo-tag-imgurl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DEPRECATED!

hexo-tag-imgurl has been deprecated.

Introduction

npm npm npm npm

This is a hexo tag plugin which allows you to embed an image stored on CDN host.

Installation

Run the following command in the root directory of Hexo:

npm install hexo-tag-imgurl --save

Then add your CDN url in your site _config.yml.

# Imgurl
# Important: This value starts without a protocol and it doesn't end with '/'.
# httpsMod: true | false 
# If the value not set, image url will automatically adapt to the site's protocol.
imgurl: example.com/images
httpsMod:

Usage

{% imgurl imagePath [class1,class2,classN] imgAttr %}

Example:

# Imgurl
# Important: This value starts without a protocol and it doesn't end with '/'.
imgurl: example.com/images
{% imgurl test-post/test.png ful-image alt:test.png %}

Will output the HTML:

<img src="//example.com/images/test-post/test.png" class="full-image" alt="test.png">

TODO

  • Delete images after sync.
  • No article path required.
  • Built-in third party sync.
  • Add test script.

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •