Giter Site home page Giter Site logo

hexo-image's Introduction

hexo-image

根据markdown文件中图片的相对路径,将图片部署到应用的对应位置。

Usage

在hexo根目录下,执行 npm install https://github.com/liuchuanv/hexo-image.git --save

Example

\source\_posts\210-Java\JavaSE\ThreadLocal 理解.md 中含有一个图片

...
类`ThreadLocal`的结构如下:
![`ThreadLocal`的结构](./imgs/ThreadLocal理解1.png)
...

图片位置:\source\_posts\210-Java\JavaSE\imgs\ThreadLocal理解1.png

hexo-image 插件会检索md文件中的图片路径,并把图片复制到相对应的应用目录中。

简单的说,在本地和发布之后的图片路径不用改变就可以正常访问。

和 post_asset_folder 的区别

开启 post_asset_folder 后,在发布应用时,hexo会将md文件目录中的同名的文件夹复制到相对应的应用目录中。

hexo-asset、hexo-asset-image 插件只是在此基础上改变了图片显示路径,并没有改变图片路径依赖md文件名的情况。

hexo-image's People

Contributors

liuchuanv avatar

Stargazers

 avatar  avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.