knktc's Notes

python, cloud, linux...

0%

Testing Image Insertion in a Hexo GitHub Pages Post

Just a small test post for inserting images in Hexo.

Setup steps:

  1. Set post_asset_folder to true in Hexo’s _config.yml.
  2. When you create a new post with hexo new [my_post_name], Hexo creates both a Markdown file and a directory under source/_posts:
1
2
my_post_name.md
my_post_name/
  1. Put the image files into the my_post_name directory.
  2. Insert the image in the post like this:
1
![image description](image_filename)

For example:

1
![logo](sonic.png)

That produces:

logo

One thing to note is that this kind of inserted image does not show up on the homepage excerpt. It only appears inside the post content itself.

如果我的文字帮到了您,那么可不可以请我喝罐可乐?

Welcome to my other publishing channels