mercredi 20 novembre 2019

I'm trying to include an image into a GitLab Jekyll website hosted on an external server, but it's not working

I have a jekyll website, with my repository in GitLab while the website itself is hosted on an external server. So far everything works (the website is up and both posts and layouts do what I want them to) but I have trouble assessing images or other files (pdf, css).

My repository is structured like this:

_assets
example.jpg

_layout
example_layout

the website is hosted at SERVERURL/~myURL/, with my baseurl being /~myURL

I'm trying to access the jpg from the example_layout but it doesn't work. I've tried finding an answer, including reading similiar questions, and it seems the problem is because the website is being hosted externally. What I've found as suggestions so far that didn't work:

href="/_assets/example.jpg"
href="../_assets/example.jpg"
href="_assets/example.jpg"
href="/_assets/example.jpg"

I'm new to both jekyll and GitLab, so I'm currently out of ideas and would be very grateful for any help.




Aucun commentaire:

Enregistrer un commentaire