Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Co-located assets and post summaries #1772

Closed
SkypLabs opened this issue Feb 16, 2022 · 4 comments
Closed

Co-located assets and post summaries #1772

SkypLabs opened this issue Feb 16, 2022 · 4 comments
Labels
bug done in pr Already done in a PR

Comments

@SkypLabs
Copy link
Contributor

SkypLabs commented Feb 16, 2022

Bug Report

Environment

Zola version: 0.15.3

Current Behaviour

I use the following file structure for my personal blog:

/content/
    post-folder/
        index.md
        asset-1.jpg
    _index.md

My index.html template loops over the different posts in content and displays their summary when available on the landing page of my blog, inviting visitors to click on a post to read the rest of it.

I have a couple of posts which contain an image in their summary, and those images are included using a relative path thanks to the co-location mechanism. Something like ![My image](asset-1.jpg) in Markdown. It works perfectly fine when a specific post is opened (rendered with the page.html template) but not in the post summaries on the landing page where the links still point to the assets like if they were in the same directory as the index page.

Expected Behaviour

I would like to be able to use relative paths to co-located assets in Markdown anywhere on my website, and not only in the posts in question.

It used to work fine until I pushed an update to my blog recently using the latest version of Zola. The update broke the image links in my post summaries. I am not sure which version of Zola I was using the last time the expected behaviour described in this issue was working fine.

Step to reproduce

My personal blog's source code is available here.

@Keats
Copy link
Collaborator

Keats commented Feb 16, 2022

Related: https://zola.discourse.group/t/assets-from-child-page-content-have-wrong-relative-paths-when-shown-in-sections/1181

@Keats Keats added the bug label Feb 16, 2022
@Keats Keats added the done in pr Already done in a PR label Jun 10, 2022
@klausi
Copy link
Contributor

klausi commented Jul 2, 2022

Downgrading to zola 0.14.1 is a workaround for now. I wasted an hour trying to downgrade Zola with linuxbrew and snapcraft, but I realized those package managers don't support versions??? That was surprising to me, I though the point of a package manager is to manage packages and their versions.

Anyway, thanks a lot for providing binaries on the Github release pages, from there I could get version 0.14.1 working quickly.

@Keats
Copy link
Collaborator

Keats commented Jul 4, 2022

It should be fixed in the next branch as well if you want to try.

@Keats Keats closed this as completed Jul 17, 2022
@SkypLabs
Copy link
Contributor Author

SkypLabs commented Aug 8, 2022

I confirm that it has been fixed in v0.16.0 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug done in pr Already done in a PR
Projects
None yet
Development

No branches or pull requests

3 participants