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

cover image relative path does not display in post #305

Closed
erblast opened this issue Sep 28, 2018 · 3 comments
Closed

cover image relative path does not display in post #305

erblast opened this issue Sep 28, 2018 · 3 comments
Labels
bug Something isn't working enhancement New feature or request
Milestone

Comments

@erblast
Copy link

erblast commented Sep 28, 2018

hugo-tranquilpeak-them 0.4.3
hugo v0.46 darwin/amd64

If I take your example site and add a new post with the following yaml parameters

---
title: "Cover Image relative path"
date: "2018-09-27"
slug: "cover_image_relative"
coverImage: img/showcase.png
---

and another one like this

---
title: "Cover Image url path"
date: "2018-09-26"
slug: "cover_image_url"
coverImage: https://github.com/kakawait/hugo-tranquilpeak-theme/raw/master/showcase.png
---

I will see both cover images on the landing page but only the post with the url path will show the cover image while the post with the relative path will default to the cover image when I click on it.

Is this a bug or intended behaviour, is there a way around it without resorting to the url path?

great theme by the way I am using it now for a second project at work and will keep using it for my own blog.

@kakawait
Copy link
Owner

@erblast Thank for reporting.

For the first scenario, if you replace with coverImage: /img/showcase.png does it do what you would like to see ?

@kakawait kakawait added bug Something isn't working enhancement New feature or request labels Sep 28, 2018
@erblast
Copy link
Author

erblast commented Oct 1, 2018

this actually does the trick, however the problem persists if I add another level to my baseURL in config.toml

baseURL = "https://example.org/dira/"

@xenlo
Copy link
Contributor

xenlo commented Feb 12, 2019

I get the same issue. If I add a sub folder in my baseURL, it the references to the CSS and images goes wrong.

Versions

  • hugo-tranquilpeak-theme 0.4.4-BETA
  • hugo v0.37.1 linux/amd64

kakawait added a commit that referenced this issue Jul 10, 2019
use `relUrl` instead

fixes #236 and #321 and #305
@kakawait kakawait added this to the 0.4.6-BETA milestone Jul 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants