First of all, thanks Hexo. Here is my question:
I set post_asset_folder
to true
in the Hexo configuration file. Then I run:
$ hexo new first
.
then:
$ ls source/_posts/
first/ first.md hello-world.md
I added a pic named pic.png
into source/_posts/first
and wrote something in source/_posts/first.md
like the following:
title: first
date: 2015-06-16 13:42:29
tags:
---
picture blow ^_^
![pic](first/pic.png)
Then:
$ hexo g
$ hexo s
I open http://0.0.0.0:4000/
, but i coundn't see the content of pic.png
.
I checked the folder public/2015/06/16/first/
. I found there is some diffrience between folder public/2015/06/16/
and folder source/_posts/
.
public/2015/06/16/
.
└── public/2015/06/16/
├── first
│ ├── pic.png
│ └── first.md
└── hello-world
└── hello-world.md
source/_posts/
.
└── source/_posts/
├── first
│ ├── first
│ │ └── pic.png
│ └── first.md
└── hello-world
└── hello-world.md
How can i unify the path format that i could get same path in markdowm
and index.html
.
You can (sadly) not display an image in your markdown editor of choice and the rendered HTML file. To make it work in in the rendered version, you have to address it like this: ![](cat.jpg)
.
post_asset_folder: true
in _config.yml
hexo new post "Some New Post"
source/_posts/Some-New-Post/
, e.g. source/_posts/Some-New-Post/cat.jpg
![](cat.jpg)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With