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

Relative links #32

Open
cherylepatrick opened this issue Aug 16, 2017 · 0 comments
Open

Relative links #32

cherylepatrick opened this issue Aug 16, 2017 · 0 comments

Comments

@cherylepatrick
Copy link
Contributor

This relates to pull request #30

For a long time, we have used the jekyll relative_url filter to reference internal links (either to site pages or to stylesheets). For example, we link to a style sheet like this:
<link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
On my local machine, with snjekyll serve, this works fine. It also works fine on the live site supernemo-dbd.github.io/

Lately, it has NOT worked on my own GitHub pages site https://cherylepatrick.github.io/SuperNEMO-DBD.github.io/ . Without the changes in PR #30, that renders with no styling and with all the internal links broken - the reason being that they link to (e.g.) https://cherylepatrick.github.io/index.html rather than https://cherylepatrick.github.io/SuperNEMO-DBD.github.io/index.html

In PR #30 I fixed this by changing the links to something like
<link rel="stylesheet" href="{{ "./assets/main.css" }}">

That works on my local snjekyll setup, and on my GitHub pages. However it fails the Travis checks and @goliviero said that it didn't work for him on his copy (I'm not sure what he did differently from me). So I don't think we want to merge this PR as it stands, but I am not sure what we should do instead.

This is a known issue with GitHub pages but I haven't really seen any good suggestions of how to fix it so it works everywhere. Advice needed!

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

1 participant