Skip to content

fulsun/hexo-asset-image-master

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

hexo-asset-image

官方hexo-asset-image插件,在同时使用hexo-abbrlink时,会导致图片路径错误。

本插件是基于官方插件1.0.0的修改,为了解决域名是xxx.io的情况下,图片路径会从原本/xxx.jpg变成 /.io/xxx.jpg

Usege

  1. 配置

    _config.yml配置文件中设置post_asset_folder: true

  2. 添加依赖

    npm install https://github.com/fulsun/hexo-asset-image-master.git --save
    npm install hexo-abbrlink --save
  3. 指定文章链接

    root: /
    permalink: posts/:abbrlink.html
    pretty_urls:
      trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
      trailing_html: false # Set to false to remove trailing '.html' from permalinks
    
    abbrlink:
      alg: crc32  # 算法:crc16(default) and crc32
      rep: hex    # 进制:dec(default) and hex

Example

  • 目录结构

    test
    ├── logo.jpg
    └── rules.jpg
    test.md
  • markdown中的用法,在typora中也能查看图片

    ![logo](test/logo.jpg)

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published