hexo-filter-cdn

1.1.4 • Public • Published

hexo-filter-cdn

hexo-filter-cdn is a hexo plugin to replace URL links with your CDN configuration.

Install

$ npm install hexo-filter-cdn --save

Usage

Add configurations to _config.yml:

cdn_filter:
  enable: true
  post_only: false # only render posts
  filter_css: true # CSS file
  filter_html: # HTML file
    enable: true
    img_tag: true # <img src="{URL}">
    href_link: false # Not recommand, <... href="{URL}">
    src_link: true # <... src="{URL}">
  url: https://your.cdn.com
  img_url: https://your.img.cdn.com

Notice: relative paths will not be replaced.

Feature List

  • [X] Replace URL of src attributes
  • [X] Replace URL of href attributes
  • [X] Replace URL in img tags
  • [X] Filter HTML files
  • [X] Option for post only
  • [X] Filter CSS files
  • [ ] Filter JS files

License

GPL3+

Readme

Keywords

Package Sidebar

Install

npm i hexo-filter-cdn

Weekly Downloads

8

Version

1.1.4

License

GPL-3.0-or-later

Unpacked Size

41.5 kB

Total Files

6

Last publish

Collaborators

  • cerallin