Skip to content

Assets not found when previewing a Jekyll site (absolute vs relative links) #89

Answered by hamoid
hamoid asked this question in Q&A
Discussion options

You must be logged in to vote

In the end we made all URLs relative: https://github.com/prachtsaal/prachtsaal.berlin/pull/60/files

So we replaced links like

<a href="/impressum.html">Impressum</a>
<script src="/assets/js/caesar-lightbox.js"></script>

with

<a href={{ "impressum.html" | relative_url }}>Impressum</a>
<script src={{ "/assets/js/caesar-lightbox.js" | relative_url }}></script>

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@rossjrw
Comment options

@hamoid
Comment options

Answer selected by rossjrw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants