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

Page (bundle) resources support #442

Open
414n opened this issue Jul 15, 2020 · 0 comments
Open

Page (bundle) resources support #442

414n opened this issue Jul 15, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@414n
Copy link

414n commented Jul 15, 2020

Configuration

  • Operating system with its version: Linux Slackware64 14.2
  • Browser with its version: Mozilla Firefox 68 ESR
  • Hugo version: 0.60.1
  • Tranquilpeak version: 0.4.8-BETA
  • Do you reproduce on https://tranquilpeak.kakawait.com demo?: built-time issue, can't reproduce

Actual behavior

While working with this theme, I noticed that it currently does not support references to page resources for a number of front-matter parameters (coverimage, thumbnailimage, gallery etc.), as the relevant templates actually expect a relative URL to the static directory or an absolute one.

This results in broken images/pages when trying to reference page resources in a page.

Expected behavior

Theme should support loading page resources while possibly keeping the actual behavior as a fallback.

Steps to reproduce the behavior

  1. create a new page bundle under the post section, e.g. post/a_test_post/index.md
  2. put a test image inside the bundle, e.g. post/a_test_post/image.jpg
  3. try to use it via a front matter parameter like coverimage, e.g. coverimage: image.jpg
  4. render the site with hugo;
  5. when loading the test page, the image is not correctly loaded, because the incorrect image URL was generated, e.g. http://BASEURL/image.jpg instead of http://BASEURL/post/a_test_post/image.jpg

I have already modified some templates to add this feature. Will create a PR soon

@kakawait kakawait added the for triage An issue we've not yet triaged label Aug 18, 2020
@kakawait kakawait added enhancement New feature or request and removed for triage An issue we've not yet triaged labels Aug 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants