1.0.4 • Published 2 years ago

hexo-image-resolver v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

hexo-image-resolver

Custom your local image url in generation.

Latest Stable Version NPM Downloads GitHub stars

Usage

npm i hexo-image-resolver --save

If you are using Post Asset Folder (turn on this feature by setting post_asset_folder: true in your _config.yml), the plugin will resolve your local image path automatically, you don't need any extra configuration.

Configuration

You can add following settings in your _config.yml to custom your own image url:

image_resolver:
  # this is the default setting
  path: /${permalink}${img_name}

The path will determine how the image's url generates, here are full of usable parameters:

NameDesc
titleyour article's title.
permalinkpermanent link, which specified in _config.yml.
filenamepost filename without directory path and extension.
full_filenamefilename with directory path relative to your post directory, if your file is located in hexo_dir/source/__posts/bash/basics.md, the full_filename = bash/basics, and the filename = basics.
img_nameimage's name with extension.
full_img_nameoriginal image url path.

1.0.4

2 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago