freelancer-theme icon indicating copy to clipboard operation
freelancer-theme copied to clipboard

Issue deploying the template

Open dcassol opened this issue 4 years ago • 5 comments

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!

dcassol avatar May 11 '20 01:05 dcassol

Similar issue here in testing for a github pages deployment. Did this issue get resolved by chance?

modonovan avatar Jul 23 '20 14:07 modonovan

@modonovan Unfortunately no. As you can see on my link above, I changed the theme because I couldn't fix this issue.

dcassol avatar Jul 23 '20 17:07 dcassol

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"

itopaloglu83 avatar Aug 30 '20 18:08 itopaloglu83

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.

sergenp avatar Oct 04 '20 10:10 sergenp

@itopaloglu83 This did not solve the issue

hbensalem avatar Dec 21 '20 01:12 hbensalem

fixed (https://github.com/jeromelachaud/freelancer-theme/commit/28bb2f9ecd99da3c4ec94f3e117e306249f37e3f)

jeromelachaud avatar Aug 25 '22 10:08 jeromelachaud