hexo博客引用本地图片

使用插件

  1. 设置 _config.yml

    1
    post_asset_folder:true
  2. 安装插件

    1
    npm install https://github.com/CodeFalling/hexo-asset-image --save
  3. 引入图片

    1
    ![avatar](图片目录/logo.jpg)

avatar

使用标签

  1. 设置 _config.yml

    1
    post_asset_folder:true
  2. 使用标签

    1
    2
    3
    4
    5
    6
    {% asset_path slug %}
    {% asset_img slug [title] %}
    {% asset_link slug [title] %}

    如:
    {% asset_img avatar.jpg avatar %}