How to embed images in Hexo posts

2023-08-03
Hexo

Add lines below in _config.yml

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

After modifying _config.yml, create a new post and you will find a folder is created alone with the post.

1
hexo new post "My first page with an image"

Put the image inside the folder, and enbed the image with the file name as below. Deply the post. Bob’s your uncle, you can see the image in the new post.