freelancer-theme
freelancer-theme copied to clipboard
Issue deploying the template
Hi, I am trying to deploy the template here (Github repo). But unfortunately, for some reason, it is not able the find the ccs files and js.
Could you please let me know the best way to fix this?
Thank you very much!
Similar issue here in testing for a github pages deployment. Did this issue get resolved by chance?
@modonovan Unfortunately no. As you can see on my link above, I changed the theme because I couldn't fix this issue.
For future reference this usually happens when the deployment address does not match the Jekyll configuration.
Here's why it happens
When you set a project page up it's accessible on https://user-name.github.io/project-name/
. However, the default Jekyll configuration is not compatible with that. It requires to be served on a root domain level, without the /project-name/
part in url. Therefore it's looking for the css files under the root directory, https://user-name.github.io/assets/css/
.
Here's how to fix it
Jekyll has a quick solution for this. You just need to edit your project's _config.yml
file like below.
baseurl: "/project-name" # the subpath of your site, e.g. /blog
Solution for this particular issue (#114)
For your particular case @dcassol you can fix the issue by adding the following line to your _config.yml
file.
baseurl: "/riverside"
You can also solve this issue by removing the prepending "/" from the href (from the src attributes for javascripts respectively) attributes. E.g. if you were to search for a css file inside the css folder like so:
<link rel="stylesheet" href="{{ "/css/style.css" }}">
this will look into the baseurl, but if you were to use
<link rel="stylesheet" href="css/style.css">
this will look for relative style.css file inside your working directory, regardless of the baseurl you set.
@itopaloglu83 This did not solve the issue
fixed (https://github.com/jeromelachaud/freelancer-theme/commit/28bb2f9ecd99da3c4ec94f3e117e306249f37e3f)