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

We should not assume all images come from /images #14

Closed
saper opened this issue Jan 13, 2020 · 1 comment
Closed

We should not assume all images come from /images #14

saper opened this issue Jan 13, 2020 · 1 comment

Comments

@saper
Copy link
Contributor

saper commented Jan 13, 2020

It seems that it is not possible to use Hugo's image processing or page resources features because this theme seems to hardcode .../images/... path in few places:

  • {{ if .Params.img }}
    <img width="100%" src="{{ .Site.BaseURL }}images/{{ .Params.img }}" alt="{{ .Title }}">
    {{ else }}
    <img width="100%" src="{{ .Site.BaseURL }}images/{{ .Site.Params.defaultImage }}" alt="{{ .Site.Title }}">
    {{ end }}

  • {{ if .Params.img }}
    <img width="600" src="{{ .Site.BaseURL}}images/{{ .Params.img }}" alt="{{ .Params.title }}">
    {{ else }}
    <img width="600" src="{{ .Site.BaseURL }}images/{{ .Site.Params.defaultImage }}" alt="webjeda">
    {{ end }}

@saper saper changed the title We should not assume all images come from /static/images We should not assume all images come from /images Jan 13, 2020
bul-ikana added a commit that referenced this issue Oct 19, 2020
@bul-ikana
Copy link
Owner

I wasn't aware of page resources. They look really useful and make a lot of sense in the context of this theme which main feature is having a featured image. I made some changes to support them in #18 , but I am not sure if they cover all the scenarios you were thinking of. Feel free to submit another issue if there is something I didn't consider.

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

No branches or pull requests

2 participants