Markdown Image Testing

Markdown Image Testing

Embedding an image using markdown

hexo-renderer-marked 3.1.0 introduced a new option that allows you to embed an image in markdown without using asset_img tag plugin.

1
2
3
4
post_asset_folder: true
marked:
prependRoot: true
postAsset: true

Once enabled, an asset image will be automatically resolved to its corresponding post’s path.

Me

Path to image

To understand the true ralative path to images in hexo posts using marksdown syntax, we tries several ways and the result is:

Evenso we enabled everything mentioned before, the true path of 'avatar.JPG’is not /Blog/source/_posts\Markdown-Image-Testing/avatar.JPG but /Blog/public/2022/03/17/Markdown-Image-Testing/avatar.JPG

Tag Plugin

1
2
alert("Hello World!");
var myVar = "Hello World!";

本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!