Hexo Asset Folders

In root’s _config.yml, set post_asset_folder to true:

1
post_asset_folder: true

When you create a new post, hexo will generate an asset folder with the same name as the post.

To include assets in markdown:

1
2
3
{% asset_path slug %}
{% asset_img slug [title] %}
{% asset_link slug [title] %}

Examples:

1
2
{% asset_img example.jpg This is an example image %}
{% asset_img "spaced asset.jpg" "spaced title" %}

Comments