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

App icon in header at Privacy Policy page won't load #31

Open
AdilSoomro opened this issue Jan 21, 2020 · 3 comments
Open

App icon in header at Privacy Policy page won't load #31

AdilSoomro opened this issue Jan 21, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@AdilSoomro
Copy link

I've provided custom app icon in config.yml, which loads fine on homepage. However it won't load at privacy policy page and when looking at the imgsrc link its looking in wrong directory ie domain.com/privacypolicy/assets/appicon.png

For example have a look at:

  1. Home Page: imagitor.booleanbites.com
  2. Privacy Policy Page: privacypolicy
@StrymTV
Copy link

StrymTV commented Feb 3, 2020

I managed to fix it by editing header.html file.

from this:
{% if page.url != '/' %} <a href="../" target="_self"><img class="headerIcon" src="{{ site.app_icon }}"></a> {% else %} <img class="headerIcon" src="{{ site.app_icon }}"> {% endif %}

to this :

{% if page.url != '/' %} <a href="../index.html" target="_self"><img class="headerIcon" src="../assets/appicon.png"></a> {% else %} <img class="headerIcon" src="{{ site.app_icon }}"> {% endif %}

hope it helps! 👍🏻

@danielmgauthier
Copy link

This has been sitting here for a little while, but in case anyone out there runs into this: you've probably just got relative file paths in your config.yml instead of absolute paths. Instead of this...

app_icon: assets/appicon.png

do this:

app_icon: /assets/appicon.png

Same goes for other resources that are accessible from multiple pages, like your press kit 👍

@thatvirtualboy
Copy link

Did something change to where this isn't working as of late? I recently loaded this template and am trying to add images to presskit.md and other pages using

![](/assets/image.png)

It shows fine in the "Preview" pane on Github, but after publishing, the images don't show up. I have older sites deployed from this template that use this exact method that work fine.

Thanks!

@emilbaehr @danielmgauthier

@emilbaehr emilbaehr added the bug Something isn't working label Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants