Open edapm opened 4 years ago
Here's a solution in case you need help.
Update your includes head.html file. I haven't checked all URLs but these definitely need fixes. If site.baseurl
is set it will be prepended to the URLs.
<link rel="icon" href="{{site.brand.logo}}" type="image">
<link rel="stylesheet" href="assets/css/index.css">
<link rel="icon" href="{{ site.brand.logo | relative_url }}" type="image">
<link rel="stylesheet" href="{% 'assets/css/index.css' | relative_url %}">
Note the first is a variable so has no quotes and the second is a string so needs quotes.
You should also consider a flow for the logo. Is it required? Is there a fallback value?
Maybe rather than setting it in your sample config you can have a fallback.
{{ site.brand.logo | defaults: 'assets/logo.png' | relative_url }}
Hi @MichaelCurrin, I've done what you said and it still doesn't work. It's not to do with relative_url
, because I've added them in, and it's a single page theme. For some reason Jekyll isn't serving it from the baseurl, even though it says it is in the terminal output:
Server address: http://127.0.0.1:4000/jekyll-statuspage/
.
Your theme's config says /jekyll - that should be updated to be consistent with the above
baseurl: /jekyll-statuspage
I don't know what you mean it is not serving. Do you get 404 page or white page or just bad CSS?
I can try running tomorrow.
Make sure to go to http://127.0.0.1:4000/jekyll-statuspage/ in your browser as http://127.0.0.1:4000/jekyll-statuspage no forwardslash will not work. I frequently forget about that.
That value I suggested above also means you can have a demo GH Pages site using the theme repo itself and not the other repo. Currently using "/jekyll" would not work nicely on GH Pages.
I downloaded and ran the theme alone and it works.
Check your terminal output again as the path is /jekyll
not /jekyll-statuspage/
as you said above.
I ran the theme itself.
I noticed you used bad values in your head.html - I made a PR #5
This doesn't make sense as it applies one filter to the other:
{{ site.baseurl | 'some/string' }}
What make more sense is something like this, which puts the two strings next to each other.
{{ site.baseurl }}{{ 'some/string' }}
And if you use _relativeurl, it does that for you so you can drop the baseurl code.
{{ 'some/string' | relative_url }}
Becomes:
/jekyll-statuspage/some/string
Or with fallback
{{ site.foo | default: 'some/string' | relative_url }}
I wonder whether it's an environmental issue - if you can run it, but I can't for some reason. I'm running Jekyll on Windows 10.
Yes I got it to work. This was in my HTML source and I could view the file in the browser.
Update your main branch to get the PR changes and then try again.
@MichaelCurrin, I ran it on Gitpod and it worked okay, I'll try it on Windows again at some point. I've merged the pull requests.
Does not take baseurl into account, serves from url (i.e. localhost rather than localhost/page)
Probably Windows Issue