hexojs / hexo-renderer-markdown-it

Markdown-it is a Markdown parser, done right. A faster and CommonMark compliant alternative for Hexo.
MIT License
340 stars 60 forks source link

feat: add image options #188

Closed renbaoshuo closed 1 year ago

renbaoshuo commented 1 year ago

This pull request resolves #140, closes #141.

Usage

_posts/foo.md

![](bar.svg)

<!-- Also works: -->

![](foo/bar.svg)

will be rendered to:

<p><img src="/post/foo/bar.svg"></p>
<!-- Also works: -->
<p><img src="/post/foo/bar.svg"></p>

Note that for some local markdown editor previews, we need to use ![](foo/bar.svg) to display the image correctly. Adding support for this insertion format can bring users a good local writing experience.

renbaoshuo commented 1 year ago

CI fails on windows. Do you have any clues?

Nope.

renbaoshuo commented 1 year ago

CI fails on windows. Do you have any clues?

@SukkaW Fixed in 43dc603a8780b93b00cfcccb48672af494598ecb.