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

Allow custom hero images Fixes #379 #670

Merged
merged 2 commits into from
Oct 15, 2022
Merged

Conversation

SrNetoChan
Copy link
Contributor

@SrNetoChan SrNetoChan commented Oct 15, 2022

Issue

Fixes #379

Description

Fixes issues that does not allow to set a custom hero for each post unless you have a bunch conditions met

It's based on a change proposed earlier but for some reason was deleted #661

Test Evidence

With this change, I was able to put the hero image in the assets folder and set the hero parameter in the post pointing to
/images/name_of_the_file.png

image

Copy link
Member

@hossainemruz hossainemruz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @SrNetoChan

@hossainemruz hossainemruz added bug Something isn't working automerge labels Oct 15, 2022
@kodiakhq kodiakhq bot merged commit 32c5c04 into hugo-toha:main Oct 15, 2022
@hossainemruz hossainemruz added the hacktoberfest Mark an issue so that contributor participating hacktoberfest can work on it label Oct 15, 2022
@eishundo
Copy link
Contributor

eishundo commented Nov 1, 2022

This change breaks any existing posts that have the "hero" image in a folder location relative to the post category.

The following worked previously, but no longer works:

$ pwd
content/posts

$ /bin/ls
captive cubing hosting-history _index.md

$ bin/ls captive/index.md
captive/index.md

$ grep hero captive/index.md
hero: images/captive.gif

$ /bin/ls captive/images/captive.gif
captive/images/captive.gif

The question is, should ALL images be located in /images, or should post images be stored in a directory relative to the post itself?

@hossainemruz
Copy link
Member

@eishundo This PR fixes the issue: #684

@eishundo
Copy link
Contributor

eishundo commented Nov 3, 2022

@eishundo This PR fixes the issue: #684

Perfect! Confirmed to work under the original use case again. Many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge bug Something isn't working hacktoberfest Mark an issue so that contributor participating hacktoberfest can work on it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hero image and posts bug
3 participants