0.0.1 • Published 5 years ago

hexo-cdnify-tmp v0.0.1

Weekly downloads
3
License
-
Repository
-
Last release
5 years ago

hexo-cdnify

Converts local URLs to CDN ones when hexo generator.

What is it

The plugin through your HTML for statics file URLs rewrite to the CDN

Default support:

    <img data-src="____">
    <img src="____">
    <link rel="apple-touch-icon" href="____">
    <link rel="icon" href="____">
    <link rel="shortcut icon" href="____">
    <link rel="stylesheet" href="____">
    <script src="____"></script>
    <source src="____"></source>

install

npm install hexo-cdnify --save

options

cdn:
  enable: true
  base: //cdn.com
  tags:
    'img[data-orign]':  data-orign

base

the CDN hostname. e.g., '//cdn.com/'.

It will replace ./vendors/index.css to //cdn.com/vendors/index.css

tags

That is, any elements matching the CSS selector img[data-orign] will have their data-orign attributes , etc.