Closed digifu closed 9 years ago
Of course it's possible. Can you show me the source code of your page and folder architecture: public/YOUR_PAGE
and source/YOUR_PAGE
? Check that your images must be in public/YOUR_PAGE/
folder to be available from index.html
page with relative url like photo.png
. if there is a subfolder like public/YOUR_PAGE/subfolder/
, images will be reach with subfolder/photo.png
from public/YOUR_PAGE/index.html
When I click the "Test" link, I can see the page but the pictures are not working, instead of the last entry.
The picture are in the subfolder index, like /source/test/index/laos.jpg
Here is the code of the /source/test/index.md
title: "test"
thumbnailImage: index/laos.jpg
coverImage: index/laos1.jpg
photos:
- index/myanmar.jpg
- index/laos.jpg
- index/laos1.jpg
---
{% asset_img index/laos.jpg [title] %}
![Alt text](/test/index/laos.jpg)
you're right, there is a bug with image urls. I would like to have your opinion. I take an example:
you create a page "test". so in this folder, you have index
folder and a file index.md
file.
in test
folder, you create an other file hello.md
and a folder hello
.
So this 2 posts in test
page will be reachable at http://yourblog.com/test/index.html
and http://yourblog.com/test/hello.html
. Each page(hello.md
and index.md
have images) I would like to know what do you prefer in front matter.
1 hello.md
content :
title: "hello"
thumbnailImage: hello/tranquilpeak.png
coverImage: hello/tranquilpeak.png
photos:
- hello/tranquilpeak.png
---
![Alt text](hello/tranquilpeak.png)
2 hello.md
content :
title: "hello"
thumbnailImage: tranquilpeak.png
coverImage: tranquilpeak.png
photos:
- tranquilpeak.png
---
![Alt text](hello. tranquilpeak.png)
Normally, tranquilpeak have the second behavior for posts because it easier for user to just write the relative url. But a page can have multiple posts in, so you want to maybe share images between them, or other things like that. Do you want that front matter reach /your_page/
folder or /your_page/your_post_folder/
, in your case /test/
or /test/hello/
? Tell me :) behavior 1 or 2?
Sorry for the delay. Went from Asia back to Europe.
I would prefer 1. But only because I don't see the advantage of 2. What is the point in having posts for a single page? Or do you mean subpages?
Currently, for posts, the behavior is 2. User doesn't need to write the folder name everywhere, and if he change the title of the post (then the name of the folder which contains photos) , he will not have to rename each lines where there is the old folder name. Behavior 2 is more dynamic and better for posts. but for a page i'm not sure. it depends what does user do with. So ? :D
i'm still waiting your answer to push changes :)
I think 2. is better. Tranquilpeak and hexo is mainly for blogging. So it should be as easy as possible for blogposts.
Got it! :)
Tranquilpeak 1.2.0 is here and fix this bug :)
I tried to add a page but pictures and links are not working. Is it possible to add pages with your theme?